Looking to use a Solid Particle System to distribute trees across a scene. I have a .glb file which is my tree mesh, and another which loads in the tree positions through a collection of transformNodes.
In doing so though, all of the tree generated via the particle system seems to have been turned inside-out, reversing their normals. The original mesh is on the left, a tree rendered with a particle system on the right.
What I suspect is GLTF/B is using a special _rootNode to invert scale every thing in to convert from left handed to right handed and SPS is not taking this into account.
Maybe you could try your scene with right Handed turn on: scene.useRightHandedSystem = true;
Including the scene.useRightHandedSystem = true; does work in the P/G ti display the normals correctly.
However this raises two further issues:
I have many other imported models which then disappear/invert to broken normals.
This seems to introduce a new bug, whereby it renders fine, until you rotate the camera, at which point all the meshes disappear. This only occurs when scene.useRightHandedSystem is set to true. If you resize the window, they re-appear (this does also occur in the P/G)
Thanks @sebavan - I did have instancing in place, but performance (have 10k trees to render) was significantly worse than I seem to be getting with particles. Had about a 30 FPS drop with the instancing, with SPS only seeing about 5 FPS drop.
The negative scale works great in terms of the normals, but annoyingly I am noticing this odd lighting issue:
I’m guessing it’s because the lighting is basked onto the base mesh, then “instanced” for each particle. Where I then randomly rotate around the y-axis, the lighting doesn’t match that particular points in space?
Oddly, even though I’m using the exact same HDR as this new version of the PG, that doesn’t have the same effect.
Can only think I add 6-12 versions of the tree as a standard mesh which random y-rotations, then have a particle system for each of the versions with their respective rotation?
A reasonable workaround I’ve found is reducing the impact of direct lighting on the tree material to about 0.1/02 (to give some variation) and then increase the brightness of the albedo colour, which has a decent enough effect.