Jump to content

modifying the crowd shapelib with external data


Recommended Posts

I have been poking around the shape library generated as part of the crowds agent definition on disk. It seems to only want bgeo packed prims adding all shapes used via declared layers into the single bgeo file.

This potentially means bringing in geometry from disk ala file sop, since Agent Layer want an oppath, pointing to it and having the definition bake the unmodified geometry to disk landing in smoo_shapelib.bgeo Toggling "keep external" doesnt seem to affect this.

this all seems a little inefficient. It would be desirable to include items already on disk. Agent Clip sop seems to afford this via "keepexternal' and source as file. There seems to be nothing equivalent for dealing with shapes and layers.

Does anyone know a technique to achieve this?

I did find a hopeful detail attrib on the generated shape lib, but no info seems to be available on the detail attrib "shapelib_include" -- although I imagine it might be what Im looking for but am unsure what it expects.

Any info or idea on this attrib, how to include external geometry on disk (if possible) and preferably not have it re-cached out and remain as included would be great. The documentation on the shapelib seems to be minimal. thans ahead for thoughts and idea.

Dan [eyevex] (|;-D>

 

Link to comment
Share on other sites

The docs on the 'shapelib_include' attribute were missed when it was backported to 16.0 - tomorrow's build will have some info about it on the /crowds/agents help page (pasted below). It allows the shape library to be split across multiple files on disk

Quote

The shapelib_includes string array detail attribute can be used to specify additional shape libraries that should be included when the library is loaded. This attribute is expected to have a tuple size of 2, with each pair containing the condensed path (e.g. a path relative to $HIP or $JOB) along with the absolute path to the shape library file.

 

Link to comment
Share on other sites

That's awesome and sounds like it may be what I am looking for!

A couple of followup questions -- if you know....

Both the paths in the tuple are pointing to the shape lib? A little confused about the first element... as the agent def could be used in multple files and locations for crowd setups. are both elements required?

Do the shape libs included need to generated via agent caching or can I include any bgeos -- just ass the name attib? I would still assume only packed and bgeo?

 

Link to comment
Share on other sites

On 18/05/2017 at 2:37 PM, eyevex said:

That's awesome and sounds like it may be what I am looking for!

A couple of followup questions -- if you know....

Both the paths in the tuple are pointing to the shape lib? A little confused about the first element... as the agent def could be used in multple files and locations for crowd setups. are both elements required?

Do the shape libs included need to generated via agent caching or can I include any bgeos -- just ass the name attib? I would still assume only packed and bgeo?

 

The tuple size is required to be 2, but the second path is only used if the first one fails to load. This allows you to have a fallback in case your preferred path uses variables that may not necessarily be defined in every situation (or example, you might have a relative path like $HIP/agents/mocapbiped3/shapelib.bgeo so that your setup is portable if you upload it somewhere for rendering). Some applications like geodiff don't have $HIP defined when loading geometry, so the second path could specify the absolute path as a fallback.

Shape libraries aren't required to be generated through the agent ROP. But, they are expected to have the same format (collection of packed primitives with a name attribute)

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...