I’m starting to test out the Bake to Texture mode of the standard particle system in Polyspatial and seeing something strange… I have a simple default particle system in Mesh render mode with a Cube mesh and a URP/Lit material:
You’ll probably have better luck using the Universal Render Pipeline/Particles/Lit shader for the material.
Bake to Texture requires that we use a custom shader graph rather than the original shader (one of the ones in Packages/com.unity.polyspatial/Resources/Shaders/BakeToTextureParticles/ShaderGraph), and it’s possible that we didn’t test that the conversion works with the non-particle-system `Universal Render Pipeline/Lit’ material.
Ooops, scratch that; it appears there is no Packages/com.unity.polyspatial/Resources/Shaders/BakeToTextureParticles/ShaderGraph/RenderParticlesFromTextureLit_Mesh.shadergraph, and that we don’t currently support lit mesh bake-to-texture particles. @connorbell-u may know if support for this is forthcoming.
thanks @connorbell-u appreciate it… I can test it out once implemented if you’d like
also a quick question if you don’t mind, do all particle system settings/shaders (with Mesh Renderer) result in each particle being sorted separately, as in they will not interpenetrate? I’m basically trying to use a particle system as an instancer but having them pop in front of each other when changing depths is jarring. thanks!
Have you tried setting the Particle System’s sort mode to depth? I’ve seen them pop as you described before when there’s no sorting mode set (which I believe is the default setting).
yes that was closest mode to what I wanted, but still only sorted per particle, they don’t interpenetrate… also I was using Bake to Mesh mode, I wasn’t able to get Replicate Properties to work with my setup. I can take a quick video if you’d like
actually @connorbell-u I just set up a new particle system test in Unity 6 in Polyspatial with Bake to Mesh, Mesh Renderer (a cube) and tried a bunch of combinations of Sort Mode and Render Alignments and it’s hard to tell if they are changing anything… The sorting seems like None and no particles are overlapping. I also tried both URP/Lit and URP/Particles/Lit, not seeing any differences…
Edit: Do you have an ARSession in your scene? Also if you have a VolumeCamera, is it unbounded?
I also tried both URP/Lit and URP/Particles/Lit, not seeing any differences…
You mean specifically no differences with respect to the sorting?
Thanks!
Edit 2: After replicating the issue, I realized that the particle sorting currently doesn’t function properly over play to Device. After making a standalone build that fixed the sorting issue for me. Are you perhaps iterating over Play to Device?
ok sorry about that, when I had revisited my older project I simplified my test case and removed the ARSession by mistake (the camera is unbounded)… Adding that back and the sorting is now correct, the different modes are having an effect (makes sense, you need the head pose). The original issue of the meshes not interpenetrating is still there though, have you been able to repro that in your test? Is that expected? This is testing on device:
kind of hard to see but if you look closely the particles are popping in front of each other as they cross depths
This is Bake to Mesh, Sort Mode: By Depth, Render Alignment: World, URP/Particles/Lit
Hey @bzor, good news! My colleague @kapolka shared with me that you should be able to address by adding a VisionOSSortingGroup component to the particle system and setting the depth pass to be Unseparated or PrePass, along with adding the particle system to the list of renderers. This is because we implicitly set the depth pass for particle systems in RK to post.
hi @connorbell-u great news! took me a sec there but I have it working… it was my last solution to try before switching to native RealityKit after some roadblocks with Stereo Render Targets and an old school instancing system… this is exactly what I need.
my final settings:
sorting mode: By Depth, render align: local, sorting group with depth pass: unseparated and the bit that was tripping me up was that I needed to use the URP/Lit shader rather than URP/Particles/Lit.