Jump to content

houdini precision


jonp

Recommended Posts

I'm working on a project that takes place in space, which means there are huge scale differences between some objects. I've hit a six decimal place wall using a scaled null parent, as well as using the xform SOP. Is it possible to increase Houdini's calculation precision? I've got a few ugly workarounds in mind, but would prefer not to implement them.

Link to comment
Share on other sites

IIRC object space transforms are calculated in single precision float and at the SOP level in double...

on The Wild we had a number of situations that caused insane (and amusing) issues because of this...I /think/ we wrote something to do doubles at object space...I'd contact SESI directly and ask for their help...

personally I'd try to work out a way to have two (or more) scales operating at the same time...make big stuff smaller and make small stuff bigger, but this would depend on what you're doing...

HTH

Link to comment
Share on other sites

I think the issues solved on The Wild had to do with adding double precision to certain parts of Houdini such as the Character based SOPs and some of the issues with CHOP solvers... Or something like that. It's been a long time now.

Houdini uses regular floating point values for all transforms including object and SOP transforms at this point in time. Many SOPs use double precision units internally but that won't help you when you are transforming your geometry way out and then back again. It's the 30,000 value that will give you precision issues. Usually values up to 20,000 are fine but as you get to the boundary of single floating point values, you get less and less precision as there are less significant digits available to represent the value faithfully.

The way to get around these issues is to use a combination of Object and SOP level transforms and Object Merge SOP to move the geometry back and forth.

See the attached hip file for one way to deal with geometry very far from the origin. In the attached hip file, you will notice that I put a null first with the transforms then the object with zero transforms. You can also zero out the values in to the Pre-Transform of the object as that is like a virtual null. This is done to avoid any precision problems you may encounter if you start to animate with large values at the Object level.

The Object Merge SOP in a separate object is used to fetch the geometry without specifying and Transform Object as that would re-introduce the precision problems. Just toggle the display between the two cameras.

Tip: You can daisy chain objects and nulls by using units up to 16,000 to 20,000 units pushing geometry way out there.

precision_scatter.hip

Link to comment
Share on other sites

I think the issues solved on The Wild had to do with adding double precision to certain parts of Houdini such as the Character based SOPs and some of the issues with CHOP solvers... Or something like that. It's been a long time now.

Nah... we changed the methodology so character geometry was still cached out local the the transforms in the rig. Some of the animation was still a bit crazy as the unit space was not conducive to the translations. THere was a hook built in so the rendering was offset when it went to rib. We did find a bug in the deformSOP and that was fixed pronto. Once you go to CHOPs the data is single precision. once you see the translates in the channel editor that data is single precision.

The way to get around these issues is to use a combination of Object and SOP level transforms and Object Merge SOP to move the geometry back and forth.

The Object Merge SOP in a separate object is used to fetch the geometry without specifying and Transform Object as that would re-introduce the precision problems. Just toggle the display between the two cameras.

precision_scatter.hip

Old schools is correct you can minimize it but any use of the ObjectMerge will just bring it back. I'm glad he mentioned it.

Regarding some of the actual results of tools in SOPspace. Yes you will get better results in a larger scale. Just gives the tools a better chance to do the math involved. There is a sweet spot so just test alot.

-k

Link to comment
Share on other sites

IIRC object space transforms are calculated in single precision float and at the SOP level in double...

Just to clarify, object transforms are internally stored in double precision. SOP point positions are stored in single precision. I don't think michael realized that he typed in the inverse of what he meant. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...