0

For the purpose mentioned in the title, I have seen this question, as well as this demo. I am thus using the ThREEx.atmospherematerial() from the THREEx.planets package.

The material is controlled by, besides colors, two parameters, power (p in the demo) and cofficient (c in the same demo). It is simple to figure out, that power controlls the steepness of the gradient, while the coeffecient the extent.

In the demo, it is seen, that the outer edge of the atmosphere is crisp, and the inner, towards the sphere, edge gently fades to transparency. I want this to be the other way round, thus: the inner edge should have the lowest transparency, and the outer edge should gently fade to transparent.

Trying to use a negative power was not successfull.

Could anyone kindly help me, please?

Community
  • 1
  • 1
Sean
  • 789
  • 6
  • 26

1 Answers1

0

I am not sure if this is a good practice (moderator help me on this issue please), but since I found an answer, I am sharing it, should anyone need it in future:

You can use the lines

material = new THREEx.atmospherematerial();
material.side = THREE.BackSide;

to achive the effect I wanted.

Sean
  • 789
  • 6
  • 26