POV-Ray : Newsgroups : povray.binaries.images : Joined Bicubic Patches - how to do? Server Time
5 Nov 2024 04:26:56 EST (-0500)
  Joined Bicubic Patches - how to do? (Message 1 to 5 of 5)  
From: Yadgar
Subject: Joined Bicubic Patches - how to do?
Date: 29 Nov 2005 05:30:09
Message: <438C5947.5010604@gmx.de>
High!

In order to get really smooth surfaces from 2D height maps (not just 
playing with normals!), I tried to write a procedure for generating 
joined 4 x 4 (each overlapping by one column or row) bicubic patches 
(see code posted in p.b.s-f) form 16bit images usually used for 
heightfields.

But when doing a test render, I had to realize that the two 4 x 4 
sections do not align in the y direction, as you can see in the image 
attached here! What went wrong?

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download 'patch.png' (18 KB)

Preview of image 'patch.png'
patch.png


 

From: Jim Charter
Subject: Re: Joined Bicubic Patches - how to do?
Date: 29 Nov 2005 12:24:20
Message: <438c8ec4@news.povray.org>
Yadgar wrote:
> High!
> 
> In order to get really smooth surfaces from 2D height maps (not just 
> playing with normals!), I tried to write a procedure for generating 
> joined 4 x 4 (each overlapping by one column or row) bicubic patches 
> (see code posted in p.b.s-f) form 16bit images usually used for 
> heightfields.
> 
> But when doing a test render, I had to realize that the two 4 x 4 
> sections do not align in the y direction, as you can see in the image 
> attached here! What went wrong?
>
I don't know but in the past I have had reasonable results joining them 
edge to edge to recreate a surface based on a pattern such as bozo.


Post a reply to this message

From: Tim Nikias
Subject: Re: Joined Bicubic Patches - how to do?
Date: 29 Nov 2005 14:05:39
Message: <438ca683$1@news.povray.org>
> But when doing a test render, I had to realize that the two 4 x 4
> sections do not align in the y direction, as you can see in the image
> attached here! What went wrong?

Inner Points on the bicubic patch are just control points, not points *on*
the surface. If you overlap them like that, they don't add up. What you're
after is 2nd order continuancy, e.g. the relation controlpoint-edgevertex
from one patch to the next need to be the same. They share the same border.

Regards,
Tim

-- 
aka "Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Joined Bicubic Patches - how to do?
Date: 29 Nov 2005 14:19:04
Message: <438ca9a8$1@news.povray.org>
High!

Tim Nikias wrote:

> Inner Points on the bicubic patch are just control points, not points *on*
> the surface. If you overlap them like that, they don't add up. What you're
> after is 2nd order continuancy, e.g. the relation controlpoint-edgevertex
> from one patch to the next need to be the same. They share the same border.

In other words, they just mustn't overlap?

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Tim Nikias
Subject: Re: Joined Bicubic Patches - how to do?
Date: 29 Nov 2005 14:47:23
Message: <438cb04b@news.povray.org>
> In other words, they just mustn't overlap?

Right. The only points that will actually be precisly where the
control-point is placed are the four corners, everything else is used as
control points a la the typical bicubic interpolations. So, like I said, to
line patches up, the edges of bordering patches need the same vertices. The
inner four control points are crucial to create a seamless surface. If a
patch on the left side has control points "below" the surface, the patch
will move upwards at the edge. Hence, the control points on the next patch
need to be "above" the surface in such a way that the angle at the edges are
the same.

There's an image on this page which shows that the control points just build
a bounding cage:
http://www.ece.eps.hw.ac.uk/~dml/cgonline/hyper00/curvesurf/bicub.html

As you can see, the relation/curvature along the edge is determined by the
cage, and joined bicubic-patches should have the same angle/steepness at
edges to avoid seams.

Regards,
Tim

-- 
aka "Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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