POV-Ray : Newsgroups : povray.binaries.images : smooth height_fields : Re: smooth height_fields Server Time
16 Aug 2024 08:17:09 EDT (-0400)
  Re: smooth height_fields  
From: Zeger Knaepen
Date: 2 Mar 2002 13:04:54
Message: <3c811446$1@news.povray.org>
> I'm surprised the left result is so bad.
so am I...

> But how did you make the right one?
2 while loops.  The first one calculates a matrix of locations based on the
bozo-pattern, which is then used in the second loop to place triangles and
calculate normals.

> Probably the difference is that more normals are averaged.
maybe, but it almost looks like it just runs a smooth-filter on the final
image.  You can still see the edges of the triangles, but they're blurry.
Actually an interesting effect, but rather useless imho.

> But you see, I'm really *fighting* with a macro to calc normals to a
> triangle heightfield.. It's crazy, I code as "clean" as I can, and week
> after week I return to my code to find the bugs, but ...argh... I know how
> to calculate the normal of a triangle, but my macro construct the
> heightfield in a (better) way that means, sometimes there are 3, 4, 5 or 6
> faces connected to a vertex.
>
> Any help will be appriciated!  It's a macro that I think would be
generally
> useful to many people.
This is how I did it, but I don't think it would be of much help.  To
calculate the normal of one point of a triangle, I average the normals of
every triangle that shares that point.  It's easy to know which triangles
share that point in a simple matrix of triangles, but I'm not sure how you
would do it with what you're doing...

cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"If you could see what I've seen with your eyes."


Post a reply to this message

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