Nebulae, part III

Published August 22, 2006
Advertisement
First of all, the answer from the previous journal: the code that generated this strange, mathematical looking image is the following:

for (TUInt k = 0; k < 128; k++){  for (TUInt j = 0; j < 128; j++)  {    for (TUInt i = 0; i <128>)    {      SVec3D pos((TFloat)i / 127.0f, (TFloat)j / 127.0f,  (TFloat)k / 127.0f);      pos = pos * 2.0f - 1.0f;      m_sprites[1]->addSprite(pos * 20.0f, SColor(1, 1, 1, 0.25f));    }  }}


As you see, it simply creates a 128 * 128 * 128 voxel grid and generates one particle / point sprite for each cell. Nothing more. I'm guessing the strange looking aspect is coming from the particle texture ( which is smoke like ).

Going back to the "serious" stuff: i've been playing with various ways to light the nebulae. Before, each particle of the nebulae had its own color. That would make what is called "emission nebulae", ie. nebulae that emit lighting due to ionization of their particles when receiving light. What i've implemented now is "reflective nebulae", ie. a nebula that reflects color of the nearest stars, so it takes into account the position, distance and color to each star.

I've also added negative blending in order to simulate black dust / bok globules. The drawback is that, as there is no sorting, it can look a bit weird if you move quickly in 3D ( as in the coming video ), but in a sky box it won't be noticeable.

A very short video ( a few seconds long only ) is available here:

http://www.fl-tw.com/Infinity/Media/Videos/Infinity_nebula.avi

The nebulae are now considered close to being "complete". I still have some things to fix and redesign some code a bit, but the graphical aspect won't be improved much.

And, of course, mandatory screenies:






Previous Entry Nebulaes, part II
Next Entry Various updates
0 likes 17 comments

Comments

frecco2k
wow, that looks pretty darn cool, especialy in motion
August 22, 2006 11:29 AM
ApochPiQ
Very nice!

My only complaint is that your Bok globules are a little large and tend to over-dominate the visible cross-section of the nebula. But that's really subjective and only based on my (very, very vague) memories of looking at astronomical photos, so take that how you will [smile]
August 22, 2006 11:44 AM
Ravuya
Wow.

I'm gonna go put my head in the oven.
August 22, 2006 12:04 PM
sushbone
Woah thats AWESOME!!! Have never seen something amazing like that.
This must look so great in combine with you engine!!!

You are a genius!!

Best of all, it is all mathematical... amazing how much beauty math can have :-)
August 22, 2006 06:52 PM
HopeDagger
To call such work 'amazing' would be an insult to its grandeur. [smile]
August 22, 2006 08:31 PM
Ysaneya
*Blush* Today, i'll collect a few more screenshots and post everything in an IOTD.
August 23, 2006 03:31 AM
coderx75
Holy $h!t!!! You did it! I'm astonished that you've only recently started talking about this and already have something so breathtaking.
August 23, 2006 01:50 PM
glaeken
In the pics I didn't much care for the black parts, but watching the video, it's just amazing.
August 23, 2006 06:01 PM
Ysaneya
August 24, 2006 06:42 AM
MaverickDQ
Hi.

First of all - great work you've done so far.

Working on a similar project myself I had some tries with different approaches on generating nebulae (gas simulation, simulating gravity and last one is attractors).

Here are some screens from my implementation of attractors:

http://www.dqteam.net/img/gg1.jpg
http://www.dqteam.net/img/gg2.jpg

In second one, I've used same params posted by you in IOTD comments.

In previous journal post you've mentioned:

"I've added some code to deform the cloud point with some Perlin noise, to give a "turbulence" effect so that "straight lines" generated by strange attractors appear a bit more natural. Of course, as everything in the algorithm, the amount / type of distortion can be randomly generated to have more variety"

I'm familiar with Perline noise but had no success in adding it to an attractor to disturb those strait lines.

Therefore I humbly request your help in solving this issue :) as your results are great.

Thank you in advance.
Alexandru.
August 27, 2006 10:09 AM
Ysaneya
Heya Alexandru,

I can't see your images, it seems to be a restricted area asking for a login/password.

There's really nothing special going on for the Perlin noise deformation. You get a noise value for the x coordinate of each point, another noise value for the y coordinate, another for the z coordinate, you scale those by an arbitrary factor and add them back as an offset to the original point position.
August 27, 2006 03:35 PM
Ysaneya
Quote:Original post by Anonymous Poster
Awesome Awesome Awesome!
But the black blobs really suck and out of place. I think the reason is because you are not sorting and perhaps just blending in negative contribution from these as a last step it looks this way. Could you try reducing their contributing factor much lower?


That's correct, and i even mentionned it in the description.

You have to keep in mind that sorting one million points is going to be slow, and that it's useless in game since you're never going to travel into the nebula as seen in the video: the nebulae will be rendered to a static sky box when you enter each star system.

All that matters at that stage is, does it look good on the screenshots ?
August 27, 2006 03:37 PM
MaverickDQ
Thanks.

Actualy I've tried such a method, may be I did something wrong, anyway will try it again tommorrow.

As for links try these ones:

http://www.dqteam.com/img/gg1.jpg
http://www.dqteam.com/img/gg2.jpg

----------------------

Found the problem and now the shape is distorted properly.

Here few screens:
http://www.dqteam.com/img/gg1_1.jpg
http://www.dqteam.com/img/gg1_3.jpg

Thanks again for your small but usefull tip.

Regards,
Alexandru
August 27, 2006 03:48 PM
toucel

Would it be possible to see a picture with only the "emission" coloring and another with only the reflection coloring?

I am curious about the influence each has on the final render.

Also could you detail the workings of the lookups for the speed and angle?

Is speed simply = previous - current? Is it normalized in some fashion?
Is the angle = acos( normalize( previous - current ) DOT normalize( next - current )?

What do the lookup tables look like?

I apologize for the abundance of questions; the technical details here really interest me.
September 01, 2006 10:41 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement