|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 06/21/2013 09:47 AM, Stephen wrote:
> On 21/06/2013 1:25 PM, James Holsenback wrote:
>> then maybe the once keyword isn't appropriate
>
> Taking into account that the label does not use the full circumference
> of a cylinder. I created a CSG intersection and tried to map that. I
> found it very difficult to get the scaling right. My usual method of
> doing this is to pad the outside of the image with a transparent colour
> so that there are no transformations to worry about. Only working out
> the size of the image within an image. I've never been happy with doing
> that, though.
>
> So I used a bi-cubic patch and planer mapping, that worked better.
>
> I would like to see an example using cylindrical mapping so that image
> was fully visible on only part of the surface.
>
a little more information on the topic:
http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_15
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Solved the problem but using something that should not work:
[code]
#macro housing_grnd(L1)
#local L1a = L1 - 16;
difference {
cylinder{<0,-L1a/2,0><0,L1a/2,0>27.5
texture { MyBlackRoughPaint }
texture{
pigment{
image_map{ jpeg "RE55.jpg"
once
interpolate 4
}
translate -.5
scale .33
translate .5
warp{ spherical }
}
rotate y*270
}
}
cylinder{<0,L1a/2+.5,0><0,-(L1a/2+.5),0>25.5
texture{Silver_Metal}
} // Create a tube
}
#end
[/code]
Found this somewhere writteng to be used with a phere.
Removed the phere and included the cylinder data.
Also with the warp statement. Doing that it goes wrong.
Using spherical solved it. I cant explain why but the result can be seen here:
http://www.harry-arends.nl/werkgroep/images/RE55_42.png
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 21/06/2013 3:08 PM, James Holsenback wrote:
>>
>> I would like to see an example using cylindrical mapping so that image
>> was fully visible on only part of the surface.
>>
>
> a little more information on the topic:
>
> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_15
>
I'm glad your here.
The documentation, with example, describes perfectly how to do it.
It must have been years since I wanted to do this.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 06/21/2013 11:40 AM, Stephen wrote:
> On 21/06/2013 3:08 PM, James Holsenback wrote:
>>>
>>> I would like to see an example using cylindrical mapping so that image
>>> was fully visible on only part of the surface.
>>>
>>
>> a little more information on the topic:
>>
>> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_15
>>
>>
>
> I'm glad your here.
> The documentation, with example, describes perfectly how to do it.
>
> It must have been years since I wanted to do this.
>
yeah ... i'm curious why the orig poster got his example to work using
planar map_type and spherical warp. there MUST be some other unknowns
going on. many moons ago i placed a label on cylinder shape (horizontal
orientation) using method above ... iirc i used map_type 2 and some
uneven scaling, with translate
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 21/06/2013 4:56 PM, James Holsenback wrote:
>
> yeah ... i'm curious why the orig poster got his example to work using
> planar map_type and spherical warp. there MUST be some other unknowns
> going on. many moons ago i placed a label on cylinder shape (horizontal
> orientation) using method above ... iirc i used map_type 2 and some
> uneven scaling, with translate
Maybe the spherical warp undoes the distortion of using planer mapping
on a cylinder.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I changed a bit to get this image:
> http://www.harry-arends.nl/werkgroep/images/WarpText.png
> But as can be seen it warpt totatly around. The height is correct but it should
> cover only 1/3rd of the cylinder.
>
> #declare label =
> object{
> cylinder{<0,0,0><0,70,0>dia/2+.25
> pigment{
> image_map {
> jpeg "RE55s.jpg"
> map_type 2
> once
> interpolate 4
> }
> scale <1,24,1> // labelheight
> }
> }
> }
>
>
>
map_type 1 and map_type 2 always cover the full cyrconference. NO
scaling can change that.
Scaling can only change the vertical extent.
For what you want, a warp is required. Your sample becomes this:
#declare label =
object{
cylinder{<0,0,0><0,70,0>dia/2+.025
pigment{
image_map {
jpeg "RE55s.jpg"
scale<1/3,1,1>
warp{cylindrical}
once
interpolate 4
}
scale <1,24,1> // labelheight
}
}
}
The scale ensure that the image will cover 1/3 or the circonference.
As it is, the label will be 1 unit high. Adjust the Y component to get
the desired hight.
You can use scale<Angle/360, Hight, 1> to get exact controll.
"once" is required. Without it, the image will get repeated 3 times
around the cylinder, and all the way up and down the cylinder. In this
case, 2.9 times.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> On 21/06/2013 4:56 PM, James Holsenback wrote:
>>
>> yeah ... i'm curious why the orig poster got his example to work using
>> planar map_type and spherical warp. there MUST be some other unknowns
>> going on. many moons ago i placed a label on cylinder shape (horizontal
>> orientation) using method above ... iirc i used map_type 2 and some
>> uneven scaling, with translate
>
> Maybe the spherical warp undoes the distortion of using planer mapping
> on a cylinder.
>
On the contrary, it INTRODUCE some distortion. As you move away from the
X-Z plane, the image get stretched.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 21/06/2013 7:44 PM, Alain wrote:
>> Maybe the spherical warp undoes the distortion of using planer mapping
>> on a cylinder.
>>
>
> On the contrary, it INTRODUCE some distortion. As you move away from the
> X-Z plane, the image get stretched.
I thought that something like that might be the case. So Jim's question
still stands.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> On 21/06/2013 7:44 PM, Alain wrote:
>>> Maybe the spherical warp undoes the distortion of using planer mapping
>>> on a cylinder.
>>>
>>
>> On the contrary, it INTRODUCE some distortion. As you move away from the
>> X-Z plane, the image get stretched.
>
> I thought that something like that might be the case. So Jim's question
> still stands.
>
If the sylinder is short, the distortion is not to apparent. Also, in
*some* cases, a spherical mapping can be used on a cylinder for good effect.
On this cylinder, it's OK...
cylinder{y, -y, 1 }
Using spherical mapping, the cap get a recognisable image, but the image
is distorted. The cylinder been short, the distortion is still low
enough to not been realy noticeable.
Using the correct cylindrical mapping, the caps will only show a radial
pattern corresponding to the top layer of pixels from the image, but the
image on the sides is distortion free.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I haven't used this yet:
http://lib.povray.org/searchcollection/index2.php?objectName=Labeller&contributorTag=chrisb
A solution?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |