POV-Ray : Newsgroups : povray.binaries.scene-files : Unrolled Server Time
2 Sep 2024 16:17:30 EDT (-0400)
  Unrolled (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Batronyx
Subject: Unrolled
Date: 10 Jan 2002 08:45:15
Message: <3c3d9aeb@news.povray.org>
Here is the scene file for an unrolling strategy I've had in mind for awhile. I
finally sat down and finished it. A sample of the results is in p.b.i. I didn't
implement this as a macro because of it's dependence on the camera. You really
need the whole scene file.

This can be useful for several things, but primarily the results can be used as
a background image in a paint program to help align texture details when
cylindrically or spherically mapping objects not supporting UV-mapping. You
could also use it to support uv-mapping 'in reverse' (so to speak) if you use it
as a target in an image morphing package (i.e. Hijaak Morph)


--
light_source{0,1}#macro c(J,a)sphere{0,1pigment{rgb z}scale a translate J+O}
#end#macro B(R,V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+
10)c(0<7.5,45,5>)}}#end B(12,0z*25)B(8y*4<0,12,50>)          // Batronyx ^"^


Post a reply to this message

From:
Subject: Re: Unrolled
Date: 10 Jan 2002 08:53:33
Message: <e57r3u8dp73lkbur272hd2c4j6ag7a0n1l@4ax.com>
On Thu, 10 Jan 2002 07:38:07 -0600, "Batronyx" <bat### [at] alliancecablenet>
wrote:
> Here is the scene file for an unrolling strategy

where exactly ? ;-)

ABX


Post a reply to this message

From: Hugo
Subject: Re: Unrolled
Date: 10 Jan 2002 08:58:42
Message: <3c3d9e12@news.povray.org>
Batronyx wrote:
> Here is the scene file for an unrolling strategy I've had in mind for
awhile. I
> finally sat down and finished it.

You forgot the attachment. But I had the same idea yesterday and I'm glad I
don't have to do everything myself.  :o)  I suppose it works only with
triangles?

Hugo


Post a reply to this message

From: Batronyx
Subject: Re: Unrolled
Date: 10 Jan 2002 20:13:49
Message: <3c3e3c4d@news.povray.org>
DOH!
Sorry! I was trying to get these posted before I dashed off to work this
morning.

Just as well I suppose since I also forgot to mention something:
The scene file has a generic reference to a "Wrapobject" rather than the skull I
posted in p.b.i. You should of course supply your own object to unwrap.


--
light_source{0,1}#macro c(J,a)sphere{0,1pigment{rgb z}scale a translate J+O}
#end#macro B(R,V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+
10)c(0<7.5,45,5>)}}#end B(12,0z*25)B(8y*4<0,12,50>)          // Batronyx ^"^


Post a reply to this message


Attachments:
Download 'unwrap.pov.txt' (3 KB)

From: Batronyx
Subject: Re: Unrolled
Date: 10 Jan 2002 20:20:36
Message: <3c3e3de4$1@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote in message news:3c3d9e12@news.povray.org...
> You forgot the attachment. But I had the same idea yesterday and I'm glad I
> don't have to do everything myself.  :o)

Sorry about that. I just posted it with the attachment.

>I suppose it works only with triangles?

No. It should work with just about any object already suited to cylindrical or
spherical mapping. The method is quite uncomplicated and should be very easy to
modify to suit similar purposes ( i.e. unwrap top-to-bottom ).


Post a reply to this message

From: Dennis Milller
Subject: Re: Unrolled
Date: 11 Jan 2002 22:38:58
Message: <3c3fafd2$1@news.povray.org>
Sorry, what is the exact syntax for the object in the Wrapobject field? How
would put, say, a sphere with an image map?
And you have a "t" missing in image_height.
Thanks,
D.

