# Need help with Volumetric Post-Processing on a circular mesh

**URL:** <https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189>\
**Category:** Questions\
**Tags:** lighting, postprocessing\
**Created:** [May 28, 2023, 3:10am UTC](https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189 "2023-05-28T03:10:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MutantPiggieGolem1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mutantpiggiegolem1/32/32554_2.png) [@MutantPiggieGolem1](https://forum.babylonjs.com/u/MutantPiggieGolem1)\
**Post date:** [May 28, 2023, 3:10am UTC](https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189/1 "2023-05-28T03:10:01Z")

</div>

Here is a boiled-down version of my code:

> **[Babylon.js Playground](https://playground.babylonjs.com/#L3EY1R%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

I want to render godrays on a circular mesh (because the default square looks silly as a sun)  
Every functioning way I’ve seen to do this uses a texture, but I don’t want to go out of my way for that nor load extra resources.

There seems to be a qualitative difference between a custom-created mesh and the default one generated by VolumetricLightScatteringPostProcess, but I can’t figure it out.

How can I get these to render properly? I’d really like nice light shafting.

---

<div class="post-metadata">

**Author:** ![jeremy-coleman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jeremy-coleman/32/15493_2.png) [@jeremy-coleman](https://forum.babylonjs.com/u/jeremy-coleman)\
**Post date:** [May 28, 2023, 4:20am UTC](https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189/2 "2023-05-28T04:20:13Z")

</div>

i think, you must use a texture for the postprocessing because you have to override the default material of the source mesh. here is example of what you want right? i know you said you’ve already seen, but just putting here for discussion  
.[https://playground.babylonjs.com/#AU5641#263](https://playground.babylonjs.com/#AU5641#263)

fwiw, there is also this, which is using geometry and no postprocessing  
.[GitHub - evolution-gaming/BabylonJS-Godrays: Fast, spectacular, configurable and lightweight god rays plugin for BabylonJS](https://github.com/evolution-gaming/BabylonJS-Godrays)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 28, 2023, 11:28am UTC](https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189/3 "2023-05-28T11:28:03Z")

</div>

You should set the emissive color:

> **[Babylon.js Playground](https://playground.babylonjs.com/#L3EY1R%232)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![MutantPiggieGolem1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mutantpiggiegolem1/32/32554_2.png) [@MutantPiggieGolem1](https://forum.babylonjs.com/u/MutantPiggieGolem1)\
**Post date:** [May 28, 2023, 6:10pm UTC](https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189/4 "2023-05-28T18:10:35Z")

</div>

this works great! is there any way I can have the mesh be invisible though? I’m trying to add effects to a skybox so I can’t really have visible geometry

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 28, 2023, 6:53pm UTC](https://forum.babylonjs.com/t/need-help-with-volumetric-post-processing-on-a-circular-mesh/41189/5 "2023-05-28T18:53:20Z")

</div>

You can make the mesh invisible like this:

> **[Babylon.js Playground](https://playground.babylonjs.com/#L3EY1R%233)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

But it won’t change the output (as you can see in the PG): the volumetric effect is based on the mesh being rendered in an off-screen RTT and being composited with the scene in a specific way.

Off-screen RTT:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/6/46e4d36b5689350fc950964f68ec8fc36cd72221.png)

Scene:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/1/8/184b50a09f4a6b86fa0f661a6288c8ca66bf9a2b.png)  
(notice that the sun is not rendered in this screenshot)

The compositing:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/9/b982c89ca7e3370df67146865832af14a3f2655f.png)
