POV-Ray : Newsgroups : povray.binaries.scene-files : How to synchronize texture heightfield with texture colors : Re: How to synchronize texture heightfield with texture colors Server Time
28 Apr 2024 05:54:26 EDT (-0400)
  Re: How to synchronize texture heightfield with texture colors  
From: Christian Froeschlin
Date: 8 Jan 2011 06:34:03
Message: <4d284bab@news.povray.org>
m.steiger wrote:

> I was trying to synchronize a heightfield defined by a crackle texture
> with a color texture that also uses a crackle pattern.
> 
> Because of using a color texture with normal shading this should give a 
 > great 3d impression.

I'm not sure it makes sense to use normal shading on
a height_field with identical patterns. Basically you
you already have the 3d geometry the normals are
intended to fake.

> But the scaling seems to be wrong.
> Picture 1 shows the naked heightfield.
> Picture 2 a colored heightfield example.
> But as you can see the heights are colored wrong.
> 
> Any idea how to syncronize this 2 textures ?

Things which come to mind

1. height_field coordinates may be reversed from what you'd
    normally expect, so you might need to rotate it (at leasts
    when using image files, not sure about function). You can
    figure this out you replace crackle with some regular
    asymmetric pattern (e.g. gradient x or z) to see if the
    slope is as you expect.

2. when coloring the height_field, crackle pattern is
    sampled with y > 0 depending on height, while only
    the x-z plane is used when defining the hf itself.
    Try scaling the texture up by <1,10000,1> or so
    to reduce this effect.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.