I want the transition from one to the other (across multiple objects) to be an absolute world position. How can this be done? See screenshot below for more details… ATM this setup doesn’t change the mix-line when an object is moved vertically.
This doesn’t work. It just reads whether the color at 0 (on the color ramp) is black or white and applies either/or texture to the entire object.
If you want to blend the textures instead of switching them, just use a MixRGB node, or change the colors on the color ramp. I don’t have access to your work so I can’t exactly replicate the effect you want, but if you want something to change based on vertical world position, this is how you do it. You can change it however you want, the important part is mixing a gradient texture with the Location Z coordinate
I have been using a mixRGB so it changes between one or the other texture based off z position. I just want it to be world-relative changing (eg same z position, regardless of where the object is).
I have attached the file…
MakeAPool.blend (773.7 KB)
I don’t think we’re understanding each other here:
If you want a transition line from Material A to Material B (or any blended combination of that, if you don’t want the 0 and 1), that’s always in the same z position… that’s exactly what the example I provided does. I don’t really know how to interpret what you’re looking for, because I’ve given you exactly what you’re describing…
Here again, the example I provided uses absolute world position and the mix-line changes when an object moves vertically… so what are you looking for here?
@joseph is right with this solution, but instead i would use an empty to control the mixing line, much easier with sharing object origin:
share_texture_origin.blend (103.3 KB)
What you describe you have done is exactly what I do want. It changes from mix input a to mix input b if it is above or below a certain Z value.
I applied the material setup you provided, however, in my scene and it changes the whole object material, not just the parts below a certain z height, to a different texture XD. (also I did that before my blend upload a few posts ago).
Ok gotcha. In that case, yeah, you just need a different blending mode, like @rigoletto used. Swap out the MixShader for a MixRGB and that should fix that
Both yours and his have a Vector > Mapping> node which looks different from mine. Why is that?
Again, not sure how but I have now copied YOUR node setup, and it’s the same thing. It’s making the “mix-line” relative to the object, so if I move it vertically, the mix-line remains in the same place, not updating…
I have attached the result of trying to get your node setup working…
MakeAPool_2ndHeightAttempt.blend (758.9 KB)
I think you’re on a different version of Blender.
@rigoletto 's uses an empty as the mix line coordinate, you’d need to add the empty at world origin and then choose that empty as the Object on your Texture Coordinate node
You have blender version 2.8, we are using newer version like 3.2. But that works similar in these versions.
That is an absolute world position!?
I take a look at your .blend file but i cant imagine what you want to archive. Maybe you can make a little sketching.
Ohhhhhhhhhh. I missed that, and it instantly fixes it!
The weird part is, when I first tried to do this, I put an empty in the scene, hoping to find a way to do it like this XD. Thanks for the help.