how to do nice stars ?

Started by
4 comments, last by Michael81R 17 years, 10 months ago
Hi everyone, I'm new to this forum and unfortunately relativly new to DirectX 9.0 programming. I've already "understood" most of the tutorials/samples, but now I have to do some homework, and my knowledge is not good enough to do what I'd like to achieve. :( So I'd like to ask you for some help: Could you please tell me how to "make" some nice 3D stars. Something like in "Galaxy 3D Space Tour Screensaver"? (the bigger colored ones) I think they are done in 2D, but I'd like to have something similar in 3D. I doubt I get the needed skills in time, so your help would be really appreciated. It would really help me a lot if someone had a little time to spend on making a short sample for me with a few stars. Thanks in advance, Michael
Advertisement
There's two methods you could try:
1. Create a crapload of points, and render them all
2. Create a lot of textured quads, where each quad has several stars on it, and render those.

Personally, I'd go for #2. You could use texture blending with alpha to create some brighter coloured stars, that would come together as white in the center where a lot overlap.
Thanks very much, that sound good.
I hadn't even thought about how to do the background yet.
Thanks for the tips, i'll use them. One problem solved.

But my main problem is how to do a small amount of good looking bigger stars in the 'foreground'. Let's say like 10, each with its own planets.
Actually I have just a yellow sphere as a star, and that doesn't look good.

I'd like some glow, etc., but I don't know how to achieve it. :(
For reference, I was involved in a thread over on the MSDN forums about creating stars in Direct3D. Might well have some useful ideas...

Quote:Original post by Michael81R
But my main problem is how to do a small amount of good looking bigger stars in the 'foreground'. Let's say like 10, each with its own planets.
Actually I have just a yellow sphere as a star, and that doesn't look good.
Its difficult to say... but various levels of texturing and shading effects can make a huge difference to the quality output.

Quote:Original post by Michael81R
I'd like some glow, etc., but I don't know how to achieve it. :(
You might want to do some research into "bloom" - its a fairly simple post-processing effect that will add a glow to parts of a scene. I'm pretty sure the "PostProcess" sample in the SDK has an example implementation that you can check out.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

You'll have to decide how much detail you need based on how close/large the star systems are going to get. Is a billboard going to be good enough or do you need to model things more accurately somehow? Is there any 3D geometry involved? If your motion through the stars is simple enough you might not even need billboards, but just regular alpha blended quads (since your camera is going to be orthogonal to the stars at almost all times). What do you have in mind?

One way to make the basic program is to randomly initialize your stars in some 3D arrangement and then setup a flythough, and every time you pass by a star, you remove it and generate a new one off in the distance.
Thanks for the replies.

Quote:For reference, I was involved in a thread over on the MSDN forums about
creating stars in Direct3D. Might well have some useful ideas...

I'll certainly have a look at that.

Quote:You might want to do some research into "bloom" ...

I'll check this too

Quote:You'll have to decide how much detail you need based on how close/large the star systems are going to get.

I want to have a few stars (10-20) in a 3D space (want to rotate the "galaxy"),they should "fill" almost the whole screen. So I think I need to model things more accurately.

This topic is closed to new replies.

Advertisement