Thanks for they reply! Unfortunately even with your changes the chunks still fail to activate properly when the Initial Object Type for /obj/geo1/dopnet/chunks is set to ‘Create Animated Static Objects’. Sorry I should have saved the example scene with that already set because that is the real problem here.
Any ideas at all would be appreciated.
Found 35 posts.
Search results Show results as topic list.
Technical Discussion » min_activation_impulse fails with constraints?
- cruiserandmax
- 35 posts
- Offline
Technical Discussion » min_activation_impulse fails with constraints?
- cruiserandmax
- 35 posts
- Offline
I have simple case with a bunch of packed rbds using min_activation_impulse to keep them all still until they are hit by another collider. It is set up by adding a float attribute to the packed rbd points f@min_activation_impulse = 1, and on the RBD Packed Object in DOPS the Initial Object Type is set to Create Animated Static Objects. This works as expected. However as soon as glue constraints are added between the rbd packed objects they never activate. If I switch the RBD Packed Object initial object type to active then the glue constraints work fine, but my bodies are all active (and falling) before the main impact.
In the attached example hip:
Play with /obj/geo1/dopnet/gravity1 active and notice the bodies remain inactive until the ball hits them (min_activation impulse working!)
Play with /obj/geo1/dopnet/constraintnetwork active and notice the bodies never activate.
Next change the initial object type on /obj/geo1/dopnet/chunks to ‘active’ and notice that the glue constraints behave as expected (but the bodies are active from the start()
Am I doing something wrong?
In the attached example hip:
Play with /obj/geo1/dopnet/gravity1 active and notice the bodies remain inactive until the ball hits them (min_activation impulse working!)
Play with /obj/geo1/dopnet/constraintnetwork active and notice the bodies never activate.
Next change the initial object type on /obj/geo1/dopnet/chunks to ‘active’ and notice that the glue constraints behave as expected (but the bodies are active from the start()
Am I doing something wrong?
Technical Discussion » Volumes in GL view getting worse in newer Houdini versions.. ?
- cruiserandmax
- 35 posts
- Offline
I've noticed shaded GL view of ‘medium’ res volumes in H15.5 seems much worse than in the past, and none of the display settings seem to help make it any better… In the past I recall you could mess with 3D texture memory and get a better representation of a volume in GL (up to a point)..
Also the different versions of open GL display that used to be available through the preferences->3D Viewports seems to have gone away..
Have things gotten worse?
Here's an example of a (360 x 496 x 117) volume where the GL view doesn't even come close to the actual detail:
Also the different versions of open GL display that used to be available through the preferences->3D Viewports seems to have gone away..
Have things gotten worse?
Here's an example of a (360 x 496 x 117) volume where the GL view doesn't even come close to the actual detail:
Technical Discussion » $N broken in H15?
- cruiserandmax
- 35 posts
- Offline
Technical Discussion » is there a way to wrangle a 64-bit attribute?
- cruiserandmax
- 35 posts
- Offline
Thanks, folks for the info and tips.. I agree that VEX would be top of the list for supporting 64-bit attributes. At least then VEX could likely substitute for any other nodes that don't handle doing stuff to 64-bit attributes..
Technical Discussion » is there a way to wrangle a 64-bit attribute?
- cruiserandmax
- 35 posts
- Offline
I have a 64-bit int attribute named foo that displays a value of 12147483648 in the geometry spreadsheet. If I then add a wrangle that does:
@foo = 12147483649;
foo becomes 1214783616 (yet foo still shows as a 64-bit int in Extended Information)
Are 64-bit attributes just not supported in vex?
@foo = 12147483649;
foo becomes 1214783616 (yet foo still shows as a 64-bit int in Extended Information)
Are 64-bit attributes just not supported in vex?
Technical Discussion » precision lost going from float to int
- cruiserandmax
- 35 posts
- Offline
Using Houdini 15…
v@P.z = 121673874;
i@foo = int(v@P.z);
why does foo = 121673872 ?
even if I use a pre-existing 64-bit float attr (using attribCreate):
@f64 = 121673874;
i@foo = int(@f64);
I get the same error… ?
v@P.z = 121673874;
i@foo = int(v@P.z);
why does foo = 121673872 ?
even if I use a pre-existing 64-bit float attr (using attribCreate):
@f64 = 121673874;
i@foo = int(@f64);
I get the same error… ?
Technical Discussion » Correct way to detect ESC pressed in houdini python?
- cruiserandmax
- 35 posts
- Offline
Ack! Going bach to Houdini 13 and the code in the post above works perfectly (catches the exception reliably every time). I only get the misbehavior in H14.. ugh.
Technical Discussion » Correct way to detect ESC pressed in houdini python?
- cruiserandmax
- 35 posts
- Offline
Thanks again for trying to help. I combed over the python docs for handling exceptions as well as the houdini docs for hou.InterruptableOperation again.
From my understanding this should work:
def doit():
aborted = False
with hou.InterruptableOperation(“doing stuff”, open_interrupt_dialog=True) as operation:
ret = hou.hscript(“viewwrite -f 1 40 Build_gg.panetab1.world.persp1 ctest/foo.\$F.jpg”)
try:
operation.updateProgress()
except hou.OperationInterrupted:
aborted = True
if aborted == True:
print “aborted!”
else:
print “continuing on…”
However when I run that function and hit Escape in the middle of the flipbook, I sometimes get “continuing on…” and sometimes get “aborted!”. If I run the function and let the flipbook complete on it's own I get “continuing on…” every time. So unless something is wrong with my code- it seems that either the hou.InterruptableOperation class is bugged, or there is something weird about how the interrupting of the hscript function is handled through the python hou.hscript() call.
I keep going over and over the details but I just can't figure out what I may be doing wrong. :cry:
From my understanding this should work:
def doit():
aborted = False
with hou.InterruptableOperation(“doing stuff”, open_interrupt_dialog=True) as operation:
ret = hou.hscript(“viewwrite -f 1 40 Build_gg.panetab1.world.persp1 ctest/foo.\$F.jpg”)
try:
operation.updateProgress()
except hou.OperationInterrupted:
aborted = True
if aborted == True:
print “aborted!”
else:
print “continuing on…”
However when I run that function and hit Escape in the middle of the flipbook, I sometimes get “continuing on…” and sometimes get “aborted!”. If I run the function and let the flipbook complete on it's own I get “continuing on…” every time. So unless something is wrong with my code- it seems that either the hou.InterruptableOperation class is bugged, or there is something weird about how the interrupting of the hscript function is handled through the python hou.hscript() call.
I keep going over and over the details but I just can't figure out what I may be doing wrong. :cry:
Technical Discussion » Correct way to detect ESC pressed in houdini python?
- cruiserandmax
- 35 posts
- Offline
Have you ever used that class? I could really use an example for my case. I couldn't figure out how to get it to work. I tried the following and if I use ESC to abort the viewwrite part way through, or just let it complete normally without interrupting, the following code always returns True for aborted:
def doit():
aborted = False
with hou.InterruptableOperation(“doing stuff”, open_interrupt_dialog=True) as operation:
ret = hou.hscript(“viewwrite -f 1 40 Build_gg.panetab1.world.persp1 ctest/foo.\$F.jpg”)
operation.updateProgress()
if hou.OperationInterrupted:
aborted = True
if aborted == True:
print “aborted!”
else:
print “continuing on…”
def doit():
aborted = False
with hou.InterruptableOperation(“doing stuff”, open_interrupt_dialog=True) as operation:
ret = hou.hscript(“viewwrite -f 1 40 Build_gg.panetab1.world.persp1 ctest/foo.\$F.jpg”)
operation.updateProgress()
if hou.OperationInterrupted:
aborted = True
if aborted == True:
print “aborted!”
else:
print “continuing on…”
Technical Discussion » Correct way to detect ESC pressed in houdini python?
- cruiserandmax
- 35 posts
- Offline
What is the correct way to detect a user pressing the escape key during the execution of a python script.
In particular I am want to something like:
interrupted = 0
try:
hou.hscript('viewwrite -f 1 100 <view name> cfoo.\$F.jpg')
except:
interrupted = 1
In this case I can interrupt the viewwrite hscript command (and it kills the viewwrite as expected), however it does not seem to be caught by the try: statement..
What is the correct way to do this?
In particular I am want to something like:
interrupted = 0
try:
hou.hscript('viewwrite -f 1 100 <view name> cfoo.\$F.jpg')
except:
interrupted = 1
In this case I can interrupt the viewwrite hscript command (and it kills the viewwrite as expected), however it does not seem to be caught by the try: statement..
What is the correct way to do this?
Technical Discussion » python way to query/set lighting mode buttons on viewport?
- cruiserandmax
- 35 posts
- Offline
Thanks for the insight.
On a related topic= do you know if there is any way to query the ‘visbility of external objects’ button on a SceneViewer pane? I can create a new floating panel SceneViewer, set the camera and cwd to match the original scene view, and use hscript viewcopy to match most of the viewport settings. I have given up on matching the state of headlight view, but I am still trying to figure out a way to get the state of external object visbility to match. Currently it seems the new floating panel scene viewer defaults to ‘Ghost Other Objects’ and I can't control that.
On a related topic= do you know if there is any way to query the ‘visbility of external objects’ button on a SceneViewer pane? I can create a new floating panel SceneViewer, set the camera and cwd to match the original scene view, and use hscript viewcopy to match most of the viewport settings. I have given up on matching the state of headlight view, but I am still trying to figure out a way to get the state of external object visbility to match. Currently it seems the new floating panel scene viewer defaults to ‘Ghost Other Objects’ and I can't control that.
Technical Discussion » python way to query/set lighting mode buttons on viewport?
- cruiserandmax
- 35 posts
- Offline
So the ‘use headlight’ option of a viewer can be switched on/off using the hscript command:
vieweroption -h 0|1 <viewername>
However I still cannot find a way to query the state of ‘use headlight’ in one viewer so that I may set it to correspond in another. :cry:
vieweroption -h 0|1 <viewername>
However I still cannot find a way to query the state of ‘use headlight’ in one viewer so that I may set it to correspond in another. :cry:
Technical Discussion » python way to query/set lighting mode buttons on viewport?
- cruiserandmax
- 35 posts
- Offline
I am trying to create a new floating viewport that matches an existing desktop viewport.
I have been using the hscript viewcopy command to copy settings from one viewport to the other and that works pretty well. The only thing it seems to miss is the state of the Lighting buttons (No lights, headlight, normal lights, etc.). Is there any other way to query which lighting button is being used on a viewport, and also a way to set them?
I have been using the hscript viewcopy command to copy settings from one viewport to the other and that works pretty well. The only thing it seems to miss is the state of the Lighting buttons (No lights, headlight, normal lights, etc.). Is there any other way to query which lighting button is being used on a viewport, and also a way to set them?
Technical Discussion » Help using addSelector() to facilitate re-selecting for otl
- cruiserandmax
- 35 posts
- Offline
Can anyone provide an example of how to implement a selector as part of an hda so that points affected by the hda may be re-selected (using the “`”, back-tick key)?
I tried creating an hda from an empty subnet in sops and:
-set min/max inputs to 1 in basic type properties.
-added a string parameter named group
-added a PreFirstCreate script (python):
kwargs.addSelector(name=“foo”, selector_type=“points”, prompt=“sel points to foo on and hit ENTER”)
However if I then create an instance of my node and connect it to some points coming from a scatter- using the “`” key is flakey at best. Also if I try to display the scatter sop, select points in the scene viewer, then try to TAB-create an instance of my hda I get an error:
'NoneType' object has no attribute ‘set’
Any ideas?
I tried creating an hda from an empty subnet in sops and:
-set min/max inputs to 1 in basic type properties.
-added a string parameter named group
-added a PreFirstCreate script (python):
kwargs.addSelector(name=“foo”, selector_type=“points”, prompt=“sel points to foo on and hit ENTER”)
However if I then create an instance of my node and connect it to some points coming from a scatter- using the “`” key is flakey at best. Also if I try to display the scatter sop, select points in the scene viewer, then try to TAB-create an instance of my hda I get an error:
'NoneType' object has no attribute ‘set’
Any ideas?
-
- Quick Links