Skip to content

Texture repeat: natural dimensions #156

@dhasenan

Description

@dhasenan

If I have a tiling texture, it's probably a texture I want to tile an appropriate number of times for whatever length of mesh I assign it to. For instance, I want a brick texture that I can tile across various walls. These walls will vary in height and width, but the texture should be applied at the same scale for all of them.

The API allows me to specify that a particular texture should repeat a specific number of times. Using that, I will create a material and a texture, tell it to repeat X times on the X axis, and apply it to wall 1. It works! Then I apply it to wall 2, which is half the length...and now the texture is horribly squished.

So now I have to look at the geometry of the object I'm working with, usually a cube, and create a new texture and new material for each face, calculating the number of times the texture needs to be repeated for each. This is, needless to say, quite vexatious, not to mention inefficient.

It also doesn't mesh (sic) with the naive notion of a material, which is something you should be able to reuse for many different meshes. As is, you can only reuse a material when rendering identical faces of different meshes, faces that are the same size by happy accident. Unless you want horribly distorted textures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions