PDA

View Full Version : Creating a Nebula



Shag
02-03-2002, 03:37 PM
I'm just after some ideas on how I can create nebula in a 3d space sim. I really want them to be fully 3D, so they will appear different when viewed from different viewpoints. Obviously they will need to be blended with stars to create a semi transparent area in space.

I'll probably use coloured fog when the user is inside a nebula - that's easy enough. It's creating a realistic nebula to start with the is the problem.

Here's an idea I've already had. Use fairly complex 3D models - render them to bitmaps, and use these bitmaps for billboarded quads. This is ok if the user isn't moving to quickly. But what if the user if flying through a galaxy very quickly. Does anyone have any experience with the performance of rendering to textures in real time? If so - what kind of slow down can I expect?

rIO
02-04-2002, 01:31 AM
There are few ways to render gaseous shapes :

1) volumetric rendering
2) billboarded render to texture
3) particles

1) prepare (precalculate) a 3d grid (a cube with NxMxO planes in it), and put on it NxMxO sliced rendering of the nebula. beware of changing the proper way the alpha of each plane in the grid.

2) render the nebula object to a texture and use a billboarded quad to draw it in your scene

3) just do a bunch of particles and sort and calculate lighting on it by hand. I prefer this method, so by calculating lighting by hand I can get self shadowing gaseous objects.

Visit my home page to get some sampels on method 1 (first link of stuff page) and 3 (last link of stuff page)...

cya

rIO.sK http://www.spinningkids.org/rio