|
|
Thomas de Groot wrote:
> OK. Time for one of my stupid questions.
>
> From one function, I want to render an isosurface as well as a height_field,
> following Mike Williams' tutorial. After some trial and error, I obtain the
> image posted here. The problem is that the height_field (to the right) is
> not centered at exactly the same location as the isosurface (to the left).
> And I am unable to find out why, or what I should do about it. I am sure the
> answer is ridiculously simple and if a gentle soul could help me in my
> darkness, I would be most grateful :-)
>
> I shall post the scene file in p.b.s-f under the same name.
>
> Thanks (many!)
>
> Thomas
>
>
>
The problematic code is :
[...]
isosurface {
function {y - P(x, 0, 1-z)}
[...]
which you can replace with
[...]
isosurface {
function {y - P(x, 0, -z)}
[...]
which works fine :-) Amazing what a nasty char can do...
The explanation is that you just want to reverse the z-axis to be
coherent with the height field. By writing P(x, 0, 1-z) not only do you
reverse the z axis, but you translate it as well...
Hope this helps
--
Vincent
Post a reply to this message
|
|