Volumetric light through the prison window

Can anyone help me in creating volumetric light in playcanvas like the below image.


Thanks in advance.

Hi @ajays3dartist,

For faking the volumetric light effect you can use a transparent plane that you orient to face the camera (although I don’t have an example in mind, you will have to search online).

For real volumetric lighting you will to have to use a post effect in most cases. There is PR (pull request) in the engine repo for a god rays effect which you can grab from the files included and use it right now (just note it works with WebGL 2.0 only):

You may also be interested in this cookie lighting example, it’s not related with your volumetric lighting question but you may find it useful for the light effect (to replace dynamic shadows with image based cookie):


1 Like