POV-Ray : Newsgroups : povray.newusers : Want to attach one object to another Server Time
14 May 2024 11:55:28 EDT (-0400)
  Want to attach one object to another (Message 1 to 10 of 25)  
Goto Latest 10 Messages Next 10 Messages >>>
From: gharryh
Subject: Want to attach one object to another
Date: 18 Jun 2013 16:05:00
Message: <web.51c0bc73e677e64c520168c30@news.povray.org>
I have a cylinder that needs a label.
So i created the cylinder object and the label object.
this http://www.harry-arends.nl/werkgroep/images/WrapText.png
should look like this http://www.harry-arends.nl/werkgroep/images/Ptdc0437.jpg

I was looking at the wrap commant but with no result


Post a reply to this message

From: James Holsenback
Subject: Re: Want to attach one object to another
Date: 18 Jun 2013 17:24:39
Message: <51c0d017@news.povray.org>
On 06/18/2013 04:00 PM, gharryh wrote:
> I have a cylinder that needs a label.
> So i created the cylinder object and the label object.
> this http://www.harry-arends.nl/werkgroep/images/WrapText.png
> should look like this http://www.harry-arends.nl/werkgroep/images/Ptdc0437.jpg
>
> I was looking at the wrap commant but with no result
>
>
http://wiki.povray.org/content/Reference:Bitmap_Modifiers#The_map_type_Option


Post a reply to this message

From: Stephen
Subject: Re: Want to attach one object to another
Date: 18 Jun 2013 17:27:12
Message: <51c0d0b0$1@news.povray.org>
On 18/06/2013 9:00 PM, gharryh wrote:
> I have a cylinder that needs a label.
> So i created the cylinder object and the label object.

Label object? I would use a texture with an image map wrapped around the 
cylinder.



> this http://www.harry-arends.nl/werkgroep/images/WrapText.png
> should look like this http://www.harry-arends.nl/werkgroep/images/Ptdc0437.jpg
>
> I was looking at the wrap commant but with no result
>
>

Are you mixing up wrap with warp?



-- 
Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Want to attach one object to another
Date: 18 Jun 2013 22:36:13
Message: <51c1191d$1@news.povray.org>

> I have a cylinder that needs a label.
> So i created the cylinder object and the label object.
> this http://www.harry-arends.nl/werkgroep/images/WrapText.png
> should look like this http://www.harry-arends.nl/werkgroep/images/Ptdc0437.jpg
>
> I was looking at the wrap commant but with no result
>
>

If you use the cylindrical warp with the once option, all should be 
nice. Be sure to scale horizontaly so that it covers the correct part.
If it covers 1 fourth of the circonference, you need to use 
scale<1/4,1,1>. Without scaling, the image will get wrapped around 
exactly once, the right side touching the left side.
Scale along the Y direction to get the correct hight. It start at 1 unit 
high.
In this case, scaling along the Z axis have no effect.

You may want to give the label some thickness.
In that case, I'd use a cylinder just very slightly larger than the body 
of your object, and apply the image_map to it. Use a difference or 
intersection to keep only the part with your image, or use a transparent 
pigment for the part outside of the label. The transparent pigment will 
leave a gap that may be visible in some cases.


Post a reply to this message

From: gharryh
Subject: Re: Want to attach one object to another
Date: 19 Jun 2013 05:00:02
Message: <web.51c172cfc1f827c4520168c30@news.povray.org>
"gharryh" <h.a### [at] harry-arendsnl> wrote:
> I have a cylinder that needs a label.
> So i created the cylinder object and the label object.
> this http://www.harry-arends.nl/werkgroep/images/WrapText.png
> should look like this http://www.harry-arends.nl/werkgroep/images/Ptdc0437.jpg
>
> I was looking at the wrap commant but with no result
Maybe i should say warp instead of wrap.
Als both the cylinder and the label are POV-Ray objects.
The label is no bitmap image.


Post a reply to this message

From: Stephen
Subject: Re: Want to attach one object to another
Date: 19 Jun 2013 06:01:07
Message: <51c18163$1@news.povray.org>
On 19/06/2013 9:58 AM, gharryh wrote:
> Maybe i should say warp instead of wrap.
> Als both the cylinder and the label are POV-Ray objects.
> The label is no bitmap image.

