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
Found 16 posts.
Search results Show results as topic list.
Technical Discussion » stroke_radius callback script not called when radius changed
- mtf
- 16 posts
- Offline
Technical Discussion » Stroke SOP painting from within HDA
- mtf
- 16 posts
- Offline
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?
Technical Discussion » stroke_radius callback script not called when radius changed
- mtf
- 16 posts
- Offline
I've created an HDA with a stroke node inside, with the Node default state set to stroke.
I have some projection geometry that needs to update its size every time the user changes the radius of their stroke, so, I have a Python command in the callback script entry for stroke_radius.
This is called no problem if stroke_radius is changed directly on the stroke_radius parameter - but, if the user changes radius size by holding shift and dragging left/right in the viewport, the callback script does not fire, despite the stroke_radius value changing in the float field, and in preview size in viewport.
Is this a bug, or expected behavior? Any workarounds you can think of?
I have some projection geometry that needs to update its size every time the user changes the radius of their stroke, so, I have a Python command in the callback script entry for stroke_radius.
This is called no problem if stroke_radius is changed directly on the stroke_radius parameter - but, if the user changes radius size by holding shift and dragging left/right in the viewport, the callback script does not fire, despite the stroke_radius value changing in the float field, and in preview size in viewport.
Is this a bug, or expected behavior? Any workarounds you can think of?
Technical Discussion » Some lights turn off in viewport during camera move
- mtf
- 16 posts
- Offline
Hi there,
I have a scene lit by one Redshift RSLightDome and several rslight Area lights. When the camera is static in the viewport, the lighting looks correct.
It's a bit weird to describe, so here's a GIF:
When I move the camera, the effect the rslight Area lights have on the wall disappears until I stop moving the camera.
For some reason, the contribution of the RSLightDome does not seem to turn off during camera motion. This is lucky, since before I added one, the area lights (which were previously the only thing lighting the scene) would go out and the whole viewport would blackout while I tumbled.
Any idea what's going on here?
I have a scene lit by one Redshift RSLightDome and several rslight Area lights. When the camera is static in the viewport, the lighting looks correct.
It's a bit weird to describe, so here's a GIF:
When I move the camera, the effect the rslight Area lights have on the wall disappears until I stop moving the camera.
For some reason, the contribution of the RSLightDome does not seem to turn off during camera motion. This is lucky, since before I added one, the area lights (which were previously the only thing lighting the scene) would go out and the whole viewport would blackout while I tumbled.
Any idea what's going on here?
Edited by mtf - July 4, 2020 16:38:33
Technical Discussion » Keyboard shortcut to press Apply for Edit Expression Dialog
- mtf
- 16 posts
- Offline
Hi there,
(on Windows 10, Hou 18)
This is a small UX thing. When I work in the Maya script editor, I frequently press Ctrl + A, Ctrl+ + Enter to execute code I just changed. When I make a change on a Shader Toy shader, I can press Alt + Enter to update the shader preview. This is great because I don't have to switch hands from keyboard to mouse to press apply, then back to keyboard to continue editing.
My goal is to find a way to do this for the parameter Edit Expression window. I'd like to be able to make a change to my Python expression, then use only the keyboard to press Apply, or Accept.
I am not sure how to “tab advance” focus from the parameter expression text entry UI component, since this inserts a tab in the expression text. Even if try to give the Apply button focus (By depressing “Apply”, but moving the mouse away from the button and releasing, which in some UI toolkits moves the tabindex “focus” to that button) in order to “activate” it with Enter key, there doesn't seem to be a visual representation of button focus on Apply or Accept, and I don't seem to be able to press them with Enter.
Does anyone know a keyboard only way to do this? It's just a flow thing…
(on Windows 10, Hou 18)
This is a small UX thing. When I work in the Maya script editor, I frequently press Ctrl + A, Ctrl+ + Enter to execute code I just changed. When I make a change on a Shader Toy shader, I can press Alt + Enter to update the shader preview. This is great because I don't have to switch hands from keyboard to mouse to press apply, then back to keyboard to continue editing.
My goal is to find a way to do this for the parameter Edit Expression window. I'd like to be able to make a change to my Python expression, then use only the keyboard to press Apply, or Accept.
I am not sure how to “tab advance” focus from the parameter expression text entry UI component, since this inserts a tab in the expression text. Even if try to give the Apply button focus (By depressing “Apply”, but moving the mouse away from the button and releasing, which in some UI toolkits moves the tabindex “focus” to that button) in order to “activate” it with Enter key, there doesn't seem to be a visual representation of button focus on Apply or Accept, and I don't seem to be able to press them with Enter.
Does anyone know a keyboard only way to do this? It's just a flow thing…
Technical Discussion » Sculpt tool not smoothing
- mtf
- 16 posts
- Offline
Poke. This bug is still around in 18. Seems Wacom related.
Edited by mtf - June 19, 2020 21:45:41
Technical Discussion » PolyExtrude node inconsistency w/ docs in 15.5.717
- mtf
- 16 posts
- Offline
Technical Discussion » PolyExtrude node inconsistency w/ docs in 15.5.717
- mtf
- 16 posts
- Offline
This totally does the trick. It's a little ridiculous, though .
What would you guys recommend for how to clarify to the folks in charge that there should be a way to do this in the polyExtrude node?
I'm all for the changes to move towards @attribute syntax, but polyExtrude seems to need a bit more thought since the 15 changes.
What would you guys recommend for how to clarify to the folks in charge that there should be a way to do this in the polyExtrude node?
I'm all for the changes to move towards @attribute syntax, but polyExtrude seems to need a bit more thought since the 15 changes.
Technical Discussion » PolyExtrude node inconsistency w/ docs in 15.5.717
- mtf
- 16 posts
- Offline
Technical Discussion » PolyExtrude node inconsistency w/ docs in 15.5.717
- mtf
- 16 posts
- Offline
I am attempting to extrude many primitives directly up in global Y, so I have distance set to 0.
The docs seem to say I'd want to set ‘Transform Extruded Front’, set the xform there to 0, 1, 0, then under local control check to use zscale to scale this transform per primitive.
See “Local Frames”
http://www.sidefx.com/docs/houdini/nodes/sop/polyextrude [sidefx.com]
Also, this tutorial shows a Houdini 15 UI which has zscale:
https://vimeo.com/149640497 [vimeo.com]
My polyextrude node only offers X Direction, Y Direction, and Center, which appear to have no effect even when I set primitive attributes with the correct name.
Please advise!
The docs seem to say I'd want to set ‘Transform Extruded Front’, set the xform there to 0, 1, 0, then under local control check to use zscale to scale this transform per primitive.
See “Local Frames”
http://www.sidefx.com/docs/houdini/nodes/sop/polyextrude [sidefx.com]
Also, this tutorial shows a Houdini 15 UI which has zscale:
https://vimeo.com/149640497 [vimeo.com]
My polyextrude node only offers X Direction, Y Direction, and Center, which appear to have no effect even when I set primitive attributes with the correct name.
Please advise!
Edited by mtf - Feb. 19, 2017 01:22:23
Technical Discussion » Selecting a few particles in a FLIP fluid
- mtf
- 16 posts
- Offline
Technical Discussion » Selecting a few particles in a FLIP fluid
- mtf
- 16 posts
- Offline
hey, thanks guys!
And yes, if you'd be willing to setup a simple demo, that'd be fantastic.
And yes, if you'd be willing to setup a simple demo, that'd be fantastic.
Technical Discussion » Selecting a few particles in a FLIP fluid
- mtf
- 16 posts
- Offline
That sounds like a good idea.
I've come to realize I was using DOP import to bring in my FLIP particles. DOP I/O brought it in with the ID attributes.
Looks like the particles sometimes die, and sometimes jump around, so I suspect your attribute idea is a better one - the bubbles in your reel are quite handsome
So - make a grid, scatter points on it, emit particles (in a POP?) from those points, attribute transfer velocity onto them? Any tips to get that nice warble I see in the bubbles in your reel? Any tips on that lovely refractive rendering - is that Mantra?
I've come to realize I was using DOP import to bring in my FLIP particles. DOP I/O brought it in with the ID attributes.
Looks like the particles sometimes die, and sometimes jump around, so I suspect your attribute idea is a better one - the bubbles in your reel are quite handsome
So - make a grid, scatter points on it, emit particles (in a POP?) from those points, attribute transfer velocity onto them? Any tips to get that nice warble I see in the bubbles in your reel? Any tips on that lovely refractive rendering - is that Mantra?
Technical Discussion » Selecting a few particles in a FLIP fluid
- mtf
- 16 posts
- Offline
Hi all -
I'm looking to make some bubbles in my FLIP fluid. My idea was to make a group that selects a few particles by id, then instance spheres on them as a starting point.
I've tried feeding the particles into a group geometry node. I can see the $ID attribute on the particles, and I'm trying to group by expression with $ID % 1000 == 0, or $ID > 1000, then going to a delete not selected.
For some reason, that doesn't seem to create a group - any ideas?
I'm looking to make some bubbles in my FLIP fluid. My idea was to make a group that selects a few particles by id, then instance spheres on them as a starting point.
I've tried feeding the particles into a group geometry node. I can see the $ID attribute on the particles, and I'm trying to group by expression with $ID % 1000 == 0, or $ID > 1000, then going to a delete not selected.
For some reason, that doesn't seem to create a group - any ideas?
Technical Discussion » Houdini 12 gold Flip slover no particle ID
- mtf
- 16 posts
- Offline
Thanks! I'm really just starting out, so apologies for the basic question, but:
I've clicked to add the attribute id. How do I refer to it in an expression?
Perhaps a better question is, how can I see what attributes are associated with the points so I can know what else is accessible expressions?
Is it $ID?
I've clicked to add the attribute id. How do I refer to it in an expression?
Perhaps a better question is, how can I see what attributes are associated with the points so I can know what else is accessible expressions?
Is it $ID?
Technical Discussion » Houdini 12 gold Flip slover no particle ID
- mtf
- 16 posts
- Offline
Could you let us know what that solution *was*? I am trying to solve this issue and there are many suggested solutions on the link you give.
-
- Quick Links