noob: size of object or geometry level ?

   8068   5   0
User Avatar
Member
8 posts
Joined: July 2011
Offline
Noob question:
I can use size parameter on OBJ level or within the OBJ node.
Can you point me to a source with information about the use / implication of the different size parameters?

I think I understand that one is the size of the object container, the other the size of the geometry itself.
But I am not sure when to use which size.
User Avatar
Member
2658 posts
Joined: June 2008
Offline
I typically try to keep object size 1,1,1 and transform at 0,0,0. So I do any scaling and most transformational animation inside the object.

Sometimes you need to operate upon the geometry before or after an animation/transformation. If there are changes one-level up you have to use special code to fetch those values into the SOP. I like to avoid that step and just work directly in the SOP level when possible.

Many times I am ObjectMergeing one object into another as well. When there are transformations on the object you have to take care to let that merge know you want to preserve or ignore them as well.
Edited by Enivob - April 16, 2017 09:24:31
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
The scale on an object node makes up part of its transformation. Each object, be it a geo container, null, or subnet, camera, etc has a transformation matrix that places it in the scene. The matrix can include translates rotates and scales. Shears are possible when setting the matrix directly, but this is only possible on a python object. All other objects must have their matrix set through TRS values. Transformations are also possible directly on the geometry itself. But this transformation is ‘baked in.’ Once transformed, the geometry no longer has any reference to its original frame (packed primitives are an exception, and behave more like meta objects.) If a transformation is animated on the geometry, then the geometry must be re-computed for every time step, and downstream changes will likewise be time-dependent. When writing out the geometry, it must be saved as a sequence or animation. Object level transformations are ‘deferred,’ they are not applied except during rendering and display, or when merging an object's geometry into another, it can be explicitly applied. For an object with an animated transform, if you need to write out geometry, that is otherwise not deforming (changing over time), a single frame is all that need be recorded, as the animation exists only as a transformation at object level. Working this way can massively increase scene performance, and reduce file cache sizes.

Jonathan Mack
User Avatar
Member
16 posts
Joined: Dec. 2014
Offline
Is it possible to query the size of the geo node ($SIZEX equivalent for an obj level node) ? I have a pipeline where I am importing fbx files which can be created in either meters or centimeters. I am intending to write a small python script which scales the fbx geo by the conversion scale factor in the event that the imported geo is smaller than expected than if it were in meters. The fbx files are also made up of several sub-components so recursively diving into the children nodes to find a SOP node isn't feasible because the sub-component could possibly be much smaller than the size of the whole fbx file. There are no user-intervening steps in the pipeline so its not possible to do this by manually observing the fbx's size after import and scaling accordingly. Any tips or advice is much appreciated! :{D

Thanks in advance!
User Avatar
Member
16 posts
Joined: Dec. 2014
Offline
I figured out a solution to my problem and wanted to share in case anyone else has a similar question in the future.
What I did was use a little py script to merge all the pieces of the fbx into a obj merge node, that way I can check the bounding box info and any other geometry level attributes.

Cheers!
User Avatar
Member
8 posts
Joined: July 2011
Offline
Thanks for all the information.
  • Quick Links