Tiling rotated models don't fit

lighting
#1

I recently posted a game I was working on at


It does have a problem I don’t understand. When I tile the rotated objects the reflection doesn’t fit anymore.
I made a playground scene where the problem is isolated and a bit more clear.

https://www.babylonjs-playground.com/#0K8EYN#67

Here you can still see the individual objects (it should look the same as when line 39 (newClone.rotate) is disabled). Does anybody have an idea what I am doing wrong?

0 Likes

#2

Pinging @sebavan

0 Likes

#4

Actually, it is linked to the presence of the normal map. I guess as David Mentionned our normal are not perfectly 010 and this can translate in way bigger reflection vector errors.

You could then either not rely on bumpMap, or export the tangents of your model.

0 Likes

#5

Thanks for your advice.
I broke the meshes in two parts. A part with the flat pieces and a part with everyting else. With the flat pieces I skip the normal map. For the other part I keep the normal map because I use it for the rounded edges. This does fix the problem.
It is not perfect but thats because my tiling is not perfect. I think I have to build it different to get perfect tiling with substance painter, but I will save that for a next project.

0 Likes

#6

btw your game is amazing!

0 Likes