POV-Ray : Newsgroups : povray.programming : uv mapping for arbitrary objects Server Time
29 Jul 2024 02:21:04 EDT (-0400)
  uv mapping for arbitrary objects (Message 1 to 3 of 3)  
From: Mathias Broxvall
Subject: uv mapping for arbitrary objects
Date: 11 Mar 1999 04:07:50
Message: <36E787E5.560BFBD@ida.liu.se>
Hi!

I think I have an idea how to make "UV mapping" for 
arbitrary objects. The current versions of it only 
seem to work for bezier patches and a few other 
objects (does it work with CSG?)

Please note that with "transformations" I mean 
arbitrary nonlinear transformations of objects (CSG, 
animated blobs etc...)

1. The user specifies the object before and after any
transformations and a few center points.

2. From the centerpoints a set of rays are shot out. 
Where they intersect the untransformed object the 
controll points c0,c1,c2,... are formed and where 
they intersect the transformed object the controll 
points c'0,c'1,... are formed. 

3. When applying texture to a point <x',y',z'> on the 
tranformed object write <x',y',z'> as a linear 
combination of the few closest controlpoints

   <x',y',z'> = a * c'i +  b * c'j + d * c'k.

Calculate the "untranformed" point 

      <x,y,z> = a * ci + b *cj + d * ck

And use the texture given at that point.


Example of how it could be used:

difference {
  sphere { <0,0,0>, 10 }
  sphere { <10,0,0>, 2 }

  texture {
    transformed {
       original sphere{ <0,0,0>, 10 }
       original_centerpoints { <0,0,0> }
       center_points { <0,0,0> }
       control_density 10
    }
    <my favourite texture....>
  }
}

Of course this doesn't work with to few controlpoints,
to large transformations ,porly choosen "centerpoints" 
or very irregular objects. But perhaps it works in most
normal cases with a smart user.

What do you think? Should I (try) to implement it?

/ Mathias Broxvall


Post a reply to this message

From: Nathan Kopp
Subject: Re: uv mapping for arbitrary objects
Date: 11 Mar 1999 18:21:21
Message: <36E84FB8.526C7A3E@Kopp.com>
This is an interesting concept.  Anyone know if there's any precedent for
doing this (any other renderers that use this technique)?  But might this
just become a form of spherical mapping?

-Nathan

Mathias Broxvall wrote:
> 
> Hi!
> 
> I think I have an idea how to make "UV mapping" for
> arbitrary objects. The current versions of it only
> seem to work for bezier patches and a few other
> objects (does it work with CSG?)
> 
> Please note that with "transformations" I mean
> arbitrary nonlinear transformations of objects (CSG,
> animated blobs etc...)
> 
> 1. The user specifies the object before and after any
> transformations and a few center points.
> 
> 2. From the centerpoints a set of rays are shot out.
> Where they intersect the untransformed object the
> controll points c0,c1,c2,... are formed and where
> they intersect the transformed object the controll
> points c'0,c'1,... are formed.
> 
> 3. When applying texture to a point <x',y',z'> on the
> tranformed object write <x',y',z'> as a linear
> combination of the few closest controlpoints
> 
>    <x',y',z'> = a * c'i +  b * c'j + d * c'k.
> 
> Calculate the "untranformed" point
> 
>       <x,y,z> = a * ci + b *cj + d * ck
> 
> And use the texture given at that point.
> 
> Example of how it could be used:
> 
> difference {
>   sphere { <0,0,0>, 10 }
>   sphere { <10,0,0>, 2 }
> 
>   texture {
>     transformed {
>        original sphere{ <0,0,0>, 10 }
>        original_centerpoints { <0,0,0> }
>        center_points { <0,0,0> }
>        control_density 10
>     }
>     <my favourite texture....>
>   }
> }
> 
> Of course this doesn't work with to few controlpoints,
> to large transformations ,porly choosen "centerpoints"
> or very irregular objects. But perhaps it works in most
> normal cases with a smart user.
> 
> What do you think? Should I (try) to implement it?
> 
> / Mathias Broxvall


Post a reply to this message

From: Mathias Broxvall
Subject: Re: uv mapping for arbitrary objects
Date: 12 Mar 1999 03:38:30
Message: <36E8D286.82ADE89C@ida.liu.se>
Nathan Kopp wrote:
> 
> This is an interesting concept.  Anyone know if there's any precedent for
> doing this (any other renderers that use this technique)?  But might this
> just become a form of spherical mapping?

I wouldn't think it'd make a spherical mapping since in the degenerate
case when the transformed object is the same as the untransformed object
the texturing become the normal povray 3D textures.
As of the origin I was inspired of the uV mapping for bezier patches
(hmm... can any object be expressed as a set of bezier
patches/triangles...)
but I wouldn't be surprised if there already are renderes using this
technique.

/ Mathias


Post a reply to this message

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