Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualBarrySkellern

Posted 18 January 2013 - 06:30 AM

In general any point on the surface of the cylinder (radius not being relevant here) can be uniquely identified by two numbers: the distance along the axis of the cylinder and the angle around the cylinder. Those coordinates will range from 0 to the length of the cylinder, and 0 to 2*pi in angle. If you scale them both by dividing by the relevant range you will get two coordinates running from 0 to 1. Those could be used as your texture coordinates to sample the image. You will need to make a choice of which end of the cylinder is the "bottom" (i.e. the end at u=0) and what angle should be the "seam" (i.e. at v=0 and v=2*pi). Notice that the angle coordinates will repeat at this seam, so your texture will have to repeat in the corresponding direction so as not to display a visible discontinuity.

 

For more info, see e.g. http://en.wikipedia.org/wiki/Cylindrical_coordinate_system

 

Hope that helps.


#2BarrySkellern

Posted 18 January 2013 - 06:29 AM

In general any point on the surface of the cylinder (of unit radius...) can be uniquely identified by two numbers: the distance along the axis of the cylinder and the angle around the cylinder. Those coordinates will range from 0 to the length of the cylinder, and 0 to 2*pi in angle. If you scale them both by dividing by the relevant range you will get two coordinates running from 0 to 1. Those could be used as your texture coordinates to sample the image. You will need to make a choice of which end of the cylinder is the "bottom" (i.e. the end at u=0) and what angle should be the "seam" (i.e. at v=0 and v=2*pi). Notice that the angle coordinates will repeat at this seam, so your texture will have to repeat in the corresponding direction so as not to display a visible discontinuity.

 

For more info, see e.g. http://en.wikipedia.org/wiki/Cylindrical_coordinate_system

 

Hope that helps.


#1BarrySkellern

Posted 18 January 2013 - 06:29 AM

In general any point on the surface of the cylinder can be uniquely identified by two numbers: the distance along the axis of the cylinder and the angle around the cylinder. Those coordinates will range from 0 to the length of the cylinder, and 0 to 2*pi in angle. If you scale them both by dividing by the relevant range you will get two coordinates running from 0 to 1. Those could be used as your texture coordinates to sample the image. You will need to make a choice of which end of the cylinder is the "bottom" (i.e. the end at u=0) and what angle should be the "seam" (i.e. at v=0 and v=2*pi). Notice that the angle coordinates will repeat at this seam, so your texture will have to repeat in the corresponding direction so as not to display a visible discontinuity.

 

For more info, see e.g. http://en.wikipedia.org/wiki/Cylindrical_coordinate_system

 

Hope that helps.


PARTNERS