H15 Data Parameter ?

   2372   6   0
User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
Any ressources beside the premade grooming tools in houdini and the non existent Help about the new Data Parameter ?

I got it working to cache geometry and read it back. It seems to do a good job. However i cant find any documentation on it beside a short mention in the Whats new in H15. it says:
This version of Houdini introduces initial support for a “data” parameter type you can use to store binary data in a node. For example, the Curve Groom SOP uses this to store stroke data.

For example where does the curve groom HDA execute the caching once the stroke is finished ? it seems to execute the python script definition prestroke() after each stroke is finished, but i dont know how and when its doing that?
User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
Well i got it working and here you can see a demo of the speed gain:

https://vimeo.com/155498488 [vimeo.com]

I am very happy, still some of my questions remain as i had to rename my cache button and python to prestroke to make it work? I cant find any call in the scripts so i assume this is like a predefined thing from the stroke giving a callback? Same with the stroke_prompt?

Sorry if i am confused here..
User Avatar
Staff
329 posts
Joined: July 2005
Offline
Doudini
For example where does the curve groom HDA execute the caching once the stroke is finished ? it seems to execute the python script definition prestroke() after each stroke is finished, but i dont know how and when its doing that?

The Stroke State is responsible for that behaviour. When starting a new stroke, it looks for a callback parameter called “prestroke” and runs it. At the end of stroke, it looks for a callback parameter called “poststroke” and runs that too. These hooks allow customisation of tools based on the stroke state. The Curve Groom SOP uses the “prestroke” hook to store the result of any previously performed strokes into a data parameter. The data parameter's value is used by the Curve Groom SOP as a starting point for applying new strokes (the geometry is retrieved with a Python SOP).
User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
Derrick thank you so much! I was looking for that poststroke callback you mention.

I got it all working and its a beautiful new feature to H15. That Data Parameter is very powerful.
User Avatar
Staff
329 posts
Joined: July 2005
Offline
Doudini
I was looking for that poststroke callback you mention.

The Curve Groom SOP does not need to perform any action after a stroke completes so it does not provide a poststroke callback. If you are developing a custom tool based on the stroke state and it needs to perform some action at the end of a stroke, a poststroke callback parameter can be used.
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
where is pre/poststroke parameter ?
User Avatar
Staff
329 posts
Joined: July 2005
Offline
jerry7
where is pre/poststroke parameter ?

The Curve Groom SOP's prestroke parameter is invisible. To see it in the type properties window, enable the “Show Invisible Parameters” toggle on the Parameters tab.
  • Quick Links