Announcement

Collapse
No announcement yet.

3D Tex.Coordinates for basic meshes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 3D Tex.Coordinates for basic meshes?

    When you create a cube or any other standard mesh you can only specify 2 dimensions for the texture tiles which is not suitable for meshes like in the picture. Would it be possible to extend that to 3?

  • #2
    When creating meshes using most geometric primitives in TMeshBuffer, these receive maximum U and V texture coordinates to use, which implies 2D texturing. The third coordinate W is typically used in 3D texturing such as volume textures and texture arrays. Since a 3D cube is composed of six planes, each using only U and V texture coordinates, there is no automatic way to implement what you are trying to achieve.

    If you need to define a field, where top plane will have UV coordinates higher than 1, but side walls to have these in shorter range, you'll need to create the cube yourself. This should not be complicated - just issue multiple TMeshBuffer.Plane calls with the appropriate parameters and normals to orient them accordingly.

    Comment

    Working...
    X