Advertisement

Generating/creating Gaussian star/glare texture

Started by July 30, 2019 04:04 PM
1 comment, last by grelf 5 years, 6 months ago

I am developing my orbital flight simulator (space simulator) myself.

I am figuring how to write a routine to generate/create Gaussian star/glare texture for starry sky.  I googled for that but can't find any source so far.  I only found it in open-source Celestia code but it did not explain clearly.

Does anyone know any good source in books or website that provides coding for creating Gaussian star/glare texture?

Tim

Do you mean how to give each star a Gaussian brightness profile? If so, you can see an example here: https://www.grelf.net/sky/index.html  If you scroll down you will get some explanation. Right click to view source and you will see links to the various JavaScript files. The one you need is viewAA.js and it contains a method of a View object declared like this:


View.prototype.calculateStarProfile = function (maxLevel, halfWidth)

You will find the Gaussian constructor and its calc() method further down in the same file.

I hope this helps.

NakedEyeSky_cr.png

This topic is closed to new replies.

Advertisement