View Full Version : blending texture in relation to camera?
11-20-2008, 02:32 PM
I hope I can explain what I need.....
- We have a scene with an big object (e.g. a meadow)
- Simple: A huge plane as floor with a grass texture on it.
- This looks fine in the distance - but not near the camera
- A texture with more details looks fine near camera but ugly in distance
Now I want to project a second texture with more details on the plane and reveal it only near the camera with a mask. This mask should be always in front of camera and blend the detailed texture into the bigger one in a specified distance....
Any solutions out there?
11-20-2008, 09:51 PM
you could use a simple depth shader ..that one which uses sampler info, setrange and multiply node..
or you can pipe a mib_texture_vector into a ramps z- coordinate and use it somehow in screenspace (just a thought) not sure if this works correctly in this case.
or you just use a texture projected ramp from top and parent it to the cam..
you could also render both passes if it renders fast and tweak with a z-depth in comp.
there are several other ways, ..if you're not that advanced in shading then i suggest using the texture projection workflow.
Here's a quick example using sorath's first suggestion.
11-21-2008, 08:21 AM
thx for your RE. I think I have now a solution....
I used a samplerInfo, reverse, setRange and a ramp
SamplerInfo.pointCameraZ -> reverse.inputX
reverse.outputX -> setRange.valueX
setRange.outValueX -> ramp.vCoord
works well for me :)
Can't see any example - did I miss somethink?
Thanks to you both!
Looks like I didnt attach it correctly :argh:
Oh well, what you just described is all that it was, except I connected the setRange out to the blender of a blendColors node so you could connect a different texture to each of the color inputs.
Sounds like you have it under control though.
11-21-2008, 01:23 PM
well with a ramp I'm able to adjust the blending region and the smoothness of my border...
I think with blendcolor I'm not so comfortable to tweak this....
Again thank you for your time :)
11-21-2008, 01:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.