Well that is different. You did it the hard way. :-)

I don't know if applying shear transformations would bend the label the 
way you want. My mathematics is not good enough.
You could rebuild the label but use a cylinder as your base. Then rotate 
the characters and symbols so that they are tangential to where they 
intersect the cylinder. Then intersect the characters with a slightly 
larger cylinder to smooth them flush with the label.

-- 
Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Want to attach one object to another
Date: 19 Jun 2013 16:23:15
Message: <51c21333$1@news.povray.org>

> On 19/06/2013 9:58 AM, gharryh wrote:
>> Maybe i should say warp instead of wrap.
>> Als both the cylinder and the label are POV-Ray objects.
>> The label is no bitmap image.
>
> Well that is different. You did it the hard way. :-)
>
> I don't know if applying shear transformations would bend the label the
> way you want. My mathematics is not good enough.
> You could rebuild the label but use a cylinder as your base. Then rotate
> the characters and symbols so that they are tangential to where they
> intersect the cylinder. Then intersect the characters with a slightly
> larger cylinder to smooth them flush with the label.
>
Or use an object pattern of the content of the label for eatch colours. 
Then, you can use a warp{spherical}.


Post a reply to this message

From: Stephen
Subject: Re: Want to attach one object to another
Date: 19 Jun 2013 16:49:00
Message: <51c2193c$1@news.povray.org>
On 19/06/2013 9:23 PM, Alain wrote:
>>
> Or use an object pattern of the content of the label for eatch colours.
> Then, you can use a warp{spherical}.


Nice idea. But this is newusers, Alain.

Could you point to an example? I wouldn't mind seeing how to do this myself.

-- 
Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Want to attach one object to another
Date: 20 Jun 2013 00:38:35
Message: <51c2874b$1@news.povray.org>

> On 19/06/2013 9:23 PM, Alain wrote:
>>>
>> Or use an object pattern of the content of the label for eatch colours.
>> Then, you can use a warp{spherical}.
>
>
> Nice idea. But this is newusers, Alain.
>
> Could you point to an example? I wouldn't mind seeing how to do this
> myself.
>

 From the included documentation for the Windows version, section 
3.4.7.2.5 Object Pattern.

pigment{object{Some_object color InsidePigment color OutsidePigment}}

"Some_object" must be defined in a #declare directive.

This is often used to create a pattern from a text object, but any 
object can be used, both simple or complexe ones. Points that are inside 
the reference object use the first item. Those outside will use the 
second item.

For the warp, it is described in section 3.4.7.5.5.7 Mapping using warps.

Assuming that you created an object named "My_Text" and "My_Logo, it can 
look like this:

pigment{rgb 1} // the background.
pigment{ // a red element, can be some text or anything.
  object{My_Logo color rgb <1,0,0> color rgbt 1

   warp{cylindrical}

   translate 3*y // and move it up 3 units
   once // Ensure that the pigment show only one time
   }
  }
pigment{ // some black element, can be some text.
  object{My_Text color rgb 0 color rgbt 1

   warp{cylindrical}
   once
   }
  }


This is a layered pigment using 3 pigments with some transparency.
You can use any number of layers.

The pigment "rgbt 1" is perfectly transparent showing whatever is under.

The scaling of the X component control the fraction of the cylinder's 
circonference that is covered. Normaly, you should use a value that is 
less than 1. Without that scaling, the pigment get wraped all the way 
around the cylinder.

The scaling of the Y component control the hight. Without it, the 
pigment will be only 1 unit high.

The lower point of the pattern is always a Y=0, and, without once, will 
repeat every unit up and down.

I used simple pigments, but you can use full textures. It will look like:

texture{object{My_Object texture{Texture1} texture{Texture2} }}




Alain


Post a reply to this message

From: gharryh
Subject: Re: Want to attach one object to another
Date: 21 Jun 2013 05:15:01
Message: <web.51c41928c1f827c4520168c30@news.povray.org>
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.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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