BVEStation

Author Topic: Texturing Cylinders  (Read 5428 times)

Offline Pacific385

  • Dispatcher
  • ****
  • Posts: 749
  • Gender: Male
  • BVEStation Member
    • View Profile
Texturing Cylinders
« on: January 28, 2012, 03:49:57 pm »
Does anyone know how to texture a cylinder?
I've been using this coding:
[meshbuilder]
Cylinder 32,0.02,0.02,2
Color 224, 223, 219
Translate 0.00,2.10,-15.00

Offline BStyles

  • Head Admin
  • Operator
  • ******
  • Posts: 344
  • Gender: Male
  • The CEO
    • View Profile
Re: Texturing Cylinders
« Reply #1 on: January 28, 2012, 04:37:34 pm »
Cylinders cannot be textured, since there are no faces to reference. You can texture one shade onto it but it cannot be specific or it will be mapped over the entire object (or not at all). Your best bet is to build them by hand.

BStyles

Offline Pacific385

  • Dispatcher
  • ****
  • Posts: 749
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Texturing Cylinders
« Reply #2 on: January 28, 2012, 04:52:17 pm »
Cylinders cannot be textured, since there are no faces to reference. You can texture one shade onto it but it cannot be specific or it will be mapped over the entire object (or not at all). Your best bet is to build them by hand.

BStyles
Thanks

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Texturing Cylinders
« Reply #3 on: January 28, 2012, 08:44:57 pm »
Actually you CAN texture a cylinder. I've done so myself and there is a tutorial on how to texture cylinders and cubes.

This is the coding:

CreateMeshbuilder,

Cylinder, 16, 0.5, 0.5, 3.2
Translate, 0.0, 2.6, 0.05

LoadTexture,20th End Wall.bmp
SetTextureCoordinates, 0, 0  , 0
SetTextureCoordinates, 1, 0  , 1
SetTextureCoordinates, 2, 0.8, 0
SetTextureCoordinates, 3, 0.8, 1
SetTextureCoordinates, 4, 1.6, 0
SetTextureCoordinates, 5, 1.6, 1
SetTextureCoordinates, 6, 2.4, 0
SetTextureCoordinates, 7, 2.4, 1
SetTextureCoordinates, 8, 3.2, 0
SetTextureCoordinates, 9, 3.2, 1
SetTextureCoordinates, 10, 4  , 0
SetTextureCoordinates, 11, 4  , 1
SetTextureCoordinates, 12, 4.8, 0
SetTextureCoordinates, 13, 4.8, 1
SetTextureCoordinates, 14, 5.6, 0
SetTextureCoordinates, 15, 5.6, 1
SetTextureCoordinates, 16, 6.4, 0
SetTextureCoordinates, 17, 6.4, 1
SetTextureCoordinates, 18, 5.6, 0
SetTextureCoordinates, 19, 5.6, 1
SetTextureCoordinates, 20, 4.8, 0
SetTextureCoordinates, 21, 4.8, 1
SetTextureCoordinates, 22, 4  , 0
SetTextureCoordinates, 23, 4  , 1
SetTextureCoordinates, 24, 3.2, 0
SetTextureCoordinates, 25, 3.2, 1
SetTextureCoordinates, 26, 2.4, 0
SetTextureCoordinates, 27, 2.4, 1
SetTextureCoordinates, 28, 1.6, 0
SetTextureCoordinates, 29, 1.6, 1
SetTextureCoordinates, 30, 0.8, 0
SetTextureCoordinates, 31, 0.8, 1

And a screen showing the textured cylinder



Offline Pacific385

  • Dispatcher
  • ****
  • Posts: 749
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Texturing Cylinders
« Reply #4 on: January 28, 2012, 09:22:15 pm »
It worked, thanks. One thing though, is it possible to have the image repeat only once?
« Last Edit: January 28, 2012, 09:31:08 pm by Pacific385 »

Offline TJay1724

  • Developer
  • Conductor
  • **
  • Posts: 150
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Texturing Cylinders
« Reply #5 on: January 28, 2012, 10:40:07 pm »
It should be. Just play around with the coordinates.

Offline Pacific385

  • Dispatcher
  • ****
  • Posts: 749
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Texturing Cylinders
« Reply #6 on: January 29, 2012, 11:34:45 am »
It should be. Just play around with the coordinates.
You have to keep the numbers in proportion (ex. 6.4 becomes 1, 5.6 becomes .875, 4.8 becomes .75 and so on) Take the original number and divide it by 6.4 (or the greatest number there)