- Home /
Mixing UVMapping and Tiled texture using 1 material on 1 mesh
Hey all,
I'm trying to texture a large terrain (using a mesh). On that large mesh i have zone where i don't need precise texturing work. And of course i have zones where the texturing must be very precise: where the player is the mostly.
I was thinking about that solution: - Use UVMapping for zone where the texturing is important and must be precise. - Use tiled texture for zone where i don't care..
But i have one mesh, and then 1 material. For one mesh… How can i mix UVMapping maps and tiled?
I'm not sure of what i'm saying: a specific shader can solve the problem?
Could you show the way and lights to perform this work? Common problems? Then common solutions/articles?
Thanks for help
T
does it need to be one mesh? what is the disadvantage to separating them?
Thanks for your help. I'm using Raycasting to the ground for my character. I was thinking about 1 mesh to avoid raycast bug when switching between several meshes. I'm probably wrong?
I'm not familiar with that bug. I would assume if both meshes are in the same RayCast Layer then they would both be properly detected as a hit.
If you do try, could you let me know if this bug exists? I would appreciate confirmation.
Answer by Jozxyqk · Dec 16, 2012 at 01:54 PM
A texture always needs to be UV-mapped in a sense. Tiling gives implicit UVs which can be generated on the fly. You could use two UV sets for the mesh, but it'd probably be far easier to write a shader to blend a tiled texture with the standard UV mapped one, using scaled object-space X/Z fragment coordinates as the coordinates.
You could also separate the terrain into a high-rez real one and a background-only mesh which is placed underneath the real one. I've seen one of the unity demos do this with multiple unity terrains.
Thank you man for your reply ! I will try to create the shader why strumpy shader editor.
I'm new to shader and it's quite blur for me currently. I will post my WIP with strumpy graph and shader here: for help and help other.
I'm not sure i can separate meshes at the moment.
Answer by toum · Dec 23, 2012 at 10:32 AM
Dear all. I finnaly got a kind of solution for this. To assure details on all terrain mesh, i created a shader which is able put a mass tiled texture with a blended UVMapped texture for zones where i need specific work. I also included normals map inside for both tiled and UVMap texture. Here is the shader result with associated file.
Tom