最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make a star with three.js like Chrome Experiments 100,000 stars - Stack Overflow

programmeradmin0浏览0评论

I hope this is the right place this time, but I am trying to figure out how to use three.js to create a star the way the chrome experiments 100,000 stars was done. I tried looking into the source code but it is extremely difficult to decipher, it seems to be many parts, I have tried using textures, and I don't know how to get the glow or the halo around the sun, I would appreciate any assistance from someone with knowledge on how this was done.

I hope this is the right place this time, but I am trying to figure out how to use three.js to create a star the way the chrome experiments 100,000 stars was done. I tried looking into the source code but it is extremely difficult to decipher, it seems to be many parts, I have tried using textures, and I don't know how to get the glow or the halo around the sun, I would appreciate any assistance from someone with knowledge on how this was done.

Share Improve this question edited Sep 30, 2021 at 12:54 aggregate1166877 3,24030 silver badges40 bronze badges asked Jan 3, 2013 at 5:30 Cory EvansCory Evans 1931 silver badge9 bronze badges 1
  • Thanks for the edit gilly3 – Cory Evans Commented Jan 3, 2013 at 5:45
Add a ment  | 

2 Answers 2

Reset to default 5

Did you see this article?

The section on the sun gives a high-level overview of how to achieve the effects. You'll probably want to look into GLSL shaders, which is an entire field in itself. For now it might be best to find the shaders in the source and tweak them to see what effect your changes have.

Also consider checking out this tutorial for an example of glow and bloom shaders.

For learning more about OpenGL in general, the latest edition of The Red Book supposedly does a good job of explaining OpenGL while avoiding the failings of the previous edition.

Here is an example of a halo-style glow effect using shaders:

http://stemkoski.github.io/Three.js/Shader-Halo.html

It is still a work in progress -- panning or zooming will change the appearance of the glow, but perhaps it will be enough to be of assistance.

Hope it helps!

发布评论

评论列表(0)

  1. 暂无评论