matching uv islands area to model...

   570   0   1
User Avatar
Member
5 posts
Joined: Jan. 2016
Offline
Hello,

I am working on a project with Marvelous designer and I need to Transfrom the model into its uv layout.

getting the points to the uv poitions is quite trivial:

read in the model
vertex split sop
point wangle with @P = @uv;

That will get all the points down to 0-1 but in the UV layout.

The hard part is matching the areas.

That I have tried is:
I measure the total area of both the original model and the UV flatted model.
I get a scale factor by dividing the original area by the UV area.
In another point wrangle I multiply @P *= scaleFactor

float currScale = detail(0, “area”, 0);
float targetScale = detail(1, “area”,0);
float scaleFactor = targetScale/currScale;
@P *= scaleFactor;

This is totally not working lol. I don't know if it is a problem with my logic or my math. If someone could please help that would be amazing.

I have attached an example of my working file.

Cheers,
B

Attachments:
matchArea.hipnc (246.7 KB)

  • Quick Links