This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > April 2004 > How to apply a texture to a cylinders top





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to apply a texture to a cylinders top
John Öström

2004-04-06, 4:38 am

Hello!

Have a problem with VRML textures. I have a cylinder which is in fact a disc
(r>>h) and I want put a texture only on the top of the cylinder. The texture
shouldn't be seen on the sides or the bottom. All I can do is to put the
texture on the sides... Could someone help me with this?

Thanks!

John

The code:

#VRML V2.0 utf8
Transform {
children Shape {
appearance Appearance {
material Material {
}
texture ImageTexture {
url "texture.jpg"
}
}
geometry Cylinder {
height 0.003
radius 0.1025
}
}
}


John Öström

2004-04-06, 9:34 am

I figured this out allready. Just made two cylinders, one with only the top
and another with sides and bottom.

John


"John Öström" <jostrom.ei-spam@cc.hut.fi> wrote in message
news:c4ti32$bm=$1@epityr.hut.fi...
> Hello!
>
> Have a problem with VRML textures. I have a cylinder which is in fact a

disc
> (r>>h) and I want put a texture only on the top of the cylinder. The

texture
> shouldn't be seen on the sides or the bottom. All I can do is to put the
> texture on the sides... Could someone help me with this?
>
> Thanks!
>
> John



Olivier

2004-04-21, 11:05 pm

"John Öström" <jostrom.ei-spam@cc.hut.fi> wrote in
news:c4u365$jh8$1@epityr.hut.fi:

> I figured this out allready. Just made two cylinders, one with only
> the top and another with sides and bottom.
>
> John
>
>
> "John Öström" <jostrom.ei-spam@cc.hut.fi> wrote in message
> news:c4ti32$bm5$1@epityr.hut.fi...
> disc
> texture
>
>
>


Huh, I know that with Internet Space Builder (from Parallel Graphics)
you can easily do that :
- you build a cylinder
- you select the texture
- you drag and drop (from the texture zone - in fact a sphere with the
selected texture - to the face of your object in the 3D area).
And next, look at the source code.

Bye
O.L.
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews