How can I use a world aligned texture and normal node while using parallax occlusion?

I want to use world aligned nodes to seamlessly connect my textures but it requires the texture to be texture objects and I can’t find where to put them in the graph.

I’m confused about where to put the world aligned texture with the parallax occlusion

Parallax occlusion accepts texture samples, right? That’s where the problem is, I think, because texture objects can’t be plugged into it if it only accepts texture samples. So it needs a converter node of some kind to get the texture object into the world aligned node, and connect that to the texture sample which goes in the parallax occlusion node.

Texture Object >> WorldAlignedTexture >> __________ >> Texture Sample >> Parallax Occlusion

I tried something similar in connecting a texture object to the WAT, then a wire from XYZ pin of WAT to a texture sample, and it threw an error about ‘cannot go 3float to 2float’ since texture sample is 2D. So perhaps there’s a conversion node that converts texture3D (from XYZ pin of the world align node, or WAT) to texture2D (texture sample node) and it would work. Why isn’t there simply an option on the texture sample node to choose 2D or 3D? I might send in a feature request for it.

The parallax occlusion goes into the texture samples which are then plugged into the material. I would need to somehow combine the parallax occlusion with the world alignment or be able to connect the texture samples somehow.
It still runs into a similar issue though.

You can try multiplying the texture object by the parallax occlusion.
Is the texture object able to be plugged into the World Cooridinates pin on P.O. node?
If not because something is plugged in there, how about multiplying texture object by what’s plugged into it currently. A multiply at a simple level just combines two things, not like LERP which blends between two based on a third.

I bet there’s someone in the AnswerHub who knows exactly how to set it up with parallax occlusion and world aligned texture. It might be easier for them to assist with it if you post a pic or two of the material setup so far. I tried several combinations, and the WorldCoordinate3Way node, and it still is not allowing for the use of texture samples and a texture object. It would be far simpler for the WorldAlignedTexture to accept a texture sample too, not only a texture object, and the same for the parallax occlusion node on its left side.

I agree because when trying to combine them it doesn’t account for the P.O. and places the texture object over it.

I think you’re going to need to create a material function for the world aligned aspect of it. Then call that material function within the node graph of the current material that has parallax occlusion. Tutorials are in the docs for how to create a material function. It’s either that or create the whole thing using material layers. That’d involve plugging that entire current network you have into the MakeMaterialAttributes node of a layer, then creating a layer for the world aligned aspect, and combining those layers. It actually would be easier, if you ask me, to do one of those approaches because then it’s easier to modify each effect setup (P.O. and world aligning) separately without having to disconnect and reconnect wires in one conglomerate material network…especially for debugging it would be helpful.

You can at least use it wit the World Aligned Z Axis like this
[https://i.imgur.com/GfyW0gy.jpeg]

2 Likes