www.ClassicTW.com
http://classictw.com/

Random Starfield with Nebula
http://classictw.com/viewtopic.php?f=14&t=34801
Page 1 of 1

Author:  Micro [ Mon Mar 14, 2016 3:24 pm ]
Post subject:  Random Starfield with Nebula

I have been playing around with procedural generation of a random starfield with nebula using Perlin noise. I have come up with something that looks almost, but not quite, entirely unlike this:

Image

Each new image I create looks entirely different. There are 7 layers to that image.

Red, Green, and Blue gradients (Perlin noise with different seeds).
Background and Foreground Stars (Also Perlin noise).
Coverage and Billow Masks (You guessed it.. Perlin noise).

Each layer has different frequencies, amplitudes, brightness, etc... that can be adjusted. You could also use different colors to get a more realistic result.

Author:  Mongoose [ Mon Mar 14, 2016 11:39 pm ]
Post subject:  Re: Random Starfield with Nebula

Sweet.

Author:  Star Killer [ Tue Mar 15, 2016 4:18 am ]
Post subject:  Re: Random Starfield with Nebula

cool you should use that as the back ground to my website..Oh BTW can you build me a website? heh

sk

Author:  Micro [ Tue Mar 15, 2016 9:39 am ]
Post subject:  Re: Random Starfield with Nebula

Star Killer wrote:
cool you should use that as the back ground to my website..Oh BTW can you build me a website? heh

sk

Yeah, I can do that. I'll message you when I get home this evening.

Author:  Micro [ Thu Mar 17, 2016 8:48 am ]
Post subject:  Re: Random Starfield with Nebula

As I continue to work on a procedural generated universe, I ran across a real one:

https://www.chromeexperiments.com/exper ... 0000-stars

"100,000 Stars is an interactive visualization of the stellar neighborhood created for the Google Chrome web browser. It shows the real location of over 100,000 nearby stars. Zooming in reveals 87 major named stars and our solar system. The galaxy view is an artist's rendition."

The star data comes from he HYG star database archive:
https://github.com/astronexus/HYG-Database

All major browsers now support WebGL, so maybe it is the future of gaming.

Author:  Micro [ Thu Mar 17, 2016 9:16 am ]
Post subject:  Re: Random Starfield with Nebula

Every wonder where those stunning images of the milky way galaxy come from?

Some of them are artists renditions or 3D animations based on Spiral Galaxy NGC 1232, modified to look more like what we know about our galaxy.
http://www.eso.org/public/images/ngc1232b/

Author:  Micro [ Fri Mar 18, 2016 3:41 pm ]
Post subject:  Re: Random Starfield with Nebula

Now with planets:

Image

Adding the Sun and Earth to this scene was a lot harder than I though it would be. The only geometry WPF knows is MeshGeometry3D, so modeling a sphere is a lot harder than it should be. You have to actually calculate coordinates for a mesh of triangles to form the shape of a sphere. I found dozens of samples for creating 3D primitives (i.e. spheres), but they didn't support texturing. Then I found one with texturing, but it didn't draw a sphere (oops). Eventually I found one that worked. Lighting and rotating the textured sphere turned out to be quite easy though. Yes, it rotates and it is fun to watch :)

Author:  Star Killer [ Fri Mar 18, 2016 5:23 pm ]
Post subject:  Re: Random Starfield with Nebula

"My God...Its Full of Stars"

sk

Author:  Cruncher [ Fri Mar 18, 2016 10:55 pm ]
Post subject:  Re: Random Starfield with Nebula

Micro wrote:
Now with planets:
Lighting and rotating the textured sphere turned out to be quite easy though. Yes, it rotates and it is fun to watch :)


Way cool! Can you put that up on a website so we can all watch it rotate?

Author:  Micro [ Sat Mar 19, 2016 2:05 am ]
Post subject:  Re: Random Starfield with Nebula

Cruncher wrote:
Micro wrote:
Now with planets:
Lighting and rotating the textured sphere turned out to be quite easy though. Yes, it rotates and it is fun to watch :)


Way cool! Can you put that up on a website so we can all watch it rotate?

It is part of a TradeWars helper that I am writing. I will post a video as soon as I get clouds added.

In the mean time, I highly recommend you check out NASA's Eyes:
https://eyes.nasa.gov/

NASA's Eyes is a way for you to learn about your home planet, our solar system, the universe beyond and the spacecraft exploring them. There is an interactive application for desktop and mobile that allows you to visualize the real solar system though the data NSA has collected from various missions.

and Google 100,000 Stars:
https://www.chromeexperiments.com/exper ... 0000-stars

100,000 Stars is an interactive visualization of the stellar neighborhood created for the Google Chrome web browser. It shows the real location of over 100,000 nearby stars. Zooming in reveals 87 major named stars and our solar system. The galaxy view is an artist's rendition.

I ran across both of these really cool sites while searching for code examples.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/