[solved]2d uv display from a model

Hello I wanted to know if anyone in this forum tried to visualize 2d uv maps of a 3d object, I would like to know if there is a way to do it.
something as seen in the picture

https://help.autodesk.com/cloudhelp/2018/ENU/Maya-Modeling/images/GUID-30DA8E8A-FDFB-49F2-B181-C82F15158F46.png

1 Like

You can render it with a canvas and lines, just draw lines using the 2D UV coordinates of the geometry.

1 Like

it’s a good idea, although it would be better to be able to use the three scene

Three.js has nearly the same API for drawing line as 2D canvas. Check the ‘lines’ examples to see how to use it:

https://threejs.org/examples/?q=lines

2 Likes

oh thank you, it’s a good start for what I want to do

friend any idea how to remove the perspective to the camera of three ?

You need to use the OrthographicCamera for that. It’s nice that THREE supports a similar api to the in-built canvas one, but it’s purpose is rather for 3D and is less efficient for memory when drawing/constructing frequently in it’s default implemention, if i’m going to be a little nitpicky. :grimacing:

Using the default canvas might rather fit your needs maybe, since it also allows better antialiasing and thickness support. Or is there a specific reason using THREE for this task?

1 Like