"Batronyx" <bat### [at] alliancecablenet> wrote in message
news:3c3e3c4d@news.povray.org...
> DOH!
> Sorry! I was trying to get these posted before I dashed off to work this
> morning.
>
> Just as well I suppose since I also forgot to mention something:
> The scene file has a generic reference to a "Wrapobject" rather than the
skull I
> posted in p.b.i. You should of course supply your own object to unwrap.
>
>
> --
> light_source{0,1}#macro c(J,a)sphere{0,1pigment{rgb z}scale a translate
J+O}
> #end#macro
B(R,V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+
> 10)c(0<7.5,45,5>)}}#end B(12,0z*25)B(8y*4<0,12,50>)          // Batronyx
^"^
>
>
>
>
>


Post a reply to this message

From: Hugo
Subject: Re: Unrolled
Date: 12 Jan 2002 11:48:36
Message: <3c4068e4$1@news.povray.org>
Your program is very nice, thank you! I can't imagine a better way to do it,
with pov. But I'd like if you explain how to make it work all the way
through. I found out how to unroll my object. It's just that putting the
texture back causes much trouble.  It doesn't fit.


Regards,
Hugo


Post a reply to this message

From: Hugo
Subject: Re: Unrolled
Date: 12 Jan 2002 16:18:20
Message: <3c40a81c$1@news.povray.org>
I think I finally got it to work! :o)  I will experiment more with it.  Btw,
to avoid black dots in the unrolled surface, I took the camera a bit off
zero. Location is then  <.00001,.00001,-1000>

Seems like a nice feature you've given us ... thanks Batronyx!!

Regards,
Hugo


Post a reply to this message

From: Batronyx
Subject: Re: Unrolled
Date: 12 Jan 2002 23:54:17
Message: <3c4112f9@news.povray.org>
"Dennis Milller" <dhm### [at] mediaonenet> wrote in message
news:3c3fafd2$1@news.povray.org...
> Sorry, what is the exact syntax for the object in the Wrapobject field? How
> would put, say, a sphere with an image map?
> And you have a "t" missing in image_height.
> Thanks,
> D.

Sorry about the "t"  :(

<sdl>

#declare MySphereObject =
    sphere{ 0,1
        pigment{image_map { png "test.png"
            map_type 1 interpolate 2 }
        }
    }

#declare Wrapobject = MySphereObject
     finish{ambient 1}
     Center_Trans(Wrapobject, x+y+z)}

</sdl>

the confusion may have come from the "WrapTex" which isn't really used anywhere.
It is just there as a suggestion so that you could do this if you want:

<sdl>

#include "fancyobject.inc"
#declare Wrapobject = MyFancyObject
     texture { Wraptex }
     Center_Trans(Wrapobject, x+y+z)}

</sdl>

Hope that helps.


--
light_source{0,1}#macro c(J,a)sphere{0,1pigment{rgb z}scale a translate J+O}
#end#macro B(R,V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+
10)c(0<7.5,45,5>)}}#end B(12,0z*25)B(8y*4<0,12,50>)          // Batronyx ^"^


Post a reply to this message

From: Batronyx
Subject: Re: Unrolled
Date: 13 Jan 2002 00:00:00
Message: <3c411450@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote in message news:3c40a81c$1@news.povray.org...
> I think I finally got it to work! :o)  I will experiment more with it.

Well good! Because I just now saw both posts and I wasn't sure what your problem
was exactly :)

> Btw, to avoid black dots in the unrolled surface, I took the camera a bit off
> zero. Location is then  <.00001,.00001,-1000>

Thanks for the tip. You know I should have known this anyway. It's been
suggested in the docs since v2.2.

> Seems like a nice feature you've given us ... thanks Batronyx!!

You're more than welcome. I'm glad you find it useful. :)


--
light_source{0,1}#macro c(J,a)sphere{0,1pigment{rgb z}scale a translate J+O}
#end#macro B(R,V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+
10)c(0<7.5,45,5>)}}#end B(12,0z*25)B(8y*4<0,12,50>)          // Batronyx ^"^


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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