Jump to content

[SOLVED] pivot rotation?


photo

Recommended Posts

  • 2 weeks later...
demostenes,

It seems that when you exported .smesh file, you had Align: World option set (since only static meshes (.mesh) can be exported relative their pivot). And if that's the case, it's perfectly proper that a skinned mesh rotates around 0,0,0 coordinate.

 

If you want to use the mesh's center, try to change align option in SMESH Export Options from World to Center. This option will allow you to rotate models around the center of the mesh's bounding sphere, making it easy to place your assets into the scene. In attachment you'll find .smesh file exported with Center alignment option.

 

center_align_smesh.png


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

Link to comment

Hello,

 

thanks for answer, I was wrong, it is normal mesh, not smesh, but it shouldnt make difference. Anyway exporting with Center option does not solve the problem, because then even placing of object is done by its center, but we need to place object via 0,0,0 and rotate around pivot. It is issue, we will probably solve it by manual rework of some scenes.

Link to comment

Well, I'm afraid it's not possible to place object via 0,0,0 and rotate around another pivot point at the same time.

 

Exporting with pivot works fine, QA department just double-checked it, and in this case the model is both placed by and rotated around the given point.

Link to comment

Hi demostenes,

 

"we need to place object via 0,0,0 and rotate around pivot."

 

There is a way. We do it all the time.

What I think you are after is a nested reference node. ( a reference inside a reference) This is how we place in max many objects (refNodes/assets) and transfer their max world transforms to unigine.

 

We have scripted a "MassExport" maxscript for this task.

 

The principle in Short version:

Auto create nodes from objects pivots

From a selection in max, the script will export a refNode,textures, and meshes (and mat if desired) per object in max, once you hit the go button. It creates these individual refNodes at their object pivots in max.

Auto create one referenceNode from previous selection (whether one object or many)

This part of the script generates one refNode with all the previous refNodes (created at pivots) and their world transforms from max.

 

Import the latter single refNode into ungine as a live node, and each object in unigine is now the same world positions as in max - and can be transformed about its pivot.

 

It will work for single objects as well.

 

Confused? I am every time I try to explain it. :D

Link to comment
×
×
  • Create New...