DEV Community

Cover image for Simulating millions of particles to create the Sun

Simulating millions of particles to create the Sun

Darren Burns on June 26, 2019

I recently wrote a blog post about how I was learning to make video games in the Unity game engine. In that post, I built a simple space scene, and...
Collapse
 
dpshelio profile image
David Pérez-Suárez • Edited

Wow!! This is amazing!! Thanks for sharing your thought process towards the final product. I'm a solar physicists and I can tell you this is awesome. I'm mostly impressed with the prominences, they are very close to what we observe with our best telescopes. The disk is not that realistic though, but that would change drastically depending the wavelengths you are simulating/looking at.
One last thing, the sun rotates in the opposite direction... Unless, your north is down as you would see it from the south hemisphere - in which case it's all right.

Collapse
 
nestedsoftware profile image
Nested Software • Edited

This looks really amazing, and the way you approached the design was also really interesting. I wonder if it would be hard to add those famous coronal loops that fire occasionally due to the intense magnetic fields:

Maybe the easiest way would be to create a few different animations manually and have them randomly show up as part of the model. Alternatively, I guess you could try to produce them in some generative way so that each one is unique. I have a feeling that might be challenging though...

Collapse
 
rpalo profile image
Ryan Palo

This is a really cool write up, and it’s neat to see your design progression. Thanks for putting it together!

Collapse
 
_darrenburns profile image
Darren Burns

Thanks Ryan :)

Collapse
 
martinhaeusler profile image
Martin Häusler

Looking good! As a further suggestion, you might want to try ShaderGraph, overlay two fire textures with alpha channels and slowly move them in opposite directions (UV movement over time). I think that might improve the look of the sun even without involving further particles.

On a related note: it is SO damn easy to just get carried away on a single detail in a 3D game. I have no clue how people manage to stay focused on the big picture.

Collapse
 
alebiagini profile image
aleBiagini

this is f* awesome! You rock man! Really inspiring. I am starting to learn game dev with unity, this post is very motivational to me! :)

Collapse
 
_darrenburns profile image
Darren Burns

Thanks so much!

You might be interested in my other gamedev post if you haven't already seen it :)

dev.to/_darrenburns/learning-to-cr...

Collapse
 
msfjarvis profile image
Harsh Shandilya

That looks sick! Thanks for sharing :)

Collapse
 
_darrenburns profile image
Darren Burns

Thanks!

Collapse
 
awwsmm profile image
Andrew (he/him)

Looks great, Darren!

Collapse
 
dbarwikowski profile image
Daniel Barwikowski

Good job man! Keep it spinning :D