Jump to content

ikoon

Members+
  • Content count

    379
  • Donations

    30.00 CAD 
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by ikoon

  1. help with scripting

    Hi, as regards evaluating the $JOB as a string, this should work hou.expandString('$JOB') For multiline string in python, you can see few methods here (scroll down to answers) https://stackoverflow.com/questions/10660435/pythonic-way-to-create-a-long-multi-line-string I use \n and multiple += when I am building the script, for me it is most readable: variable = 'some_filename.hip' script_rop = '# commented first line\n' script_rop += 'hou.hipFile.load("' + variable + '")\n' script_rop += '# another line\n' script_rop += '# last line, without backslash n'
  2. help with scripting

    Hi, do you want to use python to create the .cmd file? If it is so, than this might work for you: import os path_hip = hou.expandString('$HIP') path_scripts = path_hip + '/scripts/' if not os.path.exists(path_scripts): os.makedirs(path_scripts) script = 'some text' path_cmd = path_scripts + 'filename.cmd' file_cmd = open( path_cmd, "w") file_cmd.write(script) I use similar script, but I am no python guru unfortunately, so there may be a better way to do it.
  3. Mouse causing hand wrist pain

    I have my wacom set the same as McNistor said. From the bottom: LMB, RMB, MMB. When I drag with MMB (the most top button on the pen) I feel more confident when holding the pen with middle finger and index finger. I press MMB with my thumb. Btw I have set the mouse similar way ... three buttons from the left: LMB, RMB, MMB. So I switched rmb and mmb on the mouse. It feels better for my muscle memory.
  4. Hi, maybe there are more ways to get this color, but one of them is "channel without keyframes": - animate the channel (create key) - delete all the keys in the Animation Editor If you create a key again, the channel goes to "classic" colors. Or if you Delete the channel (Ctrl+Shift+LMB), the channel goes black.
  5. Hello Jaanus, maybe you mean Andrew Lowell, in this video? https://vimeo.com/286243655 Andrew wrote this book: Houdini Chops Book - Music, Animation and Sound The book was here, but the url does not work now: http://www.andrew-lowell-productions.com/andrew-lowell-productions/resources.html @andrewlowell please, is the book still available? Another inspiration may be: http://simonfarussell.com/Audio-Geometry-Exploration https://vimeo.com/317941999 https://vimeo.com/28239261 Or google "two minute papers sound"
  6. Gas analysis

    Hi, you may create the Explosion from Pyro FX shelf tools. Then dive into: /obj/pyro_sim/pyrosolver1/gasvortexconfinement1 There are few Gas Analysis dops, which calculate Curl, Length, Gradient, Normalize (and save them to the previously created fields, made by Gas Match Field dops).
  7. CHOP attributes and Python

    It seems that I have to abandon VEX in this case, and do it only with python and Node.userData()
  8. CHOP attributes and Python

    With VEX in Chops, we can set custom attributes to a clip/channel/sample. These are similar to point/vertex/prim/detail Geometry attributes. But please, can I read those CHOP attributes with Python? It seems that I can only read values of the hou.Track. The vex functions are chattr() and chsetattr() https://www.sidefx.com/docs/houdini/vex/functions/chattr https://www.sidefx.com/docs/houdini/vex/functions/chsetattr.html
  9. Hi F1! This is great! Thank you very much! It will take me a while to understand it all, but I really like the solution (add until median per kid is met). This is great idea. Also the shuffle ... I never used that, also the array output is great for me. I can build on that, thank you very very much again!
  10. Let's say, there is a class with 10 children and teacher asks 10 questions with decreasing difficulty. Kids are in a row. Please, is there any common attitude to make the raised hands sparse in time and space? The total count of raised hands is not crucial. The purpose is just to make it visually appealing. - first question is the hardest, 1 kid raises hand - second question, 2 or 3 kids, not the kid from first question, hands are "far away" from each other - third question, 3 kids who did not answer before, and again gaps between kids ... - tenth question, everybody raises hand - at the end, each kid raised hand circa 5 times
  11. The best (and simplest) method I could think of is a brute force: - generate a number of solutions, with different seed - for each solution, calculate the "sparsity" with weights (the gap between the answers is more important then the gap between kids) - choose the solution with the highest sparsity There are not many kids and questions. I think it is going to be fast. Still, I am curious, if it is a common scripting problem.
  12. Hi, you are right. I didn't realize it but it could behave much better. I think we cannot fix this. Would you please RFE it? Btw I have previously RFEd unnecessary horizontal and vertical scrollbars. Often a tiny enlargement of this popup is enough to make the scrollbars disappear. If you also happen to have those unnecessary scrollbars, please mention them in your RFE too. I was told that it may be due to my specific dual monitor setup (and some test with swapping monitors led nowhere).
  13. Interrupted Simulations

    Hi Jim, do you use .sim files? Enable Save Checkpoints and if you want to stop at any frame (not just after Checkpoint Interval), then you might like the Checkpoint Trail Length http://www.sidefx.com/docs/houdini/nodes/obj/dopnet.html
  14. Handeling cache chain

    Hi Bobby, I was also trying to solve this issue. I am freelancer, so I don't know how bigger studios solve this. Here is a thread discussing it: https://forums.odforce.net/topic/39743-file-cache-sop-checking-for-dirtiness/ I was considering many approaches, but I ended up with a simple "manual" solution. I search for dependent caches, with a script like the following. If you are interested in this "manual" solution, I will clean it up and post here (and on my blog http://lex.ikoon.cz) def fc_downstream_filecaches(node) : global dependents global filecaches candidates = list(set( node.outputs() + node.dependents() )) for candidate in candidates : if candidate.type().name() != "filecache" : if candidate not in dependents : dependents.append(candidate) fc_downstream_filecaches(candidate) else : # filecache, don't iterate filecaches.append(candidate) fc_invalidate(candidate) # If candidate's parent is a dopnet, check also dopnet, # because Dop I/O is dependent on Dop Object, # which is often independent. parent = candidate.parent() if parent.type().name() == "dopnet" : if parent not in dependents : dependents.append(parent) fc_downstream_filecaches(parent) def fc_invalidate_dependents() : dependents = [] filecaches = [] node = hou.selectedNodes()[0] fc_downstream_filecaches(node)
  15. Control per particle Gravity Force

    Hi! Have you tried to use the @mass point attribute?
  16. HQUEUE Job Fails

    There is the hqnode.ini on the client computer, but afaik client should "read" info from the hqserver.ini and update itself Are you following this? http://www.sidefx.com/docs/houdini/hqueue/installation.html
  17. HQUEUE Job Fails

    I had difficulties when I had PC addresses defined as names. Now I have everything set as IP numbers and it works fine.
  18. Flip fluid ptnum changes over time

    It is off by default. You may need to turn it on and resimulate:
  19. Thank you very much for a confirmation, Mark. So I did a script, which creates .py file for each selected ROP and also creates .bat file, which launches hython for each created .py to run them simultaneously. I will investigate the possibility to assign different GPUs to each hython (HOUDINI_OCL_DEVICENUMBER variable is not taken into account here). # create .py script for each selected ROP, to render it # create .bat file, which renders all the created .py with hython simultaneously def batch_script_rop () : import os path_hip = hou.expandString('$HIP') path_hipfile = hou.expandString('$HIPFILE') path_hython = hou.expandString('$HB') + '/hython.exe' path_scripts = path_hip + '/scripts/' if not os.path.exists(path_scripts): os.makedirs(path_scripts) script_bat = 'REM This batch file runs multiple .py scripts at once \n' for rop in hou.selectedNodes() : # .py script script_rop = '# This .py script opens a file and renders single rop\n' script_rop += 'hou.hipFile.load("' + path_hipfile + '")\n' script_rop += 'node = hou.node("' + rop.path() + '")\n' script_rop += 'node.render(verbose=True,output_progress=True)' # write .py to disk path_py = path_scripts + rop.name() + '.py' file_py = open( path_py, "w") file_py.write(script_rop) # .bat script script_bat += 'start "Render: ' + rop.name() + '" "' script_bat += path_hython + '" "' script_bat += path_py + '"\n' # write .bat to disk path_bat = path_hip + '/_render.bat' file_rop = open( path_bat, "w") file_rop.write(script_bat)
  20. I use OpenGL ROP a lot, and I usually have more of them. They usually can render simultaneously without decrease of speed, usually run single threaded, hundreds of frames. I am on windows 10. The simplest way I found so far is to manually start Command Line Tools (CLT), generate the following script from selected ROP and paste it into CLT window ... and the render starts in that CLT. hython "Q:\bl\5 houdini\bl - v07.hiplc" node = hou.node('/obj/rop_OGL/strict2') node.render(verbose=True,output_progress=True) Please, is there any way to automate this better? Can I run new hython instance from Houdini UI, and pass appropriate script to it? Ideally, I would like to edit the houdini.env for each new hython, so I could use all of the GPUs (I can do this with python)
  21. I solved it by creating windows batch... I thought, that I have to run hython from Command Line Tools ... but when I run it with full $HB path, it seems to work fine. This is the contents of batch.bat: start "just title: bat1" "C:\Program Files\Side Effects Software\Houdini 17.0.382\bin\hython.exe" C:\Users\info\Desktop\bat1.py start "just title: bat2" "C:\Program Files\Side Effects Software\Houdini 17.0.382\bin\hython.exe" C:\Users\info\Desktop\bat2.py Those two "start" are there to run both hythons simultaneously. The bat1.py contains: hou.hipFile.load("Q:/bl/5 houdini A/bl - A - v07.hiplc") node = hou.node('/obj/rop_OGL/strict1') node.render(verbose=True,output_progress=True)
  22. Kaleidoscope effect by vex?

    Hi, Nick Taylor did this and shared on his patreon: https://www.patreon.com/posts/kaleidoscope-16980758 But it seems that non-patreons do not see it. The same thing is previewed here: https://twitter.com/_Nick_Taylor/status/963528664813129730 If you buy it, you can dig into his technique. He uses Clip SOP, if I remember correctly. So it is not entirely done in vex. You can bind your own geometry into his technique.
  23. Please, how do you manage your .sim checkpoint files? So far, I just delete them manually. I am thinking about writing a simple python scripts: - delete all the .sim files - delete all, but keep the last one - keep the first .sim file in the preview range (for the case, when I am satisfied with previous frames and I animate parameters in the preview range) Or is there any existing tool or script, that could help me? I would use os.remove() If not, I will post my solution here, later.
  24. My intention with this "toolset" was to build long sims (I do dancer performance synchronized visuals, something like "ENRA Visual Dance"). From my client, I have recording of the dance. I prepare lots of forces, sources, pops, pyro, pop drag etc, animated "invisible" objects etc ... and then I keyframe those impacts. So I use the .sim files as some "checkpoints". I edit the keyframes only in the preview range ... when it looks good, I move one or more ".sim step" further. I am not sure if it is the best workflow, I will work further on it.
  25. So, I made few little scripts to work with my .sim checkpoint files. So ... it is useful for long non-heavy sims, with keyframed behaviour. Now I work on a background animation for a dancer event performance which is ~ 7200 frames. I plan to make the scripts even better ... to reset multiple DOPs with one hotkey press. http://lex.ikoon.cz/sim-files-toolset The script contains os.remove(file_path), so check it before use.
×