1
$\begingroup$

I saw some answers to this question but they do not really work for my need.

I have an ellipsoid. I want the center to have a 100% full strength emission at the center, and gradually increase transparence to be fully transparent at the surface.

All I can manage to render is this but we see the border of the sphere and the center is still transparent.

enter image description here

Thanks for your help !

EDIT : Tried this solution from lutzi but doesn't work as it is supposed to... enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Maybe you could add a Fresnel or a Layer weight instead of the gradient texture. And then a color ramp with inverted black and white. $\endgroup$
    – Jag JB
    Commented Apr 17 at 21:31
  • $\begingroup$ Emission will never prevent light to go through, i.e. no matter how strong the emission, it will still be transparent. Maybe try using a Principle Volume with some density ? $\endgroup$
    – Lutzi
    Commented Apr 17 at 23:20

2 Answers 2

1
$\begingroup$

Here is one setup that gives what you are looking for. I'm simply using the distance to the center of the object, remapping it from [0,1] to [1,0], and apply a square function and a multiplier. I'm using a sphere of radius 1. If your sphere has another radius, then you have to change on value as shown below.

enter image description here

I would suggest using a Power node, set to anything above 1. It will help counterbalance the high emission you want and having a smoother decrease. The higher the exponent, the more the emission will decrease when going away from the center. As you can see in my example, an exponent of 2 is already smoothing the outer part of the volume.

Note that the input of the power node should be in the [0,1] range.

I've also drawn a mathematical representation of how an exponent of 2 will affect your input. You'll notice that the area below the curve decreases as the exponent increases. This means the overall emission will be smaller. That's why I'm using a Multiply node at the end.

$\endgroup$
6
  • $\begingroup$ That seems totally perfect but I triple checked the node config to have the same as yours and I cant have the same rendering. Is it working with cycles ? $\endgroup$
    – 16ar
    Commented Apr 18 at 6:05
  • $\begingroup$ I edited my question so you can see the screenshot. Thx $\endgroup$
    – 16ar
    Commented Apr 18 at 6:32
  • 1
    $\begingroup$ @16ar It is not mentioned in the answer, but I assume Lutzi uses a default sphere which has a radius of 1 m. Your screenshot shows your ellipsoid has the dimensions X = Y = 28.5 mm, Z = 29.5 mm. While the Texture Coordinate > Generated output always maps the coordinates of an object from 0 to 1 matching the object's bounding box, the Object output gives absolute local dimensions. Since your object only has a length of 0.01425 m from the center in X and Y, the Map Range node results in a value of 0.98575 (still almost 1) at the border of your ellipsoid, not 0 to be fully transparent. $\endgroup$ Commented Apr 18 at 8:19
  • 1
    $\begingroup$ So in order to get it transparent on the edges, you should use a From Max value of 0.01425 or slightly less. But this makes a round glow, not an elliptical one. To get an elliptical shape I would use the Generated output, set Location to -500 mm (or -0.5 m) for XYZ in the Mapping node to center the coordinates and then set the From Max value in the Map Range node to 0.5, then it works with an ellipsoid as well (vertical dimension exaggerated compared to yours to show the effect better): ellipsoid glow. $\endgroup$ Commented Apr 18 at 8:19
  • 1
    $\begingroup$ @16ar In my example I'm using Cycles but there shouldn't be much difference with Eevee. Gordon is right about the size of the sphere. I've highlighted in my screenshot where you are supposed to put the radius of your sphere. Also, be sure you Apply Scale if not already 1. $\endgroup$
    – Lutzi
    Commented Apr 18 at 9:57
2
$\begingroup$

You can use the Input > Layer Weight (Facing output) as factor between an Emission and a Transparent node:

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .