And an alternative way to do this without a solver is to throw down a point wrangle a type in:
@P = @P + @N * @Frame;
Thats it. You don't need an @v attribute to make them “move”, although now if you want to use these points “velocities” to drive something else you could throw down a trail sop after your point wrangle and set it to get v, which is just the difference in each point's position between two frames.
I say “move” because again your not simulating anything now, your just basically adding the normal of each point onto its own position, whatever that position was at frame 1. You are also scaling the normal by a variable which happens to be the frame number, but that variable could be anything.
You may want to add an addition term in the above equation to keep the points from “moving” too fast. For instance:
float term = 0.1;
@P = @P + @N * @Frame * term;
But this is entirely up to you.
Found 47 posts.
Search results Show results as topic list.
Technical Discussion » Moving a scattered geo to the direction of Normals?
- mbbuckley
- 47 posts
- Offline
Technical Discussion » Click arrow on the exposed Group pararmeter in a subnet/HDA gives error...
- mbbuckley
- 47 posts
- Offline
Technical Discussion » Using vex functions primduv, Du, and Dv in sop context?
- mbbuckley
- 47 posts
- Offline
Technical Discussion » Using vex functions primduv, Du, and Dv in sop context?
- mbbuckley
- 47 posts
- Offline
Just wondering if its possible to use these functions in a wrangle in a sop context. So far I cannot get them to output anything, and am confused as to how they work. I'm curious as they might be helpful for me. Anyone ever use these in a sop context and if so could you explain what they do or provide an example?
Edited by mbbuckley - June 28, 2018 17:23:17
Technical Discussion » $WEDGE unknown
- mbbuckley
- 47 posts
- Offline
Technical Discussion » Can't render a sequence of frames of a pyro sim to disk.
- mbbuckley
- 47 posts
- Offline
Thanks jon. Just wanted to come back and say that Jon is correct and for anyone who runs into this your rendered files DO contain data, its just not visible in most image viewers. Well, at least for exr's the data is there (i switched to exrs and did not test with pngs). But to see it, you have to unpremultiply by the alpha channel. Still not sure the best way to do this. In after effects, you can use the eXtractor effect to switch the alpha channel to R, which worked for me since I was doing fire. Again, probably there is a better way, but this is what I ended up doing.
Technical Discussion » $WEDGE unknown
- mbbuckley
- 47 posts
- Offline
Well, its been 4 years, and now this problem has happened to me. Don't know if jenneh ever found a solution, but this is my first time using wedging, and I do not seem to have that $WEDGE variable either.
I'm in the /out context and on a geometry node. I'm trying to create cache directories based on the wedge number. In the output file parameter, if I type $WEDGE, it does not evaluate to anything. If I type it and middle click the parameter name, it evaluates to nothing. Also, if I just type $, a dropdown appears of available variables. Neither WEDGE not WEDGENUM are in there.
Any ideas as to why I do not have access to these variables? I'm on Houdini 16.5.439.
I'm in the /out context and on a geometry node. I'm trying to create cache directories based on the wedge number. In the output file parameter, if I type $WEDGE, it does not evaluate to anything. If I type it and middle click the parameter name, it evaluates to nothing. Also, if I just type $, a dropdown appears of available variables. Neither WEDGE not WEDGENUM are in there.
Any ideas as to why I do not have access to these variables? I'm on Houdini 16.5.439.
Technical Discussion » Can't render a sequence of frames of a pyro sim to disk.
- mbbuckley
- 47 posts
- Offline
Hey Jon, thanks for pointing that out. Do you know how to fix this? I would want my alpha to be the heat channel essentially.
Technical Discussion » Can't render a sequence of frames of a pyro sim to disk.
- mbbuckley
- 47 posts
- Offline
I cannot render a sequence of frames of a pyro sim to disk with mantra. I can render to mplay fine. I can see the sim in render view fine. But when I try to render to disk, I just get empty pngs. I actually cannot render a single frame to disk, but I am attempting to render multiple frames. There is nothing in the scene but the pyro. If I put a mesh in the scene, it will render the mesh to a png to disk, but still will not render the pyro. There are no lights in my scene, because I am rendering a candle.
I don't understand why I can render the pyro to mplay fine but cannot just render that same image to disk.
I don't use mantra a whole lot, but redshift was having problems with this too and mantra could at least render something. This scene is very basic, so I'm sure it would not take an experienced user long to diagnose the problem.
I appreciate any help.
I don't understand why I can render the pyro to mplay fine but cannot just render that same image to disk.
I don't use mantra a whole lot, but redshift was having problems with this too and mantra could at least render something. This scene is very basic, so I'm sure it would not take an experienced user long to diagnose the problem.
I appreciate any help.
Technical Discussion » Transforming SOPs from Python shell
- mbbuckley
- 47 posts
- Offline
Symek,
No, 5 lines of code is not a biggie. But 2 lines is better, and I am looking for the fastest possible way to do things.
You're absolutely right. I do basically think of Houdini as a programming environment. I realize its trying to also be user friendly, and safe and efficient. It must be all these things. But what I like about it is how easy it is to get low level with it.
You have a better understanding of the innards of houdini than I do, and I was not aware of the memory, cpu, and gpu advantages of cwhite's method. Perhaps that is a more elegant solution than I realized. I originally dismissed it because of having to create extra dummy geometry (no biggie, but in my mind it is a small waste) but perhaps this is something houdini is optimized for.
No, 5 lines of code is not a biggie. But 2 lines is better, and I am looking for the fastest possible way to do things.
You're absolutely right. I do basically think of Houdini as a programming environment. I realize its trying to also be user friendly, and safe and efficient. It must be all these things. But what I like about it is how easy it is to get low level with it.
You have a better understanding of the innards of houdini than I do, and I was not aware of the memory, cpu, and gpu advantages of cwhite's method. Perhaps that is a more elegant solution than I realized. I originally dismissed it because of having to create extra dummy geometry (no biggie, but in my mind it is a small waste) but perhaps this is something houdini is optimized for.
Technical Discussion » Transforming SOPs from Python shell
- mbbuckley
- 47 posts
- Offline
cwhite,
Yes, I had considered transferring the transform matrix as an attribute on some carrier geometry, but that seemed like not the most elegant solution. I think it would be really cool to have some kind of python command that can just make a transform sop directly from a given matrix. Its a bit silly that doing something very fundamental in 3D graphics is not so straight forward.
Yes, I had considered transferring the transform matrix as an attribute on some carrier geometry, but that seemed like not the most elegant solution. I think it would be really cool to have some kind of python command that can just make a transform sop directly from a given matrix. Its a bit silly that doing something very fundamental in 3D graphics is not so straight forward.
Technical Discussion » Transforming SOPs from Python shell
- mbbuckley
- 47 posts
- Offline
Hey symek,
Thanks for your reply. I left an ambiguity in my description and you misunderstand me. I don't want 26 sops vertically but horizontally (not wired into each other). Still, your method makes the translation of the matrix into the transformSOP's parm values a little less painful. Would be nicer to have some kind of createTransformNodeFromMatrix() command.
However, I actually figured out an adequate way to do this.
I do use the PythonSOP and intitialize my list of matrices there. Then I make a new hou.Geometry object for each matrix. For each new hou.Geometry, I recreate all the geometry of the initial geo, and then I apply the geo.transform(matrix). Then I merge all the new geos into the initial one (thanks SideFX for the merge command).
This works for my purpose. I could probably do this with a few less lines of code once the transform() command for points is implemented.
The relevant part of my code if anyone cares:
Thanks for your reply. I left an ambiguity in my description and you misunderstand me. I don't want 26 sops vertically but horizontally (not wired into each other). Still, your method makes the translation of the matrix into the transformSOP's parm values a little less painful. Would be nicer to have some kind of createTransformNodeFromMatrix() command.
However, I actually figured out an adequate way to do this.
I do use the PythonSOP and intitialize my list of matrices there. Then I make a new hou.Geometry object for each matrix. For each new hou.Geometry, I recreate all the geometry of the initial geo, and then I apply the geo.transform(matrix). Then I merge all the new geos into the initial one (thanks SideFX for the merge command).
This works for my purpose. I could probably do this with a few less lines of code once the transform() command for points is implemented.
The relevant part of my code if anyone cares:
newGeos = [] for m in matrices: newGeo = hou.Geometry() for p in geo.points(): newp = newGeo.createPoint() newp.setPosition(p.position()) newGeo.transform(m) newGeos.append(newGeo) for g in newGeos: geo.merge(g)
Technical Discussion » Transforming SOPs from Python shell
- mbbuckley
- 47 posts
- Offline
Hello everyone,
I would like to be able to transform geometry inside a sop context from the python shell. A problem in doing this is that, while I can access the geometry of any sop with the sop.geometry() command, the Geometry object that this returns is read-only. I have heard it said that the only way to use python to access write-able geometry is from the Python Sop.
However, this is not ideal for me because I would like to apply 26 different transformations to a single sop, with the result being 26 new sops. I have the transformation matrices stored in an array. This array is ‘in’ the python shell. I don't want to have to create 26 new python sops then set each one's snippet to a string containing the all the code I would need to take the nth matrix and transform the geometry by it. I also don't want to create 26 transform nodes, and then extract the bits I need from each matrix and set the tx, ty, etc, parms on each node individually.
I don't want to do these things because
1) Its more work.
2) It hurts my brain to have to mash up a perfectly good transform matrix in order to feed it into some sop that is ultimately going to just reconstruct and apply the exact same transform matrix anyway. Its roundabout and physically hurts.
So I want to just apply the matrix directly to the points of the sop through the shell. I would also be fine if I could create a transform node and then just give the transform node the matrix directly. This seems like something houdini would be able to do. Is there anyway I could do this?
I would like to be able to transform geometry inside a sop context from the python shell. A problem in doing this is that, while I can access the geometry of any sop with the sop.geometry() command, the Geometry object that this returns is read-only. I have heard it said that the only way to use python to access write-able geometry is from the Python Sop.
However, this is not ideal for me because I would like to apply 26 different transformations to a single sop, with the result being 26 new sops. I have the transformation matrices stored in an array. This array is ‘in’ the python shell. I don't want to have to create 26 new python sops then set each one's snippet to a string containing the all the code I would need to take the nth matrix and transform the geometry by it. I also don't want to create 26 transform nodes, and then extract the bits I need from each matrix and set the tx, ty, etc, parms on each node individually.
I don't want to do these things because
1) Its more work.
2) It hurts my brain to have to mash up a perfectly good transform matrix in order to feed it into some sop that is ultimately going to just reconstruct and apply the exact same transform matrix anyway. Its roundabout and physically hurts.
So I want to just apply the matrix directly to the points of the sop through the shell. I would also be fine if I could create a transform node and then just give the transform node the matrix directly. This seems like something houdini would be able to do. Is there anyway I could do this?
Technical Discussion » Does 'Set Project' not work right for anyone else?
- mbbuckley
- 47 posts
- Offline
Technical Discussion » Does 'Set Project' not work right for anyone else?
- mbbuckley
- 47 posts
- Offline
I try to set my project, so I go to File -> Set Project. I navigate to the folder of the project I want to set to, and I press the Accept button, and nothing happens. The window stays open. I press it a bunch of times. Nothing. It seems to not take folders as an argument. If I select a .hip file within that folder, then it sets my project to the containing folder. I just can't select the folder itself.
I suppose an easy work around is just to always have a .hip file in the folder. Just mainly want to point out it does not work as intended for me because I could not find any other threads where this problem is mentioned.
I suppose an easy work around is just to always have a .hip file in the folder. Just mainly want to point out it does not work as intended for me because I could not find any other threads where this problem is mentioned.
Houdini Indie and Apprentice » Animation snapping in viewport
- mbbuckley
- 47 posts
- Offline
Welp, I think I solved it. Turns out I had a blend on my left arm's IK_Solver not set to 1, which caused issues for me. Nice to have the other arm to compare to.
Houdini Indie and Apprentice » Animation snapping in viewport
- mbbuckley
- 47 posts
- Offline
Thank you Henry. I had all the ‘time slices’ not enabled, so I suppose it isn't that, although I have noticed that back scrubbing the time line can seem to trigger the snapping over that time range. It seems that one way to fix the problem is by scrolling to the beginning of the time range, hammering the the ‘unload’ parameter on the common tab of my outputting chop, and then playing through. Not exactly sure what this is doing, but after letting the animation playthrough it appears I can then scrub freely through the frame range and avoid the shaking and snapping.
I have also made sure that all my chops are using the exact same sample rate of 24 frames per second (which is also the playback rate).
Heres a video of the type of thing I'm seeing:
I have also made sure that all my chops are using the exact same sample rate of 24 frames per second (which is also the playback rate).
Heres a video of the type of thing I'm seeing:
Edited by mbbuckley - Dec. 1, 2017 17:22:36
Technical Discussion » IKSolver CHOP (not inverseKIN) example
- mbbuckley
- 47 posts
- Offline
Well, as it turns out (and if it ever does turn out it will right after I make a forum post) I found an example file. It can be found on the help page for the ObjectChain chop, if you scroll down to the bottom where it says examples. Note you have to open the help page inside Houdini to see it (right click on an ObjectChain chop and click on help). The example file is called SimpleIKSolver, although it is interestingly not to be found on the help page for the actual IKSolver chop ¯\_(ツ)_/¯
Technical Discussion » IKSolver CHOP (not inverseKIN) example
- mbbuckley
- 47 posts
- Offline
I second this. I can't even really figure out exactly what to put in the inputs. I've read the docs, but I don't find them super clear. Like what exactly is the difference between the source and rest input? And do you need object paths or just arbitrary names?
Does anyone have any insight on this one?
Does anyone have any insight on this one?
Technical Discussion » Cloth on a character not working well at all
- mbbuckley
- 47 posts
- Offline
Michiel,
By God, you're right! The normals are pointing inward! Ok, in all fairness though, I did check this quickly before and I thought they were ok because I saw normals everywhere. Very, very, very long normals. I didn't realize that they were simply so long that they were oriented inward but just poked all the way through the mesh and out the otherside! Ok, I will reverse them and see how that works. Thank you very much Michiel.
By the way, is it a problem that they are so long?
By God, you're right! The normals are pointing inward! Ok, in all fairness though, I did check this quickly before and I thought they were ok because I saw normals everywhere. Very, very, very long normals. I didn't realize that they were simply so long that they were oriented inward but just poked all the way through the mesh and out the otherside! Ok, I will reverse them and see how that works. Thank you very much Michiel.
By the way, is it a problem that they are so long?
Edited by mbbuckley - Nov. 2, 2017 11:30:17
-
- Quick Links