WIP | USD Attribute Mapper [Houdini Utility]

   2721   9   3
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
Hi everybody!

I decided to participate on this H20 Tech Art challenge with this tool called "USD Attribute Mapper", I hope you like this tool and find it useful as the other ones

The idea behind the tool:

One of the most concurrent places to work in Houdini is SOPs, due to this fact, it means that we can have access to a huge set of tools to do an infinite kind of operations to attributes. In SOPs we have multiple ways to create and modify an attribute, the modifications can be done in multiple ways using built-in tools or external libraries like MOPs.

On my short working experience with Solaris, I found that level of accessibility is missing right now due to the nature of USD, where we don't have one node to create an attribute and we need to work with VEX if we want to create an attribute or do complex modifications (i.e. modify an attribute based on the prim position, etc).

With that in mind, I decided to create a tool that can allow to modify an existing USD attribute from a primitives selection or even create an attribute with a more familiar UI to the one that we find in SOPs, this should be compatible and useful for a lot of workflows and type of artists (FX, motion, layout, etc).

Final Release:



Beta Demo:





You will find the current HDA version and an reference hip file attached below with multiple example setups.

Tool Concept:



The USD Attribute Mapper works mainly in two steps:

1 - Create a SOP attribute inside to be used for remapping.
2 - Select the operation type to be used on the mapping/modification of the USD attribute.


Examples:



As the image specifies, the created SOP attribute can be used to modify the lights properties (height, width, intensity, etc) and it can be used to slowly enable all the lights on the scene or change their color, etc.

Using the same example, with MOPs we can use the shape falloff nodes to control the USD attributes with a tridimensional shape mask.

In the video below you can see the lights example and one example modifying the "size" attribute from a cube prim:



*In the video in the end I modified the PSR of the points just to show that is still possible to do inside of the node like on the SOP Modify lop node.



Some extra notes:

- There is some basic combination operators available like: Add, Subtract, Multiply and Divide.
- Multiple mappings can be done at the same time but always with the same pattern selection of primitives.
- The USD attribute can be imported in SOPs if it is needed, this might be useful in some cases (depending the type of the attribute this might not work, USD can store multiple types of attributes and in multiple ways, not all of then will be compatible with this workflow).
- A public beta build is not ready yet.


Roadmap:

- Add the possibility to create an USD attribute.
- Add the possibility to create an USD attribute as primvar with "constant" interpolation.
- Add the possibility to create an USD attribute as primvar with "vertex" interpolation.
- Operations: add support for maximum and minimum.
- Operations: add support for "Remove"/"Clean" attribute (this might be useful in some very specific cases).
- Control when the USD attribute can be imported or not on the SOPnet.
- UI improvements.
- Update extent usd attribute checkbox.
- Support for read/remap array attributes.
- Improve auto-data type combination.
- Update timeSamples in USD if remap is time dependent.
- Code reorganization (Probably this one can always be improved).
- Icon design. pending to upload.
- Documentation/Help cards. pending to upload.
- Rename USD attribute as USD standard attribute or as primvar. pending to upload.
- Create mode: per prim attribute variation. pending to upload.

----------

I hope you like it and find it useful for your everyday workflow.

Cheers!
Edited by cdordelly - Jan. 14, 2024 23:30:35

Attachments:
USD_Attribute_Mapper.hdalc (142.1 KB)
usd_attribute_mapper_lop_demo_scenes_v2.hiplc (1.5 MB)

User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
UPDATE:

- Added support for "Create" operation.
-- Added support for create an USD attribute.
-- Added support for create an USD attribute as primvar with "constant" interpolation.

This one can be useful to create data for render engines:



----------
Public beta build is not ready yet.
----------

I hope you like it and find it useful for your everyday workflow.

Cheers!
Edited by cdordelly - Jan. 4, 2024 17:04:54
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
UPDATE:

- Added support for create an USD attribute as primvar with "vertex" interpolation.

The expected/unexpected obstacle with this feature was that a "vertex" interpolation stores the attribute as an array with a size of the amount of points that the prims has, it means that not all the primitives are "compatible" with this because not all the prims can have "points/vertex".



This mean even if the "vertex" interpolation is selected on the UI, it will be only applied into compatible prims such as: Mesh, Points, BasisCurve and Point Instancer:



