![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Zeger Knaepen wrote:
>
> How does POV-Ray smooth height_fields? The results aren't really good in
> any case.
> At the left is an ordinary smoothed height_field, at the right the same
> shape using smooth_triangles.
> Wouldn't it be possible to use a better way of smoothing height_fields? As
> it is now, the smooth-keyword in height_fields isn't really useful...
I can't say for sure of course, but those two shapes really don't seem to
have the same geometry to me.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Feb. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> I can't say for sure of course, but those two shapes really don't seem to
> have the same geometry to me.
Believe me, they have :)
They're both the bozo-pattern on the xz-plane from x=0 to 1 and z=0 to 1.
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"The only thing that helps me maintain my slender grip on reality is the
friendship I share with my collection of singing potatoes."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Zeger Knaepen wrote:
>
> > I can't say for sure of course, but those two shapes really don't seem to
> > have the same geometry to me.
> Believe me, they have :)
>
> They're both the bozo-pattern on the xz-plane from x=0 to 1 and z=0 to 1.
>
That's not what i meant, the triangle vertices need to be the same for
comparable results.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Feb. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> That's not what i meant, the triangle vertices need to be the same for
> comparable results.
Maybe it's easier to compare this way: I mirrored one of them and moved the
light.
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"we will make spears twice as long as a man, but some men are longer than
others"
Post a reply to this message
Attachments:
Download 'heightfield2.jpg' (15 KB)
Preview of image 'heightfield2.jpg'
![heightfield2.jpg](/povray.binaries.images/attachment/%3C3c81154e%40news.povray.org%3E/heightfield2.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I don't think that it's practical to write a smoothing macro for all meshes,
although I think Warp did one. The calculations just take too long and
require that the user construct specific types of arrays to put into the
macro(at least coding it in PoV.) It's so much faster to just create a
little algorithm for whatever case on which you happen to be working.
-Shay
"Hugo" <hua### [at] post3 tele dk> wrote in message
news:3c8105e5@news.povray.org...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> > 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...
I'm only after a macro that average normals based on a matrix, like in
ordinary heightfields. The tricky thing is that the faces can be connected
in 2 ways, based on what serves the curvature best.. I don't know the
mathematical names for it.. I call them "quad faces".. Two faces form a
square, but this can happen in 2 ways.. I use both ways and I need a macro
to smooth that matrix.. I think, ordinary heightfields also swap the
quad-faces depending on the curvature..
If your macro can handle this - please ! ...share it. :o)
Or if I didn't make myself clear, I can try again.
Regards,
Hugo
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Zeger Knaepen wrote:
>
> > That's not what i meant, the triangle vertices need to be the same for
> > comparable results.
> Maybe it's easier to compare this way: I mirrored one of them and moved the
> light.
>
This obviously does not change anything, to really judge whether the
heightfield smoothing is broken would require perfectly identical
geometry.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Feb. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> This obviously does not change anything, to really judge whether the
> heightfield smoothing is broken would require perfectly identical
> geometry.
I really don't understand what you mean. These two object have exactly the
same geometry, haven't they? They are derived from the same pattern, they
have the same shape, the same height, and in this image the same shading,
only the way they are smoothed is different. If you still don't believe me
this 2 objects have the same shape, maybe I should post an unsmoothed
version, then you'll see they are exactly the same (which they should be),
but with smoothing, they are not (which is not good of course :)
Hmmm, I just rendered this, and they are indeed not exactly the same :)
Oh, I see, I forgot the hf_gray_16 in the height_field. Here is the
smoothed version *with* the hf_gray_16. Still rather ugly compared to the
right one, I think. But this time the unsmoothed version seems to be
exactly the same!
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"Brace yourself for a bit of a shock, Lister, but I just saw you die."
Post a reply to this message
Attachments:
Download 'heightfield3.jpg' (15 KB)
Preview of image 'heightfield3.jpg'
![heightfield3.jpg](/povray.binaries.images/attachment/%3C3c8127ef%40news.povray.org%3E/heightfield3.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> I'm only after a macro that average normals based on a matrix, like in
> ordinary heightfields. The tricky thing is that the faces can be connected
> in 2 ways, based on what serves the curvature best.. I don't know the
> mathematical names for it.. I call them "quad faces".. Two faces form a
> square, but this can happen in 2 ways.. I use both ways and I need a macro
> to smooth that matrix.. I think, ordinary heightfields also swap the
> quad-faces depending on the curvature..
if that is true, the geometry of my own height_field-like object still isn't
the same as the real height_field.
But, Christoph: *if* it's true what Hugo says here, the results of the real
height_fields should be *better* than those of my own version, which it
clearly isn't.
> If your macro can handle this - please ! ...share it. :o)
> Or if I didn't make myself clear, I can try again.
:)
At the moment there isn't really a macro (yet), but I'll post my code to
p.b.s-f
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"It's my duty; my duty as a complete and utter bastard."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |