How mirror object with logic node (no flip normals)?

Hi, all!

Is it possible to flip an object along the X-axis without using code? If you make a scale of -1, then the object is mirrored, but at the same time the normals are inverted (Flip).

I’ve been trying to find a solution on my own for several days now (((

I do not know of any. If you want to improve your demos, you could offer an additional control which enables people to enter the house and see the rooms. You could use furniture with cc-license from sh3d. Also on your company website there is no mentioning whether the plans comprise any BIM data. At least i could not see it on a short visit. Because if they offer BIM data, it would be a huge plus and should be advertised. People need to know how much to buy from each material to build and calculate.
My 2 rubel.

1 Like

hi,

im afraid that’s might not be possible via logic nodes as yet. Maybe possible with Haxe, but is a little tricky. Since mirroring is not an object transformation but happens at vertex level.

So, one possibility is to make pre-made mirror objects with correct normals and then spawn them when required. You can use the spawn object by name node

1 Like

It doesn’t sound bad, but for a start it is worth solving the not difficult task of making mirror versions)
The rest is much more complicated. After.

The model will have to be loaded twice over the network.

The thought of replacing the model came first.

Not so complicated? You just have to know how the faces are internally stored and multiply each component of their normal vector by minus 1 after scaling. To know how to do this at runtime you find easy? You might be underestimating it.

1 Like

I’m an architectural engineer, not a programmer)
It is easier to do with code than with nodes, but with nodes it is clearer for a person who does not understand this.
I do not know the syntax of the programming language and other rules.

I just remembered…

You could try to have a two-sided material on the object and then negate the scale at runtime.

You can enable “two sided” material parameter in Blender Material settings panel -> Armory settings

1 Like

That would lead to a similar network load as sending two different models as it doubles face count. Sending to different models is more flexible cause not bound to only mirrored ones.

The material is already double-sided. If it is not like that, then it becomes transparent from the back. But it darkens when mirrored.

Is it?
The material is designated as two-sided, but from the extra data there may be an indication that the faces would not be hide.

Thank you for your attention to the question.
But so far it seems to me that this cannot be solved by nodes.
I will wait for the implementation of such an opportunity. . .

1 Like

No, it does not double the number of faces. “two sided” just changes how ligting is calculated in the fragment shader.

Sources:

1 Like

If there was a way to reset the scale by means of the armory after decreasing it to -1 it would remove all problems (maybe).

I’m not quite sure if all problems would be solved by just inverting normals. Maybe textures don’t match up after making the scale -1. Need to test this as well.

Thanks for the correction. Was to tired for correct self-check. Should not have posted in first place. I hope it works out that way, would be nice. Tested double-sided material (checker plane cloth) and it seems to work. But i am wondering why my texture paint on the PBR material does not show up in Armory3d (green painted eyes). Also the gold turned out more brownish…
See yourself:


3 Likes