|
|
> As far as workarounds go, I currently know none, except for using a
> totally different primitive; if you don't need a solid, the parametric
> primitive may be the way to go, using f(u,v)=u and f(u,v)=v for the x and
> z coordinates respectively. If you absolutely need a solid, you may want
> to try the isosurface primitive, using f(x,y,z)=y-g(x,z) (with g being
> your own function) and the default threshold of 0. Or you can use SDL to
> create a mesh primitive from the function.
Thanks for the detailed analysis, after a rough look through the source for
the height field I assumed something similar was happening - I couldn't
believe it when I saw the normals were stored as 16 bit integers! I guess
the code was written in a time where every byte counted. The code seems to
be written in such a way that changing it to use floating point numbers is
straightforward (I guess the original author suspected that in the future
someone might want to change it).
I had used an isosurface originally but it was painfully slow to render.
I'll take a look at the parametric primitive, I always forget about that
one. Thanks.
Post a reply to this message
|
|