----------
Public beta build is not ready yet.
----------

I hope you like it and find it useful for your everyday workflow.

Cheers!
Edited by cdordelly - Jan. 3, 2024 01:04:38
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
UPDATE:

- Added support for maximum and minimum.



- Support for "Remove" an USD attribute was removed because it can't work on an override workflow, it works only when you edit am USD layer directly.

----------
Public beta build is not ready yet.
----------
Edited by cdordelly - Jan. 4, 2024 17:03:59
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
UPDATE:

- UI: General UI improvements.
- UI: Support for selection arrows for USD and SOP attributes for faster selection.
- Support for import the USD attribute in the SOP network.



----------
Public beta build is not ready yet.
----------
Edited by cdordelly - Jan. 5, 2024 09:12:35
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
UPDATE:

- Update extent usd attribute checkbox.
- Support for read/remap array attributes.
- Improve auto-data type combination.
- Update timeSamples in USD if remap is time dependent.

I updated a few important pending things, the data auto-combination was one of the biggest pending features and basically it offers the automatic compatibility between different data types, allowing to save of time to create the same data type to do remaps/combinations. With this, for example, you can multiply each component from a vector using a single float attribute created in SOPs, this is the concept of the current allowed data types combinations:



Another important feature is to write the remaped data as "timeSample" data on the USD stage, the current version support to store the data as timeSample if the internal SOP is timeDependent or the UI remap parameters.

Here is a more detailed demo of the Import Attribute to SOPs feature:



----------
Public beta build v0.1 will be shared on next post.
----------
Edited by cdordelly - Jan. 7, 2024 23:12:13
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
UPDATE - Beta v0.1:

Hi!

Finally here is the first public beta build of the USD Attribute Mapper . I'm sharing it together with a hip file that contains 12 simple examples with different kind of usages (edit USD attributes reading the original USD attributes, creating attributes, preparing attributes for rendering, etc) I tried to use a combination of simple setups with vanilla nodes and also with MOPs (the best Houdini library on the neighborhood :P) so you can explore multiple techniques to modify the data to be used on the remap combination.

USD Attribute Mapper - Beta Demo 01



*I forgot to add the Karma and RS examples on the video but you will find them on the hip file.

Main pending tasks:

- Icon design.
- Documentation/help cards.
- Test a few other ideas.

----------
This version of the HDA is also on the first post, may be replaced by a newer version later on the first post.
----------

I hope you like it, and let me know in case you find any issue by sending a simple repro file.

Cheers!

Attachments:
USD_Attribute_Mapper.hdalc (26.8 KB)
usd_attribute_mapper_lop_demo_scenes.hiplc (1.3 MB)

User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
Hi!

Here is the latest version of the USD Attribute Mapper and probably the build that will be submitted to the challenge . This build has a few new things, fixes and improvements:

The first important thing is that now the mapping methods are extended and categorized to 3 (at conceptual level of the tool, the UI is basically the same):

- Modify the source USD attribute.
- Create a new USD attribute/primvar.
- Rename the USD attribute (by duplicating it).

With this, the usage of the tool is even wider for a lot of cases.




Release notes:

- Tool icon added.
- Documentation/Help cards added.
- Added support for rename USD attribute as USD standard attribute or as primvar.
- Support per-prim attribute variation in "Create" attribute operation.
- TimeSample input fixes.
- Mappiing: SOP float attribute x USD float array fix: correct array size output.
- New examples added to example hip file.


Demo of this final release:



---------

I hope you like it, wish me luck with the judges but the important thing is that I hope that this tool can be useful for a lot of users to doing more things in Solaris . Let me know in case you find any issue by sending a simple repro file.

Cheers!
Edited by cdordelly - Jan. 13, 2024 18:50:02

Attachments:
USD_Attribute_Mapper.hdalc (142.1 KB)
usd_attribute_mapper_lop_demo_scenes_v2.hiplc (1.5 MB)

User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
New bug was found and is already fixed on the final version that I'll publish:

Bug: node returns an error when it tries to add an attribute into an Instance Proxy prim type.
User Avatar
Member
162 posts
Joined: Nov. 2016
Offline
Hi everybody!

I took the last day to upload the final videos, you can see all of them here:








Cheers!
  • Quick Links