Daniels118
Advanced Member
Italy
Joined: Nov 17, 2021
Post Count: 493
Status:
Offline
|
|
|
Re: Furniture to Solid
|
The "center" is a relative concept. SH3D calculates the center of a furniture as follows: it iterates over all vertices and creates a bounding box; then it uses the midpoint of XZ boundaries along with the lowest Y. This value is then negated and used as a translation offset in the transform matrix. No value is modified in the vertex array. When you move the furniture in the plan, an additional transform matrix is applied based on position, rotation and scale of the furniture in plan (the values which you see in the furniture properties window). Again, no value is modified in the vertex array; this happens in the rendering pipeline at each frame rendering. When you export the selection to OBJ, a new vertex array is built with all transforms applied. I don't remember if a further step is made to center the resulting model within the boundaries, but if you need it you can do it yourself as described before: iterate to build the bounding box, calculate the center offset, the iterate again to apply the offset.
|
[Nov 26, 2025, 4:13:17 PM]
|
|
[Link]
|
|