Michael Frederickson
mtf
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Karma Refraction Black Faces on thin Material July 15, 2024, 4:20 a.m.
I'm not sure if this question makes sense, but: is there a way to detect "trapped" rays and "make" them escape? IE, if a ray hits the reflect limit to continue it to the environment light, sample that color, and return?
stroke_radius callback script not called when radius changed Aug. 11, 2020, 8:03 p.m.
Thanks for the suggestion. I tried both of the following:
Add a spare param, a float called radius_hack.
Set its value to a python expression: hou.parm(“stroke_radius”).evalAsFloat()
Added a callback script to it: print(“was called”)
If I change the “real” radius stroke, either by changing it's float value or altering it in viewport, “was called” is not printed. As expected, it is printed if I move the slider for radius_hack.
I also tried setting the Python expression of radius_hack to:
hou.parm(“stroke_radius”).evalAsFloat()
import time
print(time.time())
Perhaps this is what you meant. This works, however, when I am drawing a stroke it is called over and over. Since my callback is a caching function that runs somewhat slowly, it's untenable to have it called repeatedly during draw, since it slows things down massively.
EDIT:
I ended up getting something pretty acceptable by doing the following:
Make a spare invisible float param called “last_radius”
Set its value to that of “stroke_radius” on poststroke
On prestroke, check if “last_radius” != “stroke_radius”, and if so, blow the cache
Add a spare param, a float called radius_hack.
Set its value to a python expression: hou.parm(“stroke_radius”).evalAsFloat()
Added a callback script to it: print(“was called”)
If I change the “real” radius stroke, either by changing it's float value or altering it in viewport, “was called” is not printed. As expected, it is printed if I move the slider for radius_hack.
I also tried setting the Python expression of radius_hack to:
hou.parm(“stroke_radius”).evalAsFloat()
import time
print(time.time())
Perhaps this is what you meant. This works, however, when I am drawing a stroke it is called over and over. Since my callback is a caching function that runs somewhat slowly, it's untenable to have it called repeatedly during draw, since it slows things down massively.
EDIT:
I ended up getting something pretty acceptable by doing the following:
Make a spare invisible float param called “last_radius”
Set its value to that of “stroke_radius” on poststroke
On prestroke, check if “last_radius” != “stroke_radius”, and if so, blow the cache
Stroke SOP painting from within HDA Aug. 11, 2020, 4:17 p.m.
Not sure if by this you mean outputting your projection geometry from the HDA, then feeding it up to a merge and back into the asset.
Or, do you have a totally self contained way to do this that doesn't require the end user to reproduce this setup?
Is it possible to “read the geo into the first input of the asset” procedurally?
Or, do you have a totally self contained way to do this that doesn't require the end user to reproduce this setup?
Is it possible to “read the geo into the first input of the asset” procedurally?