Jump to content
Masoud

what is a "Map Offset" in geometry spreadsheet?

Recommended Posts

Hi;

In geometry spreadsheet, (points, vertices,primitives) there is a hidden attribute called "Map Offset", that I can't find any document about it.

 

Thanks for helping.

Mapoffset.JPG

Share this post


Link to post
Share on other sites

Houdini stores geometry attributes in continuous chunks of memory containing float/int values (i.e. arrays in C parlance). In other words Houdini's geometry is not designed with object oriented paradigms called array of structures (AOS) where every element is created and stored separately, but it exhibits design called structure of arrays (SOA), which keeps all values of all elements of particular types together. In time, during geometry processing, some of the points /prims might have beed deleted or rearranged. To mitigate the cost of altering those arrays (what basically means allocating new ones), Houdini can decide to leave "holes" in those arrays after entires which are not valid anymore. Because of that Houdini needs to keep track of offsets from the arrays to the actual elements, so that algorithms know where to find right values (that is: third array's entry might not belong to third point in geometry). 

You can see how it works in action. Create a bunch of points (Grid->Scatter), check that map offset equals points numbering(+1). Now append delete SOP and nuke half of incoming points (operation: Delete by Range) and see what's happened with map offset. Now for second point, map offset equals 3, not 2. Then Append SortSOP and see how point ordering and Map Offset equal again.

  • Like 3

Share this post


Link to post
Share on other sites

Thank you very much for your detailed explanation. Is there any document about this in sidefx help pages?

Share this post


Link to post
Share on other sites
2 hours ago, Masoud said:

Thank you very much for your detailed explanation. Is there any document about this in sidefx help pages?

Sure there is:

Geometry Introduction 

cheers!

skk.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×