honya Posted December 4, 2016 Posted December 4, 2016 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 . How can set/fix it on the skinned mesh in Unigine script? Thanks Honya
silent Posted December 5, 2016 Posted December 5, 2016 honya, What is the use-case of such modifications? Could you please provide a small test scene with your code and mesh so we can check how to reproduce that results?Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
demostenes Posted December 5, 2016 Posted December 5, 2016 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.
honya Posted December 5, 2016 Author Posted December 5, 2016 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
ded Posted December 7, 2016 Posted December 7, 2016 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;
honya Posted December 7, 2016 Author Posted December 7, 2016 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
silent Posted December 8, 2016 Posted December 8, 2016 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts