Chaos Corona Forum

General Category => Porting and API => Chaos Corona for Blender => Topic started by: Asticles on 2017-05-29, 19:21:29

Title: Gobo Spotlight
Post by: Asticles on 2017-05-29, 19:21:29
Hi all,

I'm trying to make a textured spotlight from textured mapped polygons. But without results.
Does anyone have tried it?

Thanks!
Title: Re: Gobo Spotlight
Post by: Asticles on 2017-05-29, 19:56:07
For example, a projector that projects this gobo with a color:

http://store.goboservice.com/en/rhombus.html (http://store.goboservice.com/en/rhombus.html)
Title: Re: Gobo Spotlight
Post by: blanchg on 2017-05-30, 02:00:53
Use the directionality input in the light/corona material

Values closer to 0 will diffuse the light more
Values closer to 1 will "focus" the light
Values greater than 1 will start to decay the light "islands"

Notice that over about 0.5 the light surface becomes black.

The attached animation shows increasing the directionality from 0.0 to 1.6.  Higher values of directionality required many more passes to render correctly
Title: Re: Gobo Spotlight
Post by: burnin on 2017-05-30, 02:18:48
Sadly there's no Gobo, no Projector, no Laser, no Spot... Lights as such (at least not with Corona_Blender). :)
The closest thing would be Mesh Directionally Emitting Textured Light. (don't know what to call it otherwise) :D

To make one:
Add a mesh/plane (UV unwrapped) to the scene.
Use Corona Light Material on it.
Apply texture to the material Emission Color.
Set Directionality somewhere around 1.5~2.0 (the sharper you want it to be, the longer it takes to render/clear)
Set Multiplier to your preference (higher the value, also greater the noise).

Notes:
Textures can be used with IES.
IES matrix is somewhat off:
- Translate (Location): to get proper location you have to have Keep Sharp checked & take the mesh/plane size into account,
- Rotation: to get rotation of 90° enter value 4500°, basically multiply by 50.
- Scale does nothing (Why is there IDK)
- If IES is translated/positioned into the same center/location where emitter/mesh is, self shadowing occurs (*pink).

&comparison VCM vs PT (hint to make composites ;)
(http://i.imgur.com/ObZFzb8.gif)

scene file attached, IES generated here, used random textures from web (not included)...
hope it works out for you

EDIT:
Ah, Glen beat me to it, thanks :D
Title: Re: Gobo Spotlight
Post by: blanchg on 2017-05-30, 02:26:02
Thanks for the example that helps too!

I have raised an issue with the IES Matrix stuff (https://corona-renderer.com/bugs/view.php?id=2334). 

I didn't realize that higher rotations worked! :D Maybe I can do something about that then.

Title: Re: Gobo Spotlight
Post by: Asticles on 2017-05-31, 19:49:17
Thanks everybody for your answers!

I was trying with directionality values below 1, thanks!

Is it possible to hide the mesh projector? (unseen by camera or such)?
Title: Re: Gobo Spotlight
Post by: Asticles on 2017-05-31, 20:23:52
Ok, setting opacity to black on the surface hiddens it.
Now I would like to know how to prevent the double sided luminosity and hiding the entire object.
Title: Re: Gobo Spotlight
Post by: blanchg on 2017-05-31, 23:55:17
Use a RaySwitcher node and only connect your light to the "normal" input
Title: Re: Gobo Spotlight
Post by: burnin on 2017-06-01, 01:41:41
Also, in the file posted above, emitters are infront of the camera - check it, learn... ;) the only problem remains with IES.
Title: Re: Gobo Spotlight
Post by: Asticles on 2017-06-01, 09:22:52
You're awesome! Thanks! :)
Title: Re: Gobo Spotlight
Post by: Asticles on 2017-06-01, 09:36:30
I've seen that increasing Area Light Sample Multiplier in corona render settings helps a lot to solve the gobo, but vcm with bdpt is by far faster with it.

Regards.
Title: Re: Gobo Spotlight
Post by: Asticles on 2017-06-01, 10:40:06
Hi all,

I've discovered that subdividing the emitter makes a difference in the image result, as you can see on the images attached.

Regards!


Title: Re: Gobo Spotlight
Post by: blanchg on 2017-06-01, 10:41:19
Nice find
Title: Re: Gobo Spotlight
Post by: burnin on 2017-06-01, 14:38:04
Hi all,

I've discovered that subdividing the emitter makes a difference in the image result, as you can see on the images attached.

Regards!

True, as it also rises the number of lights (emitters) - for every triangle, becomes a separate light.
So take it into account if you're using high poly counts as it may slow down rendering dramatically (don't know if optimizations for thousands of lights are implemented yet). There were some mentioning on the forums - need to look around.
Title: Re: Gobo Spotlight
Post by: melviso on 2017-06-18, 16:14:59
@Asticles
Thanks a ton, for sharing your findings. You have no idea how you helped me figure out a problem. :-)