|
|
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
|
|