POV-Ray : Newsgroups : povray.newusers : Mapping bump_map texture onto lathe? Server Time
24 Nov 2024 04:27:28 EST (-0500)
  Mapping bump_map texture onto lathe? (Message 1 to 5 of 5)  
From: CreeDo
Subject: Mapping bump_map texture onto lathe?
Date: 31 May 2010 03:55:00
Message: <web.4c036a687eb3c538cd6516110@news.povray.org>
I am trying to make a pool cue with the lathe shape.

I know the texture starts out as a 1 unit square and I've scaled and translated
it appropriately. But because the cue tapers a bit, part of the texture looks
awful.

I was hoping to have the texture wrap evenly once around the cue, without tiling
or clipping on any section of it. But it looks like towards the middle it's
stretching or tiling in an ugly way. There are supposed to be triangular points,
and towards the bottom you see a correct sharp point. But at the top there's a
distorted round one.

http://creedo.gbgl-hq.com/cueproblem.jpg

I've tried scaling the x-width of the texture in various ways and they all
result in this visual effect.

If anyone wants to experiment with the file and texture, here they are:

http://creedo.gbgl-hq.com/cue.pov
http://creedo.gbgl-hq.com/cuetex.png

To save on rendering time, you can render just this region:
+sc0.473118 +sr0.288136 +ec0.531769 +er0.534550

Any help would be appreciated, it's driving me nuts.


Post a reply to this message

From: clipka
Subject: Re: Mapping bump_map texture onto lathe?
Date: 31 May 2010 07:55:58
Message: <4c03a3ce$1@news.povray.org>
Am 31.05.2010 09:51, schrieb CreeDo:

> I know the texture starts out as a 1 unit square and I've scaled and translated
> it appropriately. But because the cue tapers a bit, part of the texture looks
> awful.

Actually the primary problem is not the tapering per se, but the fact 
that it is round.

You'll most probably want to try "map_type 2" (cylindrical mapping), 
which will "wrap" the texture around your object.

By default, the mapping is fine for texturing any cylindrical object of 
1 unit length, oriented along the y axis, and any diameter, wrapping the 
texture once around the object.

If your object's orientation does not match, you will have to rotate the 
resulting pigment or texture; if your length does not match, you will 
have to scale it; the diameter will match automatically.

If you want to have the texture repeat multiple times around the object 
(I guess you'll want to repeat it 2 or 3 times), AFAIK you'll either 
have to modify the texture accordingly, or go for the alternative of 
using the default map_type, scale by <1,1/3,1> to fit, and use "wrap { 
cylindrical }" to wrap it around the cylinder.


Post a reply to this message

From: CreeDo
Subject: Re: Mapping bump_map texture onto lathe?
Date: 31 May 2010 10:50:01
Message: <web.4c03cbb3593c04b0cd6516110@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 31.05.2010 09:51, schrieb CreeDo:
>
> > I know the texture starts out as a 1 unit square and I've scaled and translated
> > it appropriately. But because the cue tapers a bit, part of the texture looks
> > awful.
>
> Actually the primary problem is not the tapering per se, but the fact
> that it is round.
>
> You'll most probably want to try "map_type 2" (cylindrical mapping),
> which will "wrap" the texture around your object.

Ah, that did the trick. Mostly. Thanks very much.

If I wrap it exactly twice around the cue, it looks ok when viewed from the
front or back, but viewed from the left and right the texture looks stretched.
Is this something I can fix in pov or do I just edit the texture?


Post a reply to this message

From: clipka
Subject: Re: Mapping bump_map texture onto lathe?
Date: 31 May 2010 11:05:41
Message: <4c03d045@news.povray.org>
Am 31.05.2010 16:46, schrieb CreeDo:

> If I wrap it exactly twice around the cue, it looks ok when viewed from the
> front or back, but viewed from the left and right the texture looks stretched.
> Is this something I can fix in pov or do I just edit the texture?

That puzzles me a bit, and I'm not sure whether I understand what you 
mean; can you post a link to an updated image?


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Mapping bump_map texture onto lathe?
Date: 1 Jun 2010 14:50:25
Message: <4c055671$1@news.povray.org>
CreeDo wrote:

> If I wrap it exactly twice around the cue, it looks ok when viewed from the
> front or back, but viewed from the left and right the texture looks stretched.

Are you sure the cylindrical texture is rotated correcly?
Try rotating by 90 degrees around the axis which goes in your
scene from "front" to "back".


Post a reply to this message

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