POV-Ray : Newsgroups : povray.binaries.scene-files : Unrolled Server Time
2 Sep 2024 14:13:32 EDT (-0400)
  Unrolled (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
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

From: Dennis Milller
Subject: Re: Unrolled
Date: 13 Jan 2002 21:20:55
Message: <3c424087$1@news.povray.org>
Hi. I changed your code to:

#declare MySphereObject =
    sphere{ 0,1
        pigment{image_map { tga "d:\me\me001.tga"
            map_type 1 interpolate 2 }
        }
    }

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




and when I try to render it, first I get an error on the finish line. When I
comment that out, I get an error in transforms.inc,  line 116:
  transform {translate -Axis*((Mx - Mn)/2 + Mn)}


the error says:
"Expected object or directive; transform found."

Any suggestions?
thanks,
D.

"Batronyx" <bat### [at] alliancecablenet> wrote in message
news: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: Hugo
Subject: Re: Unrolled
Date: 14 Jan 2002 04:17:52
Message: <3c42a240@news.povray.org>
> #declare Wrapobject = MySphereObject
>      file://finish{ambient 1}
>      Center_Trans(Wrapobject, x+y+z)}

As far as I'm aware, you can't declare an object + finish like that.. Put an
object { } wrapper around them.. Concerning the transformation error, I
haven't got that line to work either, so I comment out Center_Trans.. The
line is not necessary if your object is already at origin, which would be
the case most of the time.

If you get further errors (not likely, but...) it could be that a variable
somewhere in Unwarp.pov has already been declared as another type of
variable in your scene file (or in an include file, that you use in your
scene file).. For example, if you have a line that #declares A=30;  you
can't afterwards do  function (A) { x+a }  because Pov doesn't allow A to be
declared twice in that way.. So use #local variables whenever you can or
#undef them when nolonger needed.

Maybe you knew this already, but... :o)  I just typed it...

Hugo


Post a reply to this message

From: Batronyx
Subject: Re: Unrolled
Date: 14 Jan 2002 23:33:40
Message: <3c43b124$1@news.povray.org>
"Dennis Milller" <dhm### [at] mediaonenet> wrote in message
news:3c424087$1@news.povray.org...
> Hi. I changed your code to:
>
> #declare MySphereObject =
>     sphere{ 0,1
>         pigment{image_map { tga "d:\me\me001.tga"
>             map_type 1 interpolate 2 }
>         }
>     }
>
> #declare Wrapobject = MySphereObject
>      //finish{ambient 1}
>      Center_Trans(Wrapobject, x+y+z)}
>
>
>
>
> and when I try to render it, first I get an error on the finish line. When I
> comment that out, I get an error in transforms.inc,  line 116:
>   transform {translate -Axis*((Mx - Mn)/2 + Mn)}
>

In both cases it is because, as Hugo has pointed out, I forgot to use the proper
syntax. That's what I get for doing things in a hurry. Try this;

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


The above syntax is allowed for pigments, but if for some reason this doesn't
work, put a texture{} wrapper around the finish statement.

I've been using PoV since 2.2, and I still don't always remember syntactic
things. 95% of the time, I just keep the help file open for reference. You may
want to consider this. Especially if your depending on me :D

--
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: 14 Jan 2002 23:38:53
Message: <3c43b25d$1@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote in message news:3c42a240@news.povray.org...
>
> > #declare Wrapobject = MySphereObject
> >      file://finish{ambient 1}
> >      Center_Trans(Wrapobject, x+y+z)}
>
> As far as I'm aware, you can't declare an object + finish like that.. Put an
> object { } wrapper around them.. Concerning the transformation error, I
> haven't got that line to work either, so I comment out Center_Trans.. The
> line is not necessary if your object is already at origin, which would be
> the case most of the time.
>

Thanks for catching my syntax error. Your problem with the Center_Trans macro
may be to another of my mistakes; Do you see the unmatched closing brace at the
end of the line? It would of course disappear when you comment/delete that line.

Also, it isn't enough for your object to merely encompass the origin, it must be
precisely centered or the FitScaleY transform won't behave properly. You may
have meant that . . . but . . .I wrote it :D


--
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: Dennis Milller
Subject: Re: Unrolled
Date: 15 Jan 2002 21:26:49
Message: <3c44e4e9$1@news.povray.org>
Nope, that didn't work. I don;t understand - does this same code work on
your machine?
d.

declare Wrapobject = object{
      MySphereObject
     texture { finish{ambient 1} }
      Center_Trans(Wrapobject, x+y+z)
      }//end object



"Batronyx" <bat### [at] alliancecablenet> wrote in message
news:3c43b124$1@news.povray.org...
>
> "Dennis Milller" <dhm### [at] mediaonenet> wrote in message
> news:3c424087$1@news.povray.org...
> > Hi. I changed your code to:
> >
> > #declare MySphereObject =
> >     sphere{ 0,1
> >         pigment{image_map { tga "d:\me\me001.tga"
> >             map_type 1 interpolate 2 }
> >         }
> >     }
> >
> > #declare Wrapobject = MySphereObject
> >      //finish{ambient 1}
> >      Center_Trans(Wrapobject, x+y+z)}
> >
> >
> >
> >
> > and when I try to render it, first I get an error on the finish line.
When I
> > comment that out, I get an error in transforms.inc,  line 116:
> >   transform {translate -Axis*((Mx - Mn)/2 + Mn)}
> >
>
> In both cases it is because, as Hugo has pointed out, I forgot to use the
proper
> syntax. That's what I get for doing things in a hurry. Try this;
>
>  #declare Wrapobject = object{
>       MySphereObject
>       finish{ambient 1}
>       Center_Trans(Wrapobject, x+y+z)
>       }//end object
>
>
> The above syntax is allowed for pigments, but if for some reason this
doesn't
> work, put a texture{} wrapper around the finish statement.
>
> I've been using PoV since 2.2, and I still don't always remember syntactic
> things. 95% of the time, I just keep the help file open for reference. You
may
> want to consider this. Especially if your depending on me :D
>
> --
> 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

<<< Previous 5 Messages Goto Initial 10 Messages

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