I’m creating some static mesh instances using a blueprint from a csv file and I have some meshes that needs to be mirrored. The transform is -1 in the Y axis and is mapped to the Scale Y. The static mesh is mirrored correctly, but it also flips the normals.
There is, but it’s not straight forward (maybe someone knows a better way?)…
You can set a “Per Instance Custom Float” to -1 or 1 just after you’ve created the instance (you pass in the returned index of the instance).
Then in your material, you multiply the V by that custom float.
If you’ve not used per-instance custom data, I’ve got a tutorial (ignore the plugin, the concept remains) that shows a simple example at the beginning (just replace the RGB for a flip):
Mirrored in what way? I created a mesh and set its Y scale to -1 and the normals seem to be correct still, it could be possible if you made the mesh in blender that the normals in blender are inverted (a very common problem). Can I see how you are creating this? I cannot replicate your issue with my own meshes.
That doesn’t work because you’re flipping the signs of all of the normal data by inverting the scale. In order to make it work your mesh would need to have normals pointed in the opposite direction. This means either creating a new mirror object in blender, flipping the normals of this object in blender, or creating double sided normals.
I think there is a feature in blender to make your normals double sided. It might literally end up doubling the size of the object file but for relatively low poly objects this shouldn’t be a problem.
I wouldn’t go calling it a bug - it’s quite possible that to keep the ISMs as fast as possible it just ignores things like that.
The extra code to flip the normal in the Instancing routine would probably make the whole thing run slower than if you had a second mesh that was mirrored.
Hey @jjbravo I found something that would probably fix your issue without having to create new models with opposite normals. If you create a new material then go to the Material Graph and look in the details, you’ll see a checkbox called “Two Sided”. This is exactly what you’re looking for I think. It makes the renderer of this material ignore back face culling which just basically says that it will not make faces with normals facing away from the camera will still be rendered. It looks like this and is by default unchecked:
Make sure you leave it as “Opaque” though or it will look weird with the back rendered on top of the front. In my material I have it on Translucent but that’s just for the material I’m making, yours should be Opaque.
You may have already found a work around but I hope this makes things easier! Good luck!