Merge Geometry

   4837   14   2
User Avatar
Member
201 posts
Joined: Jan. 2013
Offline
Hi!

I don’t understand why combining geometry from several pieces previously stored on disk does not work.
My sequence of actions is as follows:

1) We find through the template all files with the extension bgeo.sc
2) Then we combine them into one stream
3) We import all the found files into one stream.

But for some reason, I only load the first piece of geometry, although I specified the desired switch in the menu.

Tell me, what am I doing wrong? If you give an example of the correct layout with a scene, it will be generally great!

Attachments:
Screenshot_2020-03-31_18-24-12.png (274.5 KB)

User Avatar
Staff
585 posts
Joined: May 2014
Offline
You have “Store Geometry” set to “None”. That means the geometry import is going to merge the geometry and then not store it anywhere. In that case the node reports input files back to output files. If you change that parm to “External File”, the node will write your merged geometry to disk.
User Avatar
Member
201 posts
Joined: Jan. 2013
Offline
Thanks, tpetrick! Really it works. I was confused by the fact that the expression @pdg_input in the file node returned not the combined object, but only the first one.
User Avatar
Member
691 posts
Joined: June 2006
Offline
tpetrick
You have “Store Geometry” set to “None”. That means the geometry import is going to merge the geometry and then not store it anywhere. In that case the node reports input files back to output files. If you change that parm to “External File”, the node will write your merged geometry to disk.

Hi tpetrick,

I dont understand the option of Output Type Geometry, the help says:
Geometry Output geometry is loaded from a geometry attribute on the work items in the TOP Network output node. The name of the attribute is configured using the Output Attribute parameter.

Do you have an example to use this option?

Also if for example I want to merge all the geo like hou.alex.get example, how can I add a point group or an attribute identifier to each work items geometry to then have control of filtering or to separate each piece when all is merged?

Thanks!

Alejandro
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Staff
585 posts
Joined: May 2014
Offline
The “Geometry” output type stores the geometry directly onto the work item, without writing it to disk. It's kept in memory as part of the work item itself. That geometry can only be used by nodes that support it, which currently includes the Geometry Import and the Invoke node. It's primarily used for in-process geometry processing using the Invoke and compiled blocks. The TOP Geometry in SOPs is also able to pass in-memory geometry data back to SOPs. I'll make you an example today.

There currently isn't a good way to add attributes to the geometry prior to merging it, but I'll log an RFE to add support for that.
Edited by tpetrick - April 1, 2020 13:21:36
User Avatar
Member
691 posts
Joined: June 2006
Offline
tpetrick
The “Geometry” output type stores the geometry directly onto the work item, without writing it to disk. It's kept in memory as part of the work item itself. That geometry can only be used by nodes that support it, which currently includes the Geometry Import and the Invoke node. It's primarily used for in-process geometry processing using the Invoke and compiled blocks. The TOP Geometry in SOPs is also able to pass in-memory geometry data back to SOPs. I'll make you an example today.

There currently isn't a good way to add attributes to the geometry prior to merging it, but I'll log an RFE to add support for that.

Thank you very much for the answer!

I'm doing some experiments at sop level, so I was using the TOP geometry to wedge parameters in a sop tree to create different variations of the same tree without over-complicate things using takes or even to create a full TOP network out of my context. That's why I was needed to have like an identifier to then filter each wedge out of the merged geometry. I make it work but using an invoke over the merge geometry to create point groups or int attributes for the filtering, but it will be nice to propagate task attributes over the geometry.

Thanks,

Alejandro
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Staff
585 posts
Joined: May 2014
Offline
I've attached a very small example of the geometry storage type. The Geo Import inside of the TOP Geometry network is configured to use that storage type, followed by an Invoke that runs a simple compiled block for each work item. The results are returned back to SOPs using the geometry storage type as well.

There are a few more RFEs related to the one you mentioned that I'd like to get to as well. I'll see if I can find the time next week to tackle all of those since they're all related to geometry processing using the TOP Geometry and/or geo import.

Attachments:
geo_example.hip (103.0 KB)

User Avatar
Member
691 posts
Joined: June 2006
Offline
Thank you very much for the example file!

Thanks also for these RFEs; TOPs is speeding up my workflow nicely, and having this type of options for a better SOP integration will make this amazing context shines even more.

Thank you!

Alejandro
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
159 posts
Joined: Feb. 2018
Offline
Thank you for the example, but I wonder how to visualize SOP result geometry property in pure Top network. We can visualize geometry results with a file node and set the file path to `@pdg_result` but not work with geometry property.
User Avatar
Staff
585 posts
Joined: May 2014
Offline
The only way to do that now would be to have the geometry returned as the output of a TOP Geometry, and display it in the SOP network itself. That's also on our list of things tackle to improve geometry workflows with TOPs, but unfortunately it's a bit trickier than some of the other RFEs for those nodes.
User Avatar
Staff
585 posts
Joined: May 2014
Offline
Hey Alejandro, that RFE you had is fixed in tomorrow's build of Houdini 18.0. There are now controls on the geometry import for creating an attribute on the merged geometry to identify which input file that piece of geometry came from. You can create either an integer attribute which is set to the file index in the list of merged files, or a string attribute which contains the path to the file that geometry came from. Those can be created on points or prims.
User Avatar
Member
691 posts
Joined: June 2006
Offline
That's amazing Tpetrick thank you very much! I'll test this tomorrow for sure.
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
691 posts
Joined: June 2006
Offline
Hi Tpetrick!

I just tested the new file merging options found on the TOP Geometry Import node, it works great, thanks for this.
I have a couple of questions, its possible to have this behavior also with the in memory option aka Geometry Attribute? so not just when you use explicit files?; I noticed also that the TOP Geometry has some merge options in the output tab (Merge All Files toggle),I think it will be very useful if we have the options for creating the identifiers there as well, so you don't have to create another TOP Geometry Import node to have this functionality.

Please let me know what do you think!

Thanks,

Alejandro
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
252 posts
Joined:
Offline
Alejandro Echeverry
its possible to have this behavior also with the in memory option aka Geometry Attribute? so not just when you use explicit files?
I would also love to have this option.. very useful for in-process tasks.

edit: submitted RFE #106097
Edited by galagast - June 21, 2020 20:03:08
User Avatar
Member
252 posts
Joined:
Offline
merging of geometry data is now implemented in latest daily!

18.0.506
“The Geometry Import TOP node can now merge upstream geometry when the Geometry Source parameter is set to Geometry Attribute. This is an addition to the existing merging functionality that was available when Geometry Source was to Upstream Files.”

tested it and it works!
  • Quick Links