Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using THREE.js to make a shining sun

I'm learning THREE.js to do my final project which is a simple solar system model

the only thing I don't know how to implement is how to make the sun shining or twinkle, just like the sun in chrome experiments 100,000 stars,

what I want is a sun like the this: enter image description here

However, below is the best I can get, which is not satisfying enough: enter image description here

Hope someone could tell me what library or technique that I can use to make the sun really shining!

Thanks a lot! Happy Thanksgiving!

like image 702
Wang Liang Avatar asked Nov 29 '13 17:11

Wang Liang


1 Answers

The sun in the 100,000 Stars Chrome experiment is mostly made up of layered images. For instance, here's the image called sun_halo.png:

enter image description here

You can see the code used to make that sun, including all the shaders and links to all of the images, in this file:

http://workshop.chromeexperiments.com/stars/js/sun.js

like image 200
meetar Avatar answered Oct 22 '22 12:10

meetar