Can anymody tell me how to tile textures for 3d models? I am able to get a texture onto a 3d model, but the texture needs to be scaled. Obviously I could create a tiled texture, but thats not very efficient, right?
Hmm, close, but its not really what I need. I do have UV's, and dont want to have them generated, and I would like to do it with jit.gl.material, because I also would like to use the hightmap_texture. Usually 3d animation programms (I am using blender) have in their texture settings the ability to repeat (or tile) the image and it is possible to say how many times to repeat in each axis before the newly generated texture it is applied to the models UV's.
Maybe I have to do it the same way, loading the texture, then repeating it, and then apply it to the material. but this gives in my case a very large texture (if I wanna keep the details).
For reference, here's a shader that does texture tiling. It obviously doesn't do all the cool stuff that jit.gl.material does, but if you wanted to go this way, it's not super complicated. In a lot of 3D apps, this sort of thing is part of the default material shaders that are applied when rendering.
excellent. now I also understand the function of "sendmaterial": it allows to access the imported materials with collada files and the likes. is it possible to send a complete material (defined with a jit.gl.material object) to a drawgroup aswell? or even reference it?