Hi Guys
Coming from an offline rendering background, using 3ds Max, I’m not understanding how real world texture size and UV mapping tie together in Unity.
This is a 3 part question:
Question1
In 3ds Max, I deal mostly with large buildings so pretty much 90% of things get simple box mapping applied, with a tick to enable “Realworld Scale”, which essentially adds a UV of 1meter x 1meter x 1meter. Then in my materials when using any bitmaps…
…I flip a switch from this (similar to what Unity has):
to this, which let me specify the actual size of the texture:
That then gives me a realistic representation of my texture on my objects, in this case 4200mm X 140mm.
That is awesome becaue now I can swop out materials as I please without having to worry about the UV box mapping on my object (which is 1 X 1 X 1 all this time)
If I then import this fbx into Unity however, I loose the real world scale I entered on the texture itself, and it reverts to the tiling method, and thus the scale is now totally wrong.
So I tried making things simple, with a 10m X10m cube, and a simple texture. So by default when importing this, it naturally gives me a cube with the texture repeating 10 times. All good so far. Let’s say I now want to make that single texture 10m X 10m to fill my cube and so have no repeats, but only tile 1 time. Logically the tiling should be set to 0,1 X 0.1 right? So I tried this with shader graph, but the texture does not stretch to 10m to fill my cube, but rather results in something that looks like roughly 9.3meter X 9.3 meter and then the texture repeat and I see another 0.7m on either side of it.
Baking anything is not an option as Buildings are large and the textures need to look good both up close and far away. Bricks for example must be at correct scale so if there are 10 bricks between a window in the architects design, then I’d better show 10 bricks!
Question2
In Max I can have multiple UVmaps on an object. If I use the example above as my base texture in Map Channel1, which is affected by my 1m box UV Map, I can add another Box UV Map and set its size to 100m X 100m and its channel to 2. I can then add a mask over my base textrure in channel 2 that is 100mm and affected by the 2nd UV map.
As far I understand I can’t do that in Unity as the 2nd UV Channel is reserved for Lightmaps… Is that correct? How would I then use different textures in a single material, but use different coords for each?
Question3a
If I tile a texture, it would have an obvious repeating pattern. How can I randomly rotate and offset the texture to reduce the repeating pattern effect?
Question3b
Can I then fade the edges of each randomly rotated tile, to blend into each other a bit, so not to have a hard edge on each tile?