Jump to content

h12 precision questions


Recommended Posts

I have some questions concerning float precision in H12...

If I plan on doing extreme changes of scale and position with objects, are OBJ transforms, VOP SOPs, object merges and SOP transform nodes all 64bit precision safe now?

Which nodes are still NOT double float ready?

If manipulating points, do I need to cast P into 64bit?

Am I able to specify units smaller than 1e-5 and larger than 100,000 in the interface, or allow myself to do so?

Cheers,

Jon

Link to comment
Share on other sites

If I plan on doing extreme changes of scale and position with objects, are OBJ transforms, VOP SOPs, object merges and SOP transform nodes all 64bit precision safe now?

Which nodes are still NOT double float ready?

Object transforms have always been in double position, but not parameters/channels. In H12, all parameters/channels are in double precision. CHOPs also changed from single to double precision in H12.

Most SOPs are still not double precision ready although there is support for double precision attributes in the new geometry library. I think that the most safe way is if you're only running through a File SOP and your own HDK SOP nodes.

VEX is still single precision.

Am I able to specify units smaller than 1e-5 and larger than 100,000 in the interface, or allow myself to do so?

Yes, you should be able to, esp. with the parameter in "expression mode". For UI purposes, the precision is truncated when viewing them in "value mode".

Link to comment
Share on other sites

  • 2 months later...

Object transforms have always been in double position, but not parameters/channels. In H12, all parameters/channels are in double precision. CHOPs also changed from single to double precision in H12.

Most SOPs are still not double precision ready although there is support for double precision attributes in the new geometry library. I think that the most safe way is if you're only running through a File SOP and your own HDK SOP nodes.

VEX is still single precision.

Yes, you should be able to, esp. with the parameter in "expression mode". For UI purposes, the precision is truncated when viewing them in "value mode".

Thanks for the info. I'd forgotten to check on this and was about to post a follow-up question that you've already answered above.

While it would be nice if VEX could be ported to support 64bit datatypes so we could do VOP SOP operations in 64bit land, it sounds like it would be a harder problem given all of the optimization that has gone into it, so I'm not holding my breath.

Link to comment
Share on other sites

There are too many reasons to list. :) Just some of them off the top of my head:

- There is a *lot* of SOP code. A search and replace may not work as data structures may rely on the size of double precision variables (4 bytes bs 8 bytes).

- Backwards compatibility. If an algorithm uses double instead of single precision, the result can be different, sometimes in dramatic ways. Even if we say that it's ok to break compatibility, regression tests need to be examined and maintained to ensure correctness.

As for VEX, it also heavily uses single precision SIMD CPU instructions for performance.

  • Like 1
Link to comment
Share on other sites

  • 4 years later...

The decimal keyword denotes a 128-bit data type. Compared to floating-point types, the decimal type has a greater precision and a smaller range, which makes it suitable for financial and monetary calculations. Precision is the main difference where double is a double precision (64 bit) floating point data type and decimal is a 128-bit floating point data type.

Double - 64 bit (15-16 digits)

Decimal - 128 bit (28-29 significant digits)

So Decimals have much higher precision and are usually used within monetary (financial) applications that require a high degree of accuracy. But in performance wise Decimals are slower than double and float types. Double Types are probably the most normally used data type for real values, except handling money. In general, the double type is going to offer at least as great precision and definitely greater speed for arbitrary real numbers. More about...Double vs Decimal

George

  • Like 1
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...