I have been improving the wacom python panel I posted about last time -- to try to solve the issues with the number of nodes I would end up with, also the file size of the .hip files were too large.
In the last version, I was saving the curve data as a string on the SOP node, but this made for large files sizes. I was also using the parms on the SOP node to configure a bunch of things for the line (like the duplication, taper and width settings.) which caused me to have to create too many nodes when I wanted to vary the settings.
I am now using the "geometry data" parm type on the SOP node to save the curve data. I am storing all of the configuration (duplication, tapering, width etc) in primitive data and have moved the settings to the python panel interface, rather than the SOP interface.
This means that I don't have to create a new node to have different settings for a curve.
I needed to add a selection tool, curve tool, and a freehand tool to the opython interface to cover all of the cases I needed.
The toggles on the interface for duplication and tapering are just settings on each prim -- each time the selection changes the interface changes to reflect the settings on the current prim.
Here is the new interface:
The icon images for the interface are saved into the SOP OTL, which is a bit strange, but I couldn't figure out how to get QT to load images from disk -- it would work if I gave it the full path to the images but I couldn't find out how to do a relative reference.
The python panel stores its own copy of the curve data in a hou.geometry() object, and copies it to the SOP node to 'export' to the node.
Each prim also stores the time that it was drawn (relative to when the panel was opened), The points also store the time that they were drawn since the start of the curve, so that the curve drawing can be replayed.
I have remapped the times and compressed it all a bit to animate the drawing of the constellation, like in the following video:
My plan eventually is to animate the reveal of the constellation drawing based on the proximity to stars. I want to do this in realtime so I will need to bake all of this data into a texture.
The new .pypanel and .otl can be downloaded here
In the last version, I was saving the curve data as a string on the SOP node, but this made for large files sizes. I was also using the parms on the SOP node to configure a bunch of things for the line (like the duplication, taper and width settings.) which caused me to have to create too many nodes when I wanted to vary the settings.
I am now using the "geometry data" parm type on the SOP node to save the curve data. I am storing all of the configuration (duplication, tapering, width etc) in primitive data and have moved the settings to the python panel interface, rather than the SOP interface.
This means that I don't have to create a new node to have different settings for a curve.
I needed to add a selection tool, curve tool, and a freehand tool to the opython interface to cover all of the cases I needed.
The toggles on the interface for duplication and tapering are just settings on each prim -- each time the selection changes the interface changes to reflect the settings on the current prim.
Here is the new interface:
The icon images for the interface are saved into the SOP OTL, which is a bit strange, but I couldn't figure out how to get QT to load images from disk -- it would work if I gave it the full path to the images but I couldn't find out how to do a relative reference.
The python panel stores its own copy of the curve data in a hou.geometry() object, and copies it to the SOP node to 'export' to the node.
Each prim also stores the time that it was drawn (relative to when the panel was opened), The points also store the time that they were drawn since the start of the curve, so that the curve drawing can be replayed.
I have remapped the times and compressed it all a bit to animate the drawing of the constellation, like in the following video:
My plan eventually is to animate the reveal of the constellation drawing based on the proximity to stars. I want to do this in realtime so I will need to bake all of this data into a texture.
The new .pypanel and .otl can be downloaded here
Comments
Post a Comment