You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Generally, three.dart is a port of three.js to Dart. Would three.js support your use case? I'm not sure we want to diverge from three.js in terms of API, though every improvement is welcome.
Anyway, I support your opinion that materials should be reusable on multiple objects.
Given that repeats are specified in opengl on a per-texture level, I don't think there is any way around not creating a new texture everytime you want a different repeat.
I guess you could write a custom shader to handle texture repeats perhaps in this manner, so you don't have to bind a texture for every custom repeat.
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.
The text was updated successfully, but these errors were encountered: