Planetside Software Forums

General => Terragen Discussion => Topic started by: Hannes on April 07, 2013, 08:41:27 AM

Title: UV mapping of a terrain BEFORE displacement?
Post by: Hannes on April 07, 2013, 08:41:27 AM
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.
Title: Re: UV mapping of a terrain BEFORE displacement?
Post by: Matt on April 08, 2013, 12:19:52 AM
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
Title: Re: UV mapping of a terrain BEFORE displacement?
Post by: Hannes on April 08, 2013, 01:00:38 AM
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.
Title: Re: UV mapping of a terrain BEFORE displacement?
Post by: Hannes on April 08, 2013, 01:03:46 AM
Here is the file with the texture. Maybe you can have a look?
Title: Re: UV mapping of a terrain BEFORE displacement?
Post by: Dune on April 08, 2013, 03:03:36 AM
Is this your answer?
Title: Re: UV mapping of a terrain BEFORE displacement?
Post by: Matt on April 08, 2013, 03:06:35 AM
I didn't see any horizontal displacement in your test, Hannes. I thought that's what you wanted to do.
Title: Re: UV mapping of a terrain BEFORE displacement?
Post by: Hannes on April 08, 2013, 09:40:50 AM
@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.