Get actual scale per instance object in driver for point light radius

I wasn’t quite sure where to put this, so I stuck it here.
I’ve used the Scatter Objects addon to scatter several crystals on a cave wall. This creates a mesh with series of faces that a crystal object is parented to using Instancing > Faces, with “Scale by Face Size” active. As a result, each instance is scaled differently, which is not reflected in the object’s Scale properties.
The crystal object has a point light parented to it, resulting in a light at the center of each crystal. The problem is, the lights’ radii are unaffected by their scale, so while the lights may be scaled along with their parent, their radii are not.
I need a driver controlling the radius to reference each instance’s effective scale individually, rather than the scale of the base object before parenting, so that each scattered instance has it’s radius set to match the size of the parent crystal instance.
I’ve googled every relevant query I could possibly think of and come up empty handed. The closest I could find was using “make instances real” and programming the radii individually, which would be an absolute pain in the neck. Anyone have a solution?

Well, what about using a mesh light instead of a real light source? In this case the intensity of the light will be directly connected to its size, since smaller area = less light emission.

And if instead of using any of those why don’t you make the crystals to emit light themselves? Just made this example in 5 minutes using a gradient texture to control the emission shader connected to the volume socket of the material output node. I am not sure if this is the kind of thing you are expecting but it’s the way I would make it.

Same crystal applied to a particle system in a sphere. Only to see if this could be the effect you are trying to reproduce. There is no other light source in this image. All the light comes from the crystals.

In a perfect world, that’s exactly what I’d do. But I was trying to avoid the performance cost of using volumes.

1 Like

Mesh lights don’t involve volumetrics if you use them as a simple emission material OR mix the emission shader with a transparent shader.

You have almost the same effect avoiding the volumetrics.

Same scene, similar effect, no volumetrics.

This is the current progression of my renders (including compositing). I was initially trying to use emission from the surface, but it kept washing out the colors of the crystals if I made it bright enough to noticeably illuminate the surrounding rock.


I wound up finding a different approach that worked okay-ish, but I don’t recall off the top of my head exactly what that was. It’s been awhile since I worked on that project.

What version of Blender are you using? I made a test with both setups i said before and the render times are exactly the same. 57 seconds at 1920 x 1080, 64 samples in Cycles with optix denoiser. Nvidia GeForce GTX 1050 Ti.

I can send you the blender file if you want.

Oh, now I’ve paid attention to the date of the post I did not see before. It’s one month old. I am sorry I did not answer before. Anyway, it was a nice conversation. :wink: