emission to a max distance ?

in cycles in there a way to have an emission light
so you get bright white but not illuminate other objects farther away

like a max distance to lit things around ?

thanks
happy cl

why don’t you use the ray length? it’s exactly the info you need to do whatever you want a light to do… :slight_smile:

Demonstrated using an early version of Cycles (when the image was first posted), but it should work in 2.78


Good for artistic control, but will also bias the image in terms of realism.

I know not a natural effect indeed

but I have a lamp near a wall and need the mat to be more whiter
only way I found was with a little bit of emission on it

also ray lenght is the ray length between camera and object if I remember well ?

won’t be natural but still look better I guess

by the way if I put a lamp inside a closed volume should light get out of it ?

will test the 2 ways

thanks
happy cl

also you can try this way:


Will that help noise when using tiny lightsources combined with larger ones? Say indoor scene with portal lighting goes to crap if combined with several smaller ones, even if those are used for very local illumination effects only. Should MIS be turned off for such lights as to not compete with large lights?

what is the ray length ?
is it from object and out or inside like the example for SSS faking ?

or is it from camera to object ?

I did a simple test with an emission mat and
it works but not very effective !

it works best with using lamps and light falloff

what happen if you set a lamp inside a UV sphere or other closed objects ?

there is still light coming out ?

trying to control the light output shape with an object shape
like a cone of a lamp shader ?

but very difficult to do with simple lamp
I could use a spot light with cone but then
I have almost no light around only in the cone !

thanks
happy cl

Ray length returns every ray’s length except the SSS as far as I know. SSS is calculated in a blackbox and you can’t access what happens with its bounces except with its exposed parameters (scale etc). In Ko’s example what happens is every ray that ends up hitting the light will be queried for its length since last bounce, and depending on this value the corresponding color in the color ramp will be set.

for lamp case it would be more like object length from center of object and not the distance to camera

which fine for lamp

but is it same thing when using an emission material object
seems to be same case as shown by Ace Dragon
but that one not certain how to make it work nicely

and what about a lamp inside a volume
should we see light outside of it ?
kind of leaking light out of a closed volume ?

thanks
happy bl

Yes. And yet if we want to get the length of only certain types of rays, we can do it very easily:


1 Like

can you explain the logic or math model behind this !

thanks
happy cl

On the picture, lengths of all “not transmission” rays becoming zero- that’s all the trick.