Asteroid(s)

A quieter space for design discussion of long-term projects
FluffyFreak
Posts: 1341
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Asteroid(s)

Post by FluffyFreak »

Ok so just to add to my list of things I'll never finish...

Asteroid generation!!!.

Using an exe built from my branch above, startup the modelviewer with some quick to load ship like "pioneer -mv varada". Once it's loaded press "a" to create and show an asteroid.

You can then press "a" to toggle it on or off, or press "a + left-shift" to have it delete that asteroid and make you a new one.

Some screen grabs:
Image Image Image Image Image

There are obvious problems at the moment.
  • texture deformation - triplanar mapping would be better - done
  • triplanar blending issues - can be solved with other bright ideas.
  • texture repetition - slope/angle of the surface should be used to pick between different textures, jagged rocky faces for "vertical" surfaces and sandy/dusty plains for horizontal or flatter ones.
  • underlying sphere still visible at times - this is caused by poor distribution of the bumps across the surface, needs better random-points-on-a-sphere
  • uniform bump type - bumps all have linear falloff with distance and are positive or negative, and that's it. Craters and different falloff rates should be perfectly possible, including non-circular.
Bigger issue:
I have no idea how to decide WHERE in a star system the asteroids should go or what type they should be,
These are the things people could help me with:
  • generate the location(s) of asteroid belt(s) - pick points within them to place asteroids.
  • other locations not in belts like Trojans.
  • decide what type of asteroid goes where.
This is just one type of asteroid that I've come up with a way of generating right now. It's based on a description I found on Paul Bourkes website and I spent a couple of hours hacking it up. Previously I've tried generating asteroids using perlin/simplex with cellular/Worley noise and marching cubes to create the geometry but had only limited success with that so far. Hopefully we will have a range of methods to generate asteroids / comets of different sizes and shapes eventually depending on their composition.

HELP IS VERY MUCH APPRECIATED ON THIS ONE! Some stuff I've listed is just taxing my brain too it's limits.

Andy
Last edited by FluffyFreak on Sun Feb 01, 2015 2:19 pm, edited 2 times in total.
nozmajner
Posts: 1078
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Asteroid(s)

Post by nozmajner »

Wow!
Is there a way I can help? Like textures and things like that.
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: Asteroid(s)

Post by robn »

Placement is kind of tricky. I think we'll need to fake it to a certain extent because we could put thousands of them throughout the system in a "realistic" kind of way but still have them impossible to find due to the sheer vastness of space. So we could just fake it and put some near stations, or at know distances from the ground or similar.

Also the simulation for thousands of them is tough. I wonder if we could place an "asteroid group" object, each one that then has a few tens/hundreds of asteroids attached, positioned relative to it, and then only actually calculate them when the player is near. Sort of a mini-system-simulation. We can make the "group" object individually targetable so you can autopilot to it etc.

I don't have any particular thoughts about their appearance.

If I think of anything else I'll throw it in here :)
FluffyFreak
Posts: 1341
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Asteroid(s)

Post by FluffyFreak »

Some kind of grouping and instancing system is the only way I think.

My current plan is to try and fade out the rings as you approach, I want to rewrite them slightly for this, and then start instancing asteroids. As you leave they fade back in and the asteroids fade out... then are destroyed (pending ideas about caching etc).

Lots of other stuff to do though, like collision mesh building - could we make it so we can land on them?, I'm just trying out that triplanar texturing stuff right now.

@nozmajner, don't worry I'll have plenty for you to do ;)
I want to get some things settled down first so that how the code side of texturing works is final, then I'll do you a special build so you can try out texturing them.
With it being so early I'm reluctant to say more about what I'm trying to do, we should just see how it evolves at this point :)
impaktor
Posts: 992
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Asteroid(s)

Post by impaktor »

So these asteroids/groups of asteroids would not be on rails, but be actual floating bodies, where each is simulated independently? Should the asteroid drift relative to each other within a group? What happens if two groups overlap?

My main thoughts are for the game mechanics, of how it would impact/enrich the player experience.

1. Does anyone know of a game with Newtonian physics that has asteroids that behave "realistically"?

2. Are real asteroid fields dense enough to actually get a sense of being in one, by seeing them really drift about in all kinds of directions? Is this a case where we can allow ourselves to "cheat" and have unrealistic high concentration of asteroids to increase fun-factor in game play? After all, it's a game and not a space simulator.

3. Is it possible to navigate in an asteroid field without "cheating" on the physics like in Elite Dangerous? Zipping about between asteroids sure looks cool, but might not be something that would appeal to NASA/ESA.

Also, they look really good!
FluffyFreak
Posts: 1341
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Asteroid(s)

Post by FluffyFreak »

I think groups would be on rails, they'd define volumes like the trojans ahead/behind of a planets orbit, or a volume & orbit like the asteroid "belt".

They're only dynamic right now because I wanted some code, in practice they should probably not be flying around in random directions but moving on rails as one big gathering (for rare places where the density is high enough anyway).
Doing fully interactive simulations of a dense asteroid field and their collisions etc is WAY beyond what in mind - what I had in mind was: Oh look a big rock in space, all alone.

The asteroid belt is very sparse, dense for space - which is empty, but sparse in human terms. The asteroids are very far apart in terms humans are used too.
Rings such as those around Jupiter and Saturn are much denser but I think the average size of the object is much smaller. The idea being that if it gets big then it becomes a moon since there's plenty of material. So you they're either smaller, or moons, without much in between.

They look better now I've got the triplanar mapping working :)
nozmajner
Posts: 1078
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Asteroid(s)

Post by nozmajner »

Impaktor:

1. I never heard of any except the Asteroids, which you already mentioned on IRC. :) Space Engineers doesn't simulate their movement as far as I know, and that game doesn't even has orbital mechanics anyway.
2. "...since the average separation between asteroids is approximately 16 times the distance between the Terra and Luna, ships in the asteroid belt might never even see an asteroid."
Also: http://en.wikipedia.org/wiki/Asteroid_b ... cteristics

It seems that the trojan/lagrangian object density isn't that good deither.:
http://en.wikipedia.org/wiki/Jupiter_Tr ... s_and_mass
http://en.wikipedia.org/wiki/File:Inner ... tem-en.png

In E:D there are asteroid belts on the system map, but practically each ring is made of several asteroid clusters, and each of them has a couple of loftly placed body. I don't think they are placed in lagrangian points or anything but I haven't actually checked. It doesn't seem so on first sight.
Rings are densely packed though.

3. I think it will work inherently, just like being around a space-station, since you have to sync your orbit with them to be stationary relative to them. Zipping trough a dense field like from an inclined orbit/non-synced orbit should be very dangerous though.

From a gameplay perspective the first obvious possibility would be that the already present mining laser should work on them. That brings up the need for defined/generated material composition, and matching textures for them. This would pretty much work like in E:D, sans refinery equipment.

Also should I start working on an asteroid station? These might also be a good candidate for some hidden bases the player could obtain info about/look for them with some kind of detecting detecting equipment. Info on these might also be obtained from BBS gossip, or even delivery/taxi/recon missions to these installations.
The already proposed planet exploration mission might be also extended to these belts/asteroids. Like the player can do a survey in these fields for some mining company, with the added complication of ships from an unfriendly competing company.
impaktor
Posts: 992
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Asteroid(s)

Post by impaktor »

Looking at the issue tracker, there are some ideas floating about in Feature request such as:
  • Arbitrary markers: to mark an asteroid in order to be able to return to it. #827
  • Mission type where you photograph or prospect an asteroid (and possibly rocky planet).
    #541
  • LUA definable asteroid belt, #1118
  • And here on the dev-forum we have: Rogue planets
  • "Request, generic object, renderable, destructable, with collision and mass" #2127
  • And if we're doing Trojans, then that is just a special case of: "Park things at Lagrangian points" #1878. Perhaps probability of spawning asteroids depends on the mass of "parent" body of lagrangian points?
What I had in mind was: Oh look a big rock in space, all alone.
OK, that seems like a good approach.
A lot of good info there.

OK, so asteroids can be for:
  • Pebbles and boulders in rings
  • Lagrangian points
  • Kuiper belt?
  • Forming planet/body?
  • Random asteroid floating about?
FluffyFreak
Posts: 1341
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Asteroid(s)

Post by FluffyFreak »

Updated the code a little with Triplanar texture mapping and normal mapping, though I think that normal mapping needs work still. The triplanar mapping suffers from a common problem with texture splatting where the blend is smooth between two textures (even if the texture is just itself 2 or 3 times over) which produces some ugly artefacts. However as I mentioned in my edited first post there are workarounds.

Next I changed the texture(s) so instead of a rock it is now 4 textures (from this link) for Diffuse, Specular, AO and Normal maps. Obviously this is just for testing purposes and we'll need proper textures eventually.

Speaking of which there is a bit of disparity between the artist view and the reality of how an asteroid should look.
FluffyFreak
Posts: 1341
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Asteroid(s)

Post by FluffyFreak »

Last edited by FluffyFreak on Sun Feb 01, 2015 3:01 pm, edited 1 time in total.
Post Reply