Obi Official Forum
Suggestion / Idea Possible option for rotating extrudeMesh uv's - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Suggestion / Idea Possible option for rotating extrudeMesh uv's (/thread-3308.html)



Possible option for rotating extrudeMesh uv's - G_Gawi - 07-02-2022

Hi, satisfied obi rope customer here,



Tho I must add,


It would be nice if there was an option in Obi Rope Extruded Renderer to rotate the generated mesh's UV's per section.


That way there wouldn't be the need to manually rotate all textures so they repeat appropriately.



Ex vertical lines on a texture

[attachment=1268]




Right is current UV Tiling, Left is what a 90 degree rotation of the uv's would look like

[attachment=1269]




Would be real convenient Sonrisa


RE: Possible option for rotating extrudeMesh uv's - josemendez - 08-02-2022

Hi there!

You mean an option to swap U and V coordinates, right? currently the texture will get tiled on the V axis.

Quote:That way there wouldn't be the need to manually rotate all textures so they repeat appropriately.

True, but not sure if having each rope texture in your project rotated in different directions is good. Usually it's better to choose a convention and stick to it. Imagine if Unity allowed you to choose between right and left handed coordinate systems, Y-up or Z-up, etc... this way you wouldn't need to tweak your .fbx export settings, but it would be chaos! Same for normal maps/tangent space: I can't count how many times I've had to invert the R and/or G channels of a normal map in PS for it to work in Unity, but at least all normal maps in a project are consistent with each other.

If you want rope renderers to tile the U coord instead, open up ObiRopeExtrudedRenderer.cs and swap .x and .y at lines 124 and 125:

Quote:uv.y = (j / (float)sectionSegments) * uvScale.x;
uv.x = vCoord;

cheers!