UV mapping of a terrain BEFORE displacement?

Started by Hannes, April 07, 2013, 08:41:27 AM

Previous topic - Next topic

Hannes

I'd like to make another attempt of creating a realistic animated ocean surface with foam and whitecaps. I made some experiences with 3ds max and dreamscape which creates quite realistic oceans. The key is that the surface isn't only displaced vertically but also horizontally. Applied textures are then distorted and stretched with the movement of the displacement as you can see in this example here:
http://www.youtube.com/watch?v=Z7ZNUeom5cI
Now here is my question: is it possible to apply a texture before I displace the terrain (I'll not use the water object in this case)?
I tried to find some answers in the forum, but couldn't find anything. I thought I could place another compute terrain somewhere, but that didn't work (yet).
If I could achieve some movement with the appropriate mapping similar to the one in the movie, it would be a great step forwards.

Matt

#1
Yes. If you don't have a Compute Terrain or Tex Coords from XYZ then your texture will be mapped to the original undisplaced surface. If you do have one of those nodes, just make sure it's before the displacement.

If you need to compute the normal of the displacement for any reason, use the Compute Normal node instead of the Compute Terrain so that you don't update the texture coordinates.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Hannes

Hmm, I can't get this to work. Maybe I'm missing something. I applied a checkerboard texture to my terrain as an example and in the top view you can see that the map is not distorted at all. If I put the compute terrain node before the displacement my terrain is gone. Flat. Using compute normal didn't work either.
Here is a screenshot of my settings.
I know that I can warp the image map shader with the PF, but I thought it should be possible without that.

Hannes

Here is the file with the texture. Maybe you can have a look?

Dune


Matt

I didn't see any horizontal displacement in your test, Hannes. I thought that's what you wanted to do.
Just because milk is white doesn't mean that clouds are made of milk.

Hannes

@Dune: thanks a lot! I just didn't remember the redirect shader. Great!
@Matt: thanks for your effort too. Maybe I didn't describe correctly what I wanted to achieve. It's what Dune showed in his screenshot.