UV Triplanar World
Asked Answered
C

9

0

I want to use world triplanar texture mapping but only for the initial position when an object is created.
After that I want the texture to be fixed to the object even if I move the object.
Any ideas on how to achieve this?

Conk answered 23/11, 2023 at 14:23 Comment(0)
L
0

Conk Disable "world triplanar" in material's uv properties.

Lowrey answered 23/11, 2023 at 15:9 Comment(0)
C
0

Lowrey
wouldn't that change the mapping back to the normal mapping based on the UVs?

Conk answered 23/11, 2023 at 15:58 Comment(0)
L
0

Conk No, it would use object space triplanar. Easy enough to try.

Lowrey answered 23/11, 2023 at 16:51 Comment(0)
C
0

Lowrey
Oh I see you misunderstood me.

I want to:
1: Place object with triplanar world space texture mapping.
2: Move object with fixed texture (like it would be normally)

Conk answered 23/11, 2023 at 17:35 Comment(0)
L
0

Conk How is that not object space triplanar then?

Lowrey answered 23/11, 2023 at 17:37 Comment(0)
C
0

Lowrey
Ok ok.
Imagine two equal objects.

What I want:
spawn each object at different locations with triplanar world space mapping > both objects probably look different because the location is affecting the mapping. And now if I move one object the texture should be fixed blablabla we know that part.

What I would get with object space mapping:
Two objects that look exactly the same regardless of their initial spawn position.

Conk answered 23/11, 2023 at 17:43 Comment(0)
L
0

Use object space triplanar mapping in the material then, convert material to shader, and in triplanar calculation in the shader add an offset passed via an uniform or instance custom data.

Lowrey answered 23/11, 2023 at 17:49 Comment(0)
C
0

Lowrey
This sounds like it could work. Thanks, I will try it!

Conk answered 23/11, 2023 at 20:14 Comment(0)
L
0

Conk There's no reason for it not to work 😉

Lowrey answered 23/11, 2023 at 20:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.