Please help in creation of space star

I am developing a space MMO game. Locations in my game are solar system. Please tell me how best to implement the cosmic star.

You should describe what a “cosmic star” is.
I’m seeing a star, and how it looks, but I don’t know what the desired effect is.

Needs to be done as close as possible to this

Use a simple sphere, put a custom “sun” shader on it. Added a glow effect.

The custom shader could either use 4d simplex noise or cycle through a preset animation or do something in between the two.

Oh, you might want a lens flare effect as well to get those lines coming out from it.

@zarch said: Use a simple sphere, put a custom "sun" shader on it. Added a glow effect.

The custom shader could either use 4d simplex noise or cycle through a preset animation or do something in between the two.


where you can take a shader to the sun?

@javasabr said: Needs to be done as close as possible to this

That was painted in photoshop. This is a distant star. You will never reach it. Just take a plane and draw a star in gimp/photoshop.

@mifth said: That was painted in photoshop. This is a distant star. You will never reach it. Just take a plane and draw a star in gimp/photoshop.

To be pedantic, I guess it depends on how you are traveling because that is not much smaller than our own sun looks from earth and we have a relatively large star for a sun.

By Mars, I think it would be about that size or smaller.

@pspeed said: not much smaller than our own sun looks from earth and we have a relatively large star for a sun.

By Mars, I think it would be about that size or smaller.

Sol is by all means slightly below average versus the average suns in the galaxy. Its “visible size” is about the width of your thumb at arm’s length, which is, oddly enough, about the same size as the moon as seen in the sky.

Luminosity of a star, as seen in the picture above, is dependent on the star’s Stellar Class which effectively dictates its color (very bright, luminous, HUGE and blue are Class O that live short lives and the opposite, Class M are red, barely detectable by our standards and tiny. Those qualifications are for main sequence stars.). The “effect” you see above is dependent on the lens (because it’s a lens flare) used to photograph it, it does not reflect how the human eyes would see it at all.

@madjack said: ... The “effect” you see above is dependent on the lens (because it’s a lens flare) used to photograph it, it does not reflect how the human eyes would see it at all.

I must object - with enough alcohol you can also see a lens flare effect :-o Just joking :lol:

@madjack said: Sol is by all means slightly below average versus the average suns in the galaxy. Its "visible size" is about the width of your thumb at arm's length, which is, oddly enough, about the same size as the moon as seen in the sky.

Luminosity of a star, as seen in the picture above, is dependent on the star’s Stellar Class which effectively dictates its color (very bright, luminous, HUGE and blue are Class O that live short lives and the opposite, Class M are red, barely detectable by our standards and tiny. Those qualifications are for main sequence stars.). The “effect” you see above is dependent on the lens (because it’s a lens flare) used to photograph it, it does not reflect how the human eyes would see it at all.

That’s because a human eye would burn out before looking for very long. :slight_smile: The rays shooting out can be seen on bright lights at night even with the naked eye… because the eye has a lens. I see them all the time on porch lights when I walk my dog. :slight_smile: The lens flare I always object to in many games is the one where the aperture is reflected in a camera’s multistage lens. Often seen as a bunch of flashy hexagons… but is only ever seen in a camera. It’s a result of the light bouncing around inside the lens body and reflecting the camera aperture back onto itself.

On the size thing… I had looked it up before posting:

It is often said that the Sun is an "ordinary" star. That's true in the sense that there are many others similar to it. But there are many more smaller stars than larger ones; the Sun is in the top 10% by mass. The median size of stars in our galaxy is probably less than half the mass of the Sun.

From: The Sun Facts | Information, History, Size, Formation & Definition

Maybe mass is different than size in this case.

re: sun being same size as the moon in the sky… this is why we can have just dramatic eclipses. If the sun was very much larger (in the sky) then we’d probably not notice as much.

Note: an eye lens flare is much less dramatic.

Edit: this image shows both types…

@pspeed said: Maybe mass is different than size in this case.

re: sun being same size as the moon in the sky… this is why we can have just dramatic eclipses. If the sun was very much larger (in the sky) then we’d probably not notice as much.

The lens effects depends on many things. Quality of the lens is one of those. The number of spikes normally reflects the number of lens in a “lens box”. The lens effect you get in your own eyes depends on the “cleanliness” of yours eyes. Meaning “floaters” will greatly increase light diffraction, spiking, dryness, wetness, etc. Several times when taking my telescope out I have to “clean” my eyes to properly see without spiking/lens flare. Some of it remain, but you can diminish it. Tiredness is also a factor. Of course that’s only visible in low light environments. During the day unless you’ve got a 2x2 in the eye you won’t see a different, you would also have a very different problem. :wink:

As far as Sol’s qualities, among all G stars known to date, it is slightly below average. The analogy you used, although true, isn’t indicative of much. Class M stars, which make up more than 90% of the potential star in the known universe can’t be seen for the most part since their luminosity is so low. If I remember right, there are a dozen or so confirmed that we have observed in our neighborhood, but starting at a certain distance, our current technology isn’t developed enough to give us more information on their population. From the estimates of our local group it would indeed indicate class M stars are very, very numerous and would make the bulk of the mass of the known star population.

@pspeed said: To be pedantic, I guess it depends on how you are traveling because that is not much smaller than our own sun looks from earth and we have a relatively large star for a sun.

By Mars, I think it would be about that size or smaller.

I’m talking about eve-online like games… Most stars are just planes. And you cannot move to them close.

A bit late in the conversation, but I would guess that @pspeed 's approach to rendering the sun in his game would work quite well for this also. I can’t remember what thread the description was in… but it really looks great.

@t0neg0d said: A bit late in the conversation, but I would guess that @pspeed 's approach to rendering the sun in his game would work quite well for this also. I can't remember what thread the description was in... but it really looks great.

Yep, it’s just a sphere, a flare quad, and the right amount of bloom.

The hardest part was the flare texture… and that wasn’t hard. Just had to tweak settings in the photoshop plugin until I got something I liked and then cropped it down.

1 Like

We need to do this effect:
If we are close to the star

If we are far from a star

Please help me figure out how to make this effect :slight_smile:

We’ve already told you what you need to find the answer. Google the keywords:
bloom
custom shader
lens flare

All you need is a combination of all of the above.

They are all discussed on these forums etc too so if you use the search on this site you will find jme3 specific answers.