Hi Depthkit Team,
I apply particles VFX which makes a Studio character semi-transparent. Because we see the back side of the character, it reveals that the figure is empty inside. This might be awkward for the project I’m currently working on. See attached picture for instance. We want to get the impression that the figure is full-bodied while having semi-transparent point-cloud VFX.
Is there a way to either occlude rear-facing particles or fill out the figure with point cloud mass to make it a monolith semi-transparent sculpture?
Thank you for your advice.
this would rise your point load in unity and the need of more performance … normally the aim is to reduce points to get it more fluent playing in higher FPS … so fill the body with ponits i would normally avoid … maybe the “lite” player which actually only renders the from the camera(playercontroller) visible side of the asset … but i new experimented with the lite in combination with VFX point cloud look … maybe @CoryAllen can say here more to this issue …
These are good points.
Since it’s not real point cloud, but VFX particles imitation, maybe it’s not decreasing performance too heavily.
Lite player currently only works with built-in RP, as far as I know, thus no VFX graph is possible.
@NikitaShokhov I checked with and @James and @Tim and it sounds like you can mask the rear-facing particles by adding a mesh/solid look to your asset (can be low-density for performance), but only write to the depth buffer so that it remains invisible in the render, but mask any particles behind it. Apparently this was done using the legacy Depthkit Unity plugin and legacy Depthkit Visualize app, but has not been rebuilt using the modern packages.
Sounds promising. But how exactly to do this? I have never done it, and after some search, it’s unclear, whether it’s just Shader Graph modification or a complex programming.
Hi @CoryAllen ,
I solved the shader, the depth buffer only approach works exactly as I wanted. Thanks a lot to you, @James, and @Tim.
Glad to hear! If you are able to share how you accomplished this, I can try it myself and integrate that into our documentation.
@CoryAllen, Sure. It might be nice to include instructions about this issue.
For me, it was balancing between transparency of VFX and the shader. So we have a range of possibilities between only VFX particles visible and no mesh at all, and only mesh visible and no particles.
Now, how I accomplished the shader to be able to control its transparency and avoid seeing the character’s rear-facing mesh. If it’s Unlit shader, check these two boxes Transparent Depth Prepass in Material > Surface Options; and in Shader Graph > Graph Inspector. I also exposed Alpha property for quicker adjusting transparency.
Highlighted in orange:
If I uncheck one of the boxes, we see through the front surface. Highlighted in red:
If I want to make the mesh completely invisible with Alpha, the character with VFX particles looks nicely full-bodied (doesn’t look as it’s empty inside):
Let me know if you’re able to repeat it and if you have questions.
@NikitaShokhov Thanks for sharing!