Jump to content

How to set which side rendered in Unigine script on skinned mesh


photo

Recommended Posts

Posted

Hi,

 

i change position of vertex in skinned mesh, it simple rotation of 90 degrees around Z axis.

 

I have problem with which side of surafce to render, it render the inside side, i need to render outside side.

See the picture  and post-716-0-31129000-1480863809_thumb.png.

 

How can set/fix it on the skinned mesh in Unigine script?

 

Thanks

Honya

post-716-0-85522400-1480863576_thumb.png

Posted

Hi, use case is following. We are creating in-engine tool, which allows simple operations with meshes/skinned meshes (change and save as new mesh). Change position (done), merge 1-n meshes together (done), merge mesh surfaces (done, we only need this bug fixed: https://developer.unigine.com/forum/topic/3496-wrong-output-from-objectmeshskinnedaddmeshsurface-function/)and now  simple rotation (90,180,270). 

 

Reason is simple, these operations with meshes are required VERY often. Almost each mesh needs various tuning after import and experience with real usage. We are building from smaller parts (like lego) and then optimizing these parts by exporting such objects and doing various surface merging, etc...Also for tuning of character equipment (skinned meshes) dozens of small corrections are needed.

 

Not every member of team is skilled in 3dsmax/maya and for example rotation of skinned mesh or merging skinned mesh surfaces is HUGE pain in maya/3dsmax. It is like alchemy sometimes. I ve noticed, that almost each engine has such plugin (now we understand why). So we have decided to write own tool, because it is not much work (code is mostly done from our character equip system) and increase in productivity will be huge (one button skinned mesh rotation/surface merge instead of alchemy in 3dsmax/maya). 

 

Edit: I know, that rotation, position and scale can be changed easily in editor via mesh export functionality, which is great, but it works only for standard meshes, not skinned.

Posted

Hi silent, there is rotation.rar simple scene, that change position of vertex, it save new skinned mesh to .\rotation\meshes\90.mesh file.

I also try to modify tangent, but without result.

 

Honya

Posted

Hi Honya,

 

When you use this transformation for all vertices in your sample:

vec3 position = vec3(vertex.y, vertex.x, vertex.z);

result mesh is not rotated but mirrored along the plane X=Y.

 

I suggest using this transformation instead:

vec3 position = quat(0, 0, 1, -90) * vertex;
Posted

Hi ded,

 

thanks for the answer, that what you suggest is working for me good.

 

I have another question, can be called functionality of Smooth Mesh from Resource editor in Unigine script?

 

Thanks

Honya

Posted

honya,

 

I'm afraid there is no direct analogue in UnigineScript. You can check the smooth function algorithm in ResourceEditor and try to port in to UnigineScript.

 

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...