POV-Ray : Newsgroups : povray.general : is it possible to warp a primitive or a height-field? Server Time
31 Oct 2024 14:09:35 EDT (-0400)
  is it possible to warp a primitive or a height-field? (Message 1 to 10 of 10)  
From: RAM
Subject: is it possible to warp a primitive or a height-field?
Date: 25 Jul 2005 13:20:01
Message: <web.42e51e8d3d315b497d21e22c0@news.povray.org>
Is it possible to warp or modify using noise or turbulence a primitive
object in POV? I have seen scenes that use objects like a torus or a
height-field that are greatly distorted to create fantastic objects that
bear little resemblance to the original object. Or is this something that
would have to be generated outside POV and then imported as triangles?


Post a reply to this message

From: Jim Charter
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 25 Jul 2005 14:23:02
Message: <42e52e06@news.povray.org>
RAM wrote:
> Is it possible to warp or modify using noise or turbulence a primitive
> object in POV? I have seen scenes that use objects like a torus or a
> height-field that are greatly distorted to create fantastic objects that
> bear little resemblance to the original object. Or is this something that
> would have to be generated outside POV and then imported as triangles?
> 
> 
This is done using isosurface's

Primitive shapes can be expressed as functions.  Then can then be 
combined with a noise function in various ways either to produce a 
primitive with its surface displaced to give a textured look or to 
actually "warp" the primitive.  Christoph Hormann produced an include 
file that predefines functions to produce and combine isosurface 
primitives.  It is call isocsg.inc.  Mr. Hormann also produced an 
include file called isowood.inc which specializes in producing various 
primitives displaced with vary convincing wood textures.  If you obtain 
this file you can study how he conbines primitive and noise functions to 
do things like bend a plank of wood to look like it has been warped by 
the weather.  These files are available from his website


Post a reply to this message

From: Florian Brucker
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 25 Jul 2005 14:57:47
Message: <42e5362b$1@news.povray.org>
> Christoph Hormann produced an include 
> file [...] These files are available from his website

... which can be found at

http://www-public.tu-bs.de:8080/~y0013390/index.html


HTH,
Florian


Post a reply to this message

From: Warp
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 26 Jul 2005 01:00:48
Message: <42e5c380@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> This is done using isosurface's

  Somehow I have always had a problem with this answer (to the question
"can I bend an object" or similar). There are several reasons for this.

  Firstly, and most importantly, the answer is, strictly speaking,
incorrect. You cannot take any given existing POV-Ray object and somehow
magically bend it "using isosurfaces". Isosurfaces cannot modify existing
objects in any way.
  What you would have to do in order to simulate this is to remodel your
entire object using isosurface functions. This is not always even
possible, and in many cases even when possible it's prohibively
laborious. With some object it doesn't even make any sense, such as
with meshes.

  Secondly, it's not the best solution in all cases nor the most efficient.
For example, if you want to bend a mesh or a heightfield it's usually
much easier and a lot more efficient to just move the vertex points
(assuming you have the vertex points and you can change them with
either POV-SDL or an external program; with heightfields you usually
can use the heightfield macros in the POV-Ray include library).
  Sometimes, when bending simple primitives, it's much more efficient
to model the bent result instead of trying to bend the original
(typical example: bending a cylinder is better done with a torus
segment).

  Thirdly, although this is completely irrelevant and only a question
of semantics, you are not truely "bending" an isosurface: You are
creating a new isosurface function which looks like a bent version
of the original

  In any case, I think it would be much better to answer like:
  "One possible solution is to model your object using isosurface
functions. Isosurfaces can be bent easily."

-- 

                                                          - Warp


Post a reply to this message

From: Stephen McAvoy
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 26 Jul 2005 05:21:43
Message: <250ce154k6red4c8um60vmje3ss3qagrap@4ax.com>
On 26 Jul 2005 01:00:48 -0400, Warp <war### [at] tagpovrayorg> wrote:

>  Thirdly, although this is completely irrelevant and only a question
>of semantics, you are not truely "bending" an isosurface: You are
>creating a new isosurface function which looks like a bent version
>of the original
>
>  In any case, I think it would be much better to answer like:
>  "One possible solution is to model your object using isosurface
>functions. Isosurfaces can be bent easily."

LOL
"The trials of an artist, in a maths based community" :-)


Regards
        Stephen


Post a reply to this message

From: Florian Brucker
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 26 Jul 2005 06:58:02
Message: <42e6173a$1@news.povray.org>
>   What you would have to do in order to simulate this is to remodel your
> entire object using isosurface functions. This is not always even
> possible, and in many cases even when possible it's prohibively
> laborious. 

Remodelling simple objects is not too difficult using IsoCSG. For
complex models, the best way is IMHO to remodel them as a mesh.

