POV-Ray : Newsgroups : povray.newusers : image_map on a egg shaped object Server Time
29 Jul 2024 14:26:26 EDT (-0400)
  image_map on a egg shaped object (Message 1 to 4 of 4)  
From: Leslie
Subject: image_map on a egg shaped object
Date: 22 Aug 2005 21:15:00
Message: <web.430a77dda92ab46a524b17540@news.povray.org>
Hello,

I stumbled across POV-Ray a couple of weeks ago, did a few of the tutorials
and got hooked.

As I am learning I found a couple of 'projects' I could work on to keep
things interesting.

I decided to make a Weeble* as it looked relativly easy.

I have a Weeble shape, and have it broken in to the following bits:

Top Cap,Bottom Cap,Body Outer (clear), made using a lathe and cutting off
bits I didn't want to see.

Body Inner - made with slightly smaller lathe.

My problem is trying to put the image of the dog on the uneven suface of the
weeble. The weeble has a face in the middle and on either side are the ears
with a tail at the back so the PNG image is being wrapped using the
cylinder mapping.

The face appears ok but the top and bottom of the ears are skewed backwards.

I assume this is because the very top and bottom are curved inwards and
POVRay is adjusting the image to fit.

I have tried using GIMP to skew the top and bottom back but it does not
really help.

Has anyone here tried mapping an image completely around an egg shape
before?

Any tips on what I could try to do to at least minimise the warping?

Thanks in advance

Leslie

*for those who do not know, a Weeble is an egg shaped toy with a weight in
the bottom so it always stands up. There seem to be two types, one is only
rounded at the bottom, the other, like the one I am working on is
completely egg shaped.


Post a reply to this message

From: Mike Williams
Subject: Re: image_map on a egg shaped object
Date: 23 Aug 2005 05:51:24
Message: <8Jz8tNA6+uCDFwAS@econym.demon.co.uk>
Wasn't it Leslie who wrote:

>My problem is trying to put the image of the dog on the uneven suface of the
>weeble. The weeble has a face in the middle and on either side are the ears
>with a tail at the back so the PNG image is being wrapped using the
>cylinder mapping.
>
>The face appears ok but the top and bottom of the ears are skewed backwards.
>
>I assume this is because the very top and bottom are curved inwards and
>POVRay is adjusting the image to fit.

I don't think POVRay is doing any such adjustment. It doesn't do any
adjustment for ellipsoids, so I can't imagine it doing so for eggs.

If you make a temporary copy of your image with some vertical lines
drawn through the ears, you should find that the lines remain perfectly
vertical under a cylindrical map.

Do you get the same "skewed ears" effect if you try mapping your image
onto a plain cylinder or sphere?

Are you certain that the axis of the Weeble goes through the origin? A
cylindrical image map radiates from the y axis.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Alain
Subject: Re: image_map on a egg shaped object
Date: 23 Aug 2005 20:33:08
Message: <430bc044$1@news.povray.org>
Leslie nous apporta ses lumieres en ce 2005-08-22 21:11:
> Hello,
> 
> I stumbled across POV-Ray a couple of weeks ago, did a few of the tutorials
> and got hooked.
> 
> As I am learning I found a couple of 'projects' I could work on to keep
> things interesting.
> 
> I decided to make a Weeble* as it looked relativly easy.
> 
> I have a Weeble shape, and have it broken in to the following bits:
> 
> Top Cap,Bottom Cap,Body Outer (clear), made using a lathe and cutting off
> bits I didn't want to see.
> 
> Body Inner - made with slightly smaller lathe.
> 
> My problem is trying to put the image of the dog on the uneven suface of the
> weeble. The weeble has a face in the middle and on either side are the ears
> with a tail at the back so the PNG image is being wrapped using the
> cylinder mapping.
> 
> The face appears ok but the top and bottom of the ears are skewed backwards.
> 
> I assume this is because the very top and bottom are curved inwards and
> POVRay is adjusting the image to fit.
> 
> I have tried using GIMP to skew the top and bottom back but it does not
> really help.
> 
> Has anyone here tried mapping an image completely around an egg shape
> before?
> 
> Any tips on what I could try to do to at least minimise the warping?
> 
> Thanks in advance
> 
> Leslie
> 
> *for those who do not know, a Weeble is an egg shaped toy with a weight in
> the bottom so it always stands up. There seem to be two types, one is only
> rounded at the bottom, the other, like the one I am working on is
> completely egg shaped.
> 
> 
> 
You may try a spherical wrap and see if it helps.
When doing a cylindrical wrap, some distortion is to be expected if the shape is not
cylindrical or 
close to it, this is due to the variable radius. Pixels are maped radialy around the
Y, vertical, 
axis. If you use spherical wrap, pixels are maped radialy around the origin.

Alain


Post a reply to this message

From: Leslie
Subject: Re: image_map on a egg shaped object
Date: 27 Aug 2005 04:40:01
Message: <web.431026447592c61bc988c3080@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

> You may try a spherical wrap and see if it helps.
> When doing a cylindrical wrap, some distortion is to be expected if the shape is not
cylindrical or
> close to it, this is due to the variable radius. Pixels are maped radialy around the
Y, vertical,
> axis. If you use spherical wrap, pixels are maped radialy around the origin.
>
> Alain

I am not sure what happened to my previous response to Mike's post but here
goes:

I got it working! Thanks!

Mike: you were right about POV ray not skewing the image (I did the test
with the vertical lines).  I think my problem was that when doing my first
lot of image maps I decided it was easier to use a square image rather than
one that was a rectangle as it made working out the scaling easier. Since
now I knew that the skewing was not something to work around I went back
and started from scratch leaving my image in a non-square shape and managed
to get it looking good (well, give or take my ability to draw in GIMP). I
did a quick test and using a square image made the image map look funny,
possibly correctable via careful scaling but thats something I can look at
later.

Alain: Even though it was working I thought I'd give the spherical mapping a
go and see if it made it look better or was easier and got it kind of
working (having problems getting the image to scale but gives it an amusing
balloon effect). Might go back and look at this again later as it seemed
easier for me to get the image where I wanted it.

Thanks for the help.

Leslie


Post a reply to this message

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