[Materials + Particles] Couple questions about translucent volumetric lighting

Firstly, is it possible to use the light intensity value as an input? I would like to use the light intensity as the driving factor for opacity so that when in the dark the particles are completely transparent however in the light they’re opaque. The problem I’m having is even in pitch black they seem to still be lit slightly somehow, as shown in the screenshot below.

The second question is, is it also possible to control the scattering of light within a particle? I’m not sure if this is done on purpose or not, but when light enters a particle it seems to scatter within the particle causing adjacent particles to become lit, and hence starting a chain reaction which leads to particles being lit when exposed light isn’t accessible to the particle. You can see what I mean in the below screenshot, in the majority of the undercover space the particles are receiving no light (well, “no light”, as what I discussed in my first question), however near the ceiling they seem to be receiving light from a non-existent light source (actually a directional light source, however the ceiling should still be blocking the light). I suspected this is due to particles which are spawned above the ceiling (the system spawns the particles in a volume from (500, 500, 500) to (-500, -500, -500)) leaking light into adjacent particles, and somehow light is being leaked through the surface.

However, upon further analysis it appears no matter if I move the particle system beneath the ceiling so none spawn above or in the ceiling, it still occurs. As a third question, anyone got any ideas for why this is occurring?

Bump. Anyone have any ideas?

Well, Lit particles work off of a very low-density volume texture that mixes both Pre-Computed lighting from Stationary lights and (non-precomputed) moveable lights to do the lighting. The low density means it’s probably subject to a lot of ‘leaking’.

It’s certainly not possible to add scattering (that’d be super expensive), we don’t even have realtime DGI yet let alone this :stuck_out_tongue: You can simulate scattering ‘in’ the individual particle by changing some properties in the Material, (look under Translucency Lighting) I think it’s called, there are various scatter / inscattering constants there that you can tweak. I nearly always change the colour.

This page may help:

EDIT: Sorry this is really hard to read… just got up :stuck_out_tongue:

Fair enough. And yeah I’ve messed with some of the options in the Translucency Lighting category. Can get some interesting options to change, but unfortunately the experimenting I’ve done doesn’t seem to fix or somewhat alleviate the “leaking”. Oh well, it only seems to be “leaking” in very specific conditions (I’ve got a custom skybox I’m working on with a day/night cycle along with a dynamically changing light colour based on the time of day; mornings and evenings have a golden glow while noon has a bright white glow, and in-between values are calculated through a simple curve), so not bad. Just wish my graphics card wasn’t so bogged down by translucent particles, could create some very very nice particle systems that would look superb. :stuck_out_tongue:

One more question, does the size and scale (two separate questions I’m asking rolled into one) alter how translucency lighting behaves? Or is it practically the same regardless of size? So for instance if I had a small particle blown up massively to cover a large area, would that affect the quality of lit translucency? I’d presume it would in a way, not 100% sure.

And you’re fine for difficulty of reading. :stuck_out_tongue: Honestly isn’t hard to read for me.