Tugcga / Sycles

Cycles render integration into Softimage
5 stars 1 forks source link

Distorted subdivided uvs #2

Open Tugcga opened 1 year ago

Tugcga commented 1 year ago

In some cases subdivided algorithm produce distortion uvs. Here is an example. uv_distort At the right - subdivided geometry with texture inside Softimage. UVs of this model subdivided by internal Softimage algorithm. At the left - the same mesh, subdivided by internal Cycle algorithm. May be this is correct for Blender, but it's not convinient that the results are different.

May be the addon requires the custom implementation of the subdivision process, which use the OpenSubdv library. It's complex task, because subdivision requires not only for the mesh, but also for every ICE attribute, vertex color, weightmaps and so on. Also it should subdivide the mesh for each motion step, if motion deformation is activated.

For more control, it should implemented the method to convert Softimage mesh geometry to some special format. Then the data in this format passed into OpenSubdiv, and then extract Cycles Mesh object from it. This special format should supports:

After subdivide process, we should extract not only subdivided data, but also normals for each subdivided polygon corner. As I remember, there are some problems with extracting normals. In some cases normals should be calculated manualy by using coordinates of incident vertices and cross-product.