>   Secondly, it's not the best solution in all cases nor the most efficient.
> For example, if you want to bend a mesh or a heightfield it's usually
> much easier and a lot more efficient to just move the vertex points
> (assuming you have the vertex points and you can change them with
> either POV-SDL or an external program; with heightfields you usually
> can use the heightfield macros in the POV-Ray include library).

I think that's clear once you understand the difference between
triangle-represented objects and POV's primitives.

>   Sometimes, when bending simple primitives, it's much more efficient
> to model the bent result instead of trying to bend the original
> (typical example: bending a cylinder is better done with a torus
> segment).

Bent round boxes and cylinders can easily be made using the following
include file:

http://povray.tirnalong.com/ow.asp?MoreShapes

>   In any case, I think it would be much better to answer like:
>   "One possible solution is to model your object using isosurface
> functions. Isosurfaces can be bent easily."

100% ACK


Greetings,
Florian


Post a reply to this message

From: Jim Charter
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 26 Jul 2005 10:50:17
Message: <42e64da9$1@news.povray.org>
Warp wrote:
> Jim Charter <jrc### [at] msncom> wrote:
> 
>>This is done using isosurface's
> 
> 
>   Somehow I have always had a problem with this answer (to the question
> "can I bend an object" or similar). There are several reasons for this.
> 
>   Firstly, and most importantly, the answer is, strictly speaking,
> incorrect. You cannot take any given existing POV-Ray object and somehow
> magically bend it "using isosurfaces". Isosurfaces cannot modify existing
> objects in any way.
>   What you would have to do in order to simulate this is to remodel your
> entire object using isosurface functions. This is not always even
> possible, and in many cases even when possible it's prohibively
> laborious. With some object it doesn't even make any sense, such as
> with meshes.
> 
>   Secondly, it's not the best solution in all cases nor the most efficient.
> For example, if you want to bend a mesh or a heightfield it's usually
> much easier and a lot more efficient to just move the vertex points
> (assuming you have the vertex points and you can change them with
> either POV-SDL or an external program; with heightfields you usually
> can use the heightfield macros in the POV-Ray include library).
>   Sometimes, when bending simple primitives, it's much more efficient
> to model the bent result instead of trying to bend the original
> (typical example: bending a cylinder is better done with a torus
> segment).
> 
>   Thirdly, although this is completely irrelevant and only a question
> of semantics, you are not truely "bending" an isosurface: You are
> creating a new isosurface function which looks like a bent version
> of the original
> 
>   In any case, I think it would be much better to answer like:
>   "One possible solution is to model your object using isosurface
> functions. Isosurfaces can be bent easily."
> 
I think you are being a little extreme.  True, it comes down to the 
semantics of what is meant by "a primitive object in POV", but he seemed 
to indicate that he mostly meant "not triangles".  But I take your point 
that I may think of an isosurface, which happens to define a cube let's 
say, as being more similar to a POV "box" than it actually is.  Also if 
you want to get picky, he never said "bend", he said "warp" or "modify" 
and even specified "using noise or turbulence".  And that is precisely 
what some of Christoff's code does.  So I think it was a reasonable 
answer to the question as asked.  I had also considered mentioning that 
macros have been written which dice and recombine primitives to similate 
a skewed effect, but I didn't want to attempt and exhaustive treatment, 
just answer what he seemed to be asking.


Post a reply to this message

From: RAM
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 27 Jul 2005 17:30:00
Message: <web.42e7fcb2fe0b49e7d21e22c0@news.povray.org>
Thank you all for your informative responses. I am indeed looking for more
than simple bending of a primitive. I wish to distort it beyond recognition
if possible which is why I thought that using noise or turbulence might be
the way to go. I will check out Horman's include files for hints.


Post a reply to this message

From: Warp
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 28 Jul 2005 01:16:58
Message: <42e86a4a@news.povray.org>
RAM <nomail@nomail> wrote:
> Thank you all for your informative responses. I am indeed looking for more
> than simple bending of a primitive. I wish to distort it beyond recognition
> if possible which is why I thought that using noise or turbulence might be
> the way to go. I will check out Horman's include files for hints.

  Well, the correct answer is that you can't. You cannot take a POV-Ray
primitive and distort it.

  What you can do is to design an isosurface which looks like the primitive
or object and then you can distort its function. Another possibility is
to create a mesh which looks like the primitive/object and then move
its vertices around.

-- 

                                                          - Warp


Post a reply to this message

From: Jim Charter
Subject: Re: is it possible to warp a primitive or a height-field?
Date: 28 Jul 2005 04:29:14
Message: <42e8975a@news.povray.org>
RAM wrote:
>
> the way to go. I will check out Horman's include files for hints.
> 
> 

To see the specific technique I was refering to, look at example file:
iw_ex_02.pov

look at the very first object in it labelled "distorted plank", it calls:

IW_Plank_Round_CutN

You can see the entire shape is distorted by use of a noise function.


Post a reply to this message

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