|
|
|
|
|
|
| |
| |
|
|
From: James Holsenback
Subject: Re: Want to attach one object to another
Date: 21 Jun 2013 07:10:26
Message: <51c434a2@news.povray.org>
|
|
|
| |
| |
|
|
On 06/21/2013 05:13 AM, gharryh wrote:
> Alain <kua### [at] videotronca> wrote:
>>> On 19/06/2013 9:58 AM, gharryh wrote:
>
>>>
>> Or use an object pattern of the content of the label for eatch colours.
>> Then, you can use a warp{spherical}.
> I have made a picture of the label.
> Trying the example in the documentation i managed te get it on a cylinder.
>
> object{
> cylinder{<0,0,0><0,70,0>27.5
> pigment{
> image_map {
> jpeg "RE55.jpg"
> map_type 1
> }
> scale<.1,.1,.1>
> }
> }
> }
>
> But it seems i cant get it smaller and my knowledge of povray to do a correct
> search, not knowing the the correct phrases to use, i cant find the solution.
>
>
>
>
map_type 1 is spherical mapping ... try map_type 2 (cylindrical) then
transform (scale, translate)
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
}
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 06/21/2013 07:39 AM, gharryh wrote:
> 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
> }
> }
> }
>
>
>
then maybe the once keyword isn't appropriate
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 21/06/2013 13:39, gharryh nous fit lire :
> 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
> }
> }
> }
>
>
>
Try that:
cylinder{<0,0,0><0,70,0>dia/2+.25
pigment{
image_map {
jpeg "RE55s.jpg"
once
interpolate 4
}
scale <1/3,24,1/3> // labelheight
warp { cylindrical orientation z dist_exp 0 }
}
}
Or make RE55s.jpg three time it's current width, with a neutral colour
for the extension.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |