How to let image texture take 3d object coordinate as input? #546
-
I'm planning to make a procedual landscape material. I am using object coordinate instead uv coordinate for image texture (landscape is also procedual, so we don't have uv). the result looks weird because one direction of object coordinate is ignored. Like below, z axis is ignored, so texture in z is scaled too much |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
So I believe the EVEE image texture node can receive a vec3 UV and handles the projection method which also requires the generated Normals to decide how the object coordinates being used in place of the UVs will map to the image. I am not sure if there is a built in way to do this right now but luckily Malt is amazing and flexible! I came across a video a little while ago meant for godot about cheap non triplanar mapping, it was helpful for me to get a better idea about some of this. here is a Malt node version of essentially that. But the downside is no fancy blending like in vanilla Evee. But we also can borrow some of the shader code from Blender's source and implement it as a Malt plugin perhaps? Hope this helps |
Beta Was this translation helpful? Give feedback.
-
Hi @HSDSZ Sorry to revive this old thread but II found this post trying to figure out how to create UVless decals with a similar method and needed some help I was thinking on maybe using just a simple empty perpendicular to the surface and take the empty position as an input and project the image in a similar manner but based on the empty position and scale just like one would do on eevee. But for that to work what else should I change? I was thinking on using a second geometry input node for the empty but also I was thinking on how a lot of decal nodes on eevee have a treshold to control how much of the image is projected on the axis of the empty to account for flat tapers and to flood objects that are behind the main object The geometry node input is self referential so, would I have to use the inline code node for getting the position of another object? What if I wanted to update the object used every time I want to create a decal? Do I have to write a node to avoid having to repeat that process every time? I really don't know much about this so I just wanted to be pointed in the right direction |
Beta Was this translation helpful? Give feedback.
So I believe the EVEE image texture node can receive a vec3 UV and handles the projection method which also requires the generated Normals to decide how the object coordinates being used in place of the UVs will map to the image.
I am not sure if there is a built in way to do this right now but luckily Malt is amazing and flexible!
I came across a video a little while ago meant for godot about cheap non triplanar mapping, it was helpful for me to get a better idea about some of this. here is a Malt node version of essentially that. But the downside is no fancy blending like in vanilla Evee.
But we also can borrow some of the shader code from Blender's source and implement it as a Malt pl…