What is the best way to aim a particle emission?
I'm looking at a popvop and quaternion nodes.
I at first thought you could rotate the source object (which led to odd shapes of emission) and then I tried parenting the source_particles but that flipped gravity around too?
This in the end also brings up a concern I've never understood…
In this case the node POP Source in the AutoDopNetwork has velx, vely, velz velocity attributes, but it's what I call a top level node and has no input so you can't plug a script node in and change the values all at once. You probably typically end up with each field containing python import statements for radians etc. (redundant duplicate information or exported global values to bring into the other y&z fields)?
Anyway can I put a popvop under/after it and change the velocity values above in the POPSource node?
Lost again, help.
Found 68 posts.
Search results Show results as topic list.
Houdini Learning Materials » particle velocity from object source rotation
- GottaGetmedat
- 68 posts
- Offline
Houdini Learning Materials » Animate RBD Object initial state?
- GottaGetmedat
- 68 posts
- Offline
One possibility is to use a velocity impulse force node. Any others people can suggest as a preference.
for velocity change.
for velocity change.
Houdini Learning Materials » Animate RBD Object initial state?
- GottaGetmedat
- 68 posts
- Offline
I noticed you can put animation information into the initial state of an RDB Object! but…?
It seems to do nothing (have no effect) after the first frame (being an “Initial State” and all).
Is there a reason this is possible? (should it not be disabled there, or have an effect would be the expected and desired behavior.)
I guess I'm looking to throw a block after some time for a simulation to settle (without writing a special script or attaching to particles etc.).
I figured it would be nice to inject some velocity into (for simple test purposes) a block, and be able to through it from those settings (it's unclear where you would do that).
How would one achieve this seemingly simple task?
:shock:
It seems to do nothing (have no effect) after the first frame (being an “Initial State” and all).
Is there a reason this is possible? (should it not be disabled there, or have an effect would be the expected and desired behavior.)
I guess I'm looking to throw a block after some time for a simulation to settle (without writing a special script or attaching to particles etc.).
I figured it would be nice to inject some velocity into (for simple test purposes) a block, and be able to through it from those settings (it's unclear where you would do that).
How would one achieve this seemingly simple task?
:shock:
Technical Discussion » Pz with alpha shaders wrong result?
- GottaGetmedat
- 68 posts
- Offline
I am trying to use a “mantrasurface” which says “Material Shader Builder” as does glass but they don't have the same properties?!
After some R&D testing.
Clearly the Refract tab does nothing with transmitting light, which I suppose is caustics. I always thought they were the same thing at least conceptually.
There is a Faux Caustics option under the Opacity tab.
Being named Faux or false I thought it was strictly a shortcut for performance that is “Fake” and therefore undesirable.
The lack of this being on is why I resorted to Opacity Scale or even a need to tweak the color will cause this Pz error problem.
How do I turn on real caustic rendering? or is Faux not False and real? which shaders actually compute light transmission? The default Glass is the only one and it's called a “Material Shader Builder” but it's nothing like a“mantrashader” with the same node type name.
Clearly opacity is unusable. Well at least the screen door hack version it means here.
so fake_min and fake_max being fake seem to affect IOR more then the brightness I imagined.
I've tried setting Physically Based and turn off the Faux caustics and it stops transmitting light again, so that's not it.
I thought the name “Material Shader Builder” was a long form of an Operator Type, which is actually a shop/vopmaterial in both cases? how can you have different tabs/properties and not be a different type?
In the end I guess I'm still waiting for the Otoy plugin to be available for Houdini. At least I have my hopes that it will be more similar to my way of thinking.
After some R&D testing.
Clearly the Refract tab does nothing with transmitting light, which I suppose is caustics. I always thought they were the same thing at least conceptually.
There is a Faux Caustics option under the Opacity tab.
Being named Faux or false I thought it was strictly a shortcut for performance that is “Fake” and therefore undesirable.
The lack of this being on is why I resorted to Opacity Scale or even a need to tweak the color will cause this Pz error problem.
How do I turn on real caustic rendering? or is Faux not False and real? which shaders actually compute light transmission? The default Glass is the only one and it's called a “Material Shader Builder” but it's nothing like a“mantrashader” with the same node type name.
Clearly opacity is unusable. Well at least the screen door hack version it means here.
so fake_min and fake_max being fake seem to affect IOR more then the brightness I imagined.
I've tried setting Physically Based and turn off the Faux caustics and it stops transmitting light again, so that's not it.
I thought the name “Material Shader Builder” was a long form of an Operator Type, which is actually a shop/vopmaterial in both cases? how can you have different tabs/properties and not be a different type?
In the end I guess I'm still waiting for the Otoy plugin to be available for Houdini. At least I have my hopes that it will be more similar to my way of thinking.
Houdini Learning Materials » New Sand Grains Mass?
- GottaGetmedat
- 68 posts
- Offline
I was looking for a “Mass” value for the new sand stuff in V 14.
It appears to me after some looking around that maybe the RBD Grains was the intention for affecting other objects in a scene.
After a few days of trying it seems that doesn't work as a solution (they dont' align for one and many other challenging reasons).
I've considered a custom/missing tool that maps the particles of an RBD Grains to the real “Wet Sand” particles, but only for every tenth one (or something easier to computer which I suspect is the source of the difficultly/problem).
Then again maybe I just need to use “Attribute Create” to add “mass” or something? It would be best as an option somewhere.
I think velocity might be interacting minimally but I'm not able to increase the strength of moving grains with oh I don't know like a mass value or maybe it would be “clump mass”.
Can anybody move RBD Objects with the new sand grains and if so how? Not RDB Grains they don't work or look the same (I'd consider hiding them if they did the pushing in a connected way.
Doing a double AutoDopNetwork setup caused computation crashes or just took way to long. As if they were not not connected networks, or like the RDB Grains where interacting as colliders with the real Sand particles. (Buggy for colliding as a force?).
It was just a horrible failed attempt. I'm not able to use the sand to push objects at this time. Maybe in V 15?
It appears to me after some looking around that maybe the RBD Grains was the intention for affecting other objects in a scene.
After a few days of trying it seems that doesn't work as a solution (they dont' align for one and many other challenging reasons).
I've considered a custom/missing tool that maps the particles of an RBD Grains to the real “Wet Sand” particles, but only for every tenth one (or something easier to computer which I suspect is the source of the difficultly/problem).
Then again maybe I just need to use “Attribute Create” to add “mass” or something? It would be best as an option somewhere.
I think velocity might be interacting minimally but I'm not able to increase the strength of moving grains with oh I don't know like a mass value or maybe it would be “clump mass”.
Can anybody move RBD Objects with the new sand grains and if so how? Not RDB Grains they don't work or look the same (I'd consider hiding them if they did the pushing in a connected way.
Doing a double AutoDopNetwork setup caused computation crashes or just took way to long. As if they were not not connected networks, or like the RDB Grains where interacting as colliders with the real Sand particles. (Buggy for colliding as a force?).
It was just a horrible failed attempt. I'm not able to use the sand to push objects at this time. Maybe in V 15?
Technical Discussion » Pz with alpha shaders wrong result?
- GottaGetmedat
- 68 posts
- Offline
It seems to me that if you render Pz for depth but the surface has alpha you get layers of see through. This is the wrong result. Areas with two surfaces (caused by alpha passing through) appear closer to the camera as they have accumulated luminence?
For the Z Depth channel no object/shader should be calculating with alpha. I'm guessing Constants would be better. Maybe then you need Deep renders.
Do people make a separate pass with a different (solid opaque) shader without it affecting ghosting (aliasing halos) etc or something typically?
Z-Depth should work more like IDs an absolute value for the first surface. Of course a warning should pop up saying “You have alpha shaders and are asking for z-Depth!? Would you like to allow accumulated values through the transparent surfaces and render the Pz layer completely useless or should we stop at the first surface and not render that layer transmissible? Oh and here's a link with an explanation of why you might want to allow that for some bizarre reason”. That now is replaced by Deep renders, but it's questionable the Z-Blur is more efficient with such monstrously large files.
Please explain best practices (or reveal an existing video with an in-depth explanation), thanks.
:?:
The other question is if you assign different shaders for different image planes can you write them into the same EXR files without damaging the other layers in the file without having to run a compositer (image) network? I think that was their intension (see EXR spec). I would expect an option to control weather it dumps/overwrites tiles into the file's layers as it goes and have your compositor (typically nuke) hot-load detected changes in real-time.
For the Z Depth channel no object/shader should be calculating with alpha. I'm guessing Constants would be better. Maybe then you need Deep renders.
Do people make a separate pass with a different (solid opaque) shader without it affecting ghosting (aliasing halos) etc or something typically?
Z-Depth should work more like IDs an absolute value for the first surface. Of course a warning should pop up saying “You have alpha shaders and are asking for z-Depth!? Would you like to allow accumulated values through the transparent surfaces and render the Pz layer completely useless or should we stop at the first surface and not render that layer transmissible? Oh and here's a link with an explanation of why you might want to allow that for some bizarre reason”. That now is replaced by Deep renders, but it's questionable the Z-Blur is more efficient with such monstrously large files.
Please explain best practices (or reveal an existing video with an in-depth explanation), thanks.
:?:
The other question is if you assign different shaders for different image planes can you write them into the same EXR files without damaging the other layers in the file without having to run a compositer (image) network? I think that was their intension (see EXR spec). I would expect an option to control weather it dumps/overwrites tiles into the file's layers as it goes and have your compositor (typically nuke) hot-load detected changes in real-time.
Houdini Learning Materials » mantra IFD says Unknown command:PIC2<heart>
- GottaGetmedat
- 68 posts
- Offline
Apparently you set the IFD in
/out/mantra_ipr/soho_diskfile
not
/out/mantra_ipr/vm_picture
This is in the Main tab of a mantra node
I expect an error or at least a warning reported when doing it wrong IFD as Output Picture path file's extension.
/out/mantra_ipr/soho_diskfile
not
/out/mantra_ipr/vm_picture
This is in the Main tab of a mantra node
I expect an error or at least a warning reported when doing it wrong IFD as Output Picture path file's extension.
Houdini Learning Materials » mantra IFD says Unknown command:PIC2<heart>
- GottaGetmedat
- 68 posts
- Offline
To save time I figured I better output a simulation (lengthy enough), to IFDs first and then render them later god willing.
In Version 13.0 I set the file extension to IFD and started rendering.
Then through hcmd.exe I put
mantra -f IFDFile_001.ifd ImageFile_001.png
The errors given start with
Unknown command: PIC2<heart>
What is going on now?
I renamed the file to a PNG and a PIC and it won't open, so I don't think it's that.
The IFDs are also all exactly 5,463KB in size, which also seems odd, possibly insightful.
In Version 13.0 I set the file extension to IFD and started rendering.
Then through hcmd.exe I put
mantra -f IFDFile_001.ifd ImageFile_001.png
The errors given start with
Unknown command: PIC2<heart>
What is going on now?
I renamed the file to a PNG and a PIC and it won't open, so I don't think it's that.
The IFDs are also all exactly 5,463KB in size, which also seems odd, possibly insightful.
Technical Discussion » (solved)when FLIP collide with RBD, it explosion
- GottaGetmedat
- 68 posts
- Offline
Yes I just discovered that.
It took me 2 days to find it.
Thank you for answering so quickly I was just coming back to report my findings.
I'm sure it will help others to have this on record here.
It took me 2 days to find it.
Thank you for answering so quickly I was just coming back to report my findings.
I'm sure it will help others to have this on record here.
Houdini Learning Materials » FLIP collisions with geo resulting in moving geo broken?
- GottaGetmedat
- 68 posts
- Offline
I think it's the feedback scale.
It took 2 days to find this.
It should be a default of 1.0
/obj/AutoDopNetwork/flipsolver1/feedbackscale
It took 2 days to find this.
It should be a default of 1.0
/obj/AutoDopNetwork/flipsolver1/feedbackscale
Houdini Learning Materials » FLIP collisions with geo resulting in moving geo broken?
- GottaGetmedat
- 68 posts
- Offline
Say you want the water (FLIP Fluid) to smash a brick wall or push a barrel etc. (RBD Object).
I've tried in vain. I think it's broken? it should just work? but it doesn't.
Version 13.0.547
You have a FLIP fluid flowing.
You have a stack of boxes.
You select RBD Object when the boxes are selected but when simulating they don't move.
Please explain how to enable moving?
I've set the densities, frictions, etc. nothing but a staticSolver style effect results even though it's clearly created a RigidBodySolver aka Bullet solver etc.
Changing the solver to RBD mode makes no difference either.
Diving into the RigidBodySolver node reveals nothing obviously broken there either.
I even stripped it down and the boxes always stay still, which is not my expected/desired behavior.
I've even added an Assemble node to the boxes object, still no difference.
Also tried Make Breakable which adds a Voronoi Fracture Configure Object.
So intuitive… I've been _____ by this software… again.
I've noted this example file here…
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=28386&highlight=&sid=c025e7a5b90830217007b4ddf69b944a# [sidefx.com]
It was working in 12, but no longer.
I've tried in vain. I think it's broken? it should just work? but it doesn't.
Version 13.0.547
You have a FLIP fluid flowing.
You have a stack of boxes.
You select RBD Object when the boxes are selected but when simulating they don't move.
Please explain how to enable moving?
I've set the densities, frictions, etc. nothing but a staticSolver style effect results even though it's clearly created a RigidBodySolver aka Bullet solver etc.
Changing the solver to RBD mode makes no difference either.
Diving into the RigidBodySolver node reveals nothing obviously broken there either.
I even stripped it down and the boxes always stay still, which is not my expected/desired behavior.
I've even added an Assemble node to the boxes object, still no difference.
Also tried Make Breakable which adds a Voronoi Fracture Configure Object.
So intuitive… I've been _____ by this software… again.
I've noted this example file here…
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=28386&highlight=&sid=c025e7a5b90830217007b4ddf69b944a# [sidefx.com]
It was working in 12, but no longer.
Technical Discussion » (solved)when FLIP collide with RBD, it explosion
- GottaGetmedat
- 68 posts
- Offline
In Version 13.0 this seems not to be working anymore what's changed?
multiple
Scoord and Tcoord
unrecognized errors on load
running sim boxes don't move FLIPtest2.hipnc
sure I changed the density of the fluid to 1000
/obj/explossion1/AutoDopNetwork/flipfluidobject/density
I've also changed
/obj/explossion1/AutoDopNetwork/box1/density
to 1000 as well
Boxes don't move. Why?
The liquid does go around the boxes.
I've tried changing the ridigitbodysolver1 to RBD mode = no change
Deleted the RBD last 3 nodes including create_fractured_group (An Assemble node) and the appropriate solver in the AutoDopNetwork
to see how it does it now…
select RBD click shelf tool Rigid Bodies > RBD Object
This skips the Assemble node but also fails to move the boxes when the fluid collides. reduced frictions and density in RDBObject physics tab also nothing moving.
So anyway I could go on but somethings changed possibly broken in 13.0.547?! It should just work.
Are you suppose to do something completely different now?
multiple
Scoord and Tcoord
unrecognized errors on load
running sim boxes don't move FLIPtest2.hipnc
sure I changed the density of the fluid to 1000
/obj/explossion1/AutoDopNetwork/flipfluidobject/density
I've also changed
/obj/explossion1/AutoDopNetwork/box1/density
to 1000 as well
Boxes don't move. Why?
The liquid does go around the boxes.
I've tried changing the ridigitbodysolver1 to RBD mode = no change
Deleted the RBD last 3 nodes including create_fractured_group (An Assemble node) and the appropriate solver in the AutoDopNetwork
to see how it does it now…
select RBD click shelf tool Rigid Bodies > RBD Object
This skips the Assemble node but also fails to move the boxes when the fluid collides. reduced frictions and density in RDBObject physics tab also nothing moving.
So anyway I could go on but somethings changed possibly broken in 13.0.547?! It should just work.
Are you suppose to do something completely different now?
Houdini Learning Materials » Flip Fluid evaporation? how to stop it?
- GottaGetmedat
- 68 posts
- Offline
Yes okay thanks!
AutoDopNetwork FlipSolver1 <TAB>ParticleMotion <SubTAB> Reseeding Particles DISABLED
/obj/AutoDopNetwork/flipsolver1/reseed
Seems that is what made almost all the particles disappear on collision.
Now a particle is a particle and not part of some default Quantum delusion.
AutoDopNetwork FlipSolver1 <TAB>ParticleMotion <SubTAB> Reseeding Particles DISABLED
/obj/AutoDopNetwork/flipsolver1/reseed
Seems that is what made almost all the particles disappear on collision.
Now a particle is a particle and not part of some default Quantum delusion.
MartybNz
Hunt down Reseeding and turn it off - search for it in the manual.
Houdini Learning Materials » Flip Fluid evaporation? how to stop it?
- GottaGetmedat
- 68 posts
- Offline
Thank you for an attempt to help understand this.
It's so simple I didn't think you would need one. (I would have added changes needed from the defaults to describe steps to reproduce otherwise.)
I stripped it down to the bare essence once I realized it is in complete violation of the very physics it's suppose to be simulating.
Any change of a Flip Fluid Objects Geometry's point count by even 1 point is in complete violation.
Boundaries makes no difference. The default is off.
Your other thought is unclear I've described it as a FLIP Fluid from Object?! In the AutoDopNetwork generated it has a FlipSolver and a FlipFluidObject with default settings other then as described (only to enhance the effect with more production like settings).
For clarity it's a middle click on the FlipFluidObject to inspect the oddly shrinking Geometry's Point count.
PradeepBarua
Hard to guess without .hip
Do you have Closed Boundaries of Flip Object turned on.
It's so simple I didn't think you would need one. (I would have added changes needed from the defaults to describe steps to reproduce otherwise.)
I stripped it down to the bare essence once I realized it is in complete violation of the very physics it's suppose to be simulating.
Any change of a Flip Fluid Objects Geometry's point count by even 1 point is in complete violation.
Boundaries makes no difference. The default is off.
Your other thought is unclear I've described it as a FLIP Fluid from Object?! In the AutoDopNetwork generated it has a FlipSolver and a FlipFluidObject with default settings other then as described (only to enhance the effect with more production like settings).
For clarity it's a middle click on the FlipFluidObject to inspect the oddly shrinking Geometry's Point count.
Houdini Learning Materials » Flip Fluid evaporation? how to stop it?
- GottaGetmedat
- 68 posts
- Offline
Example this…
a sphere as Flip Fluid from Object (with a Y position of 2)
a grid as a Static Object below with volume collision turned off.
the DopNet's flip fluid object is set to
particle separation 0.025 and radius scale 0.5
Frame 1 over 250,000 points
Frame 20 about half way collided has evaporated to under 60,000 points
Frame 40 below 5,000 points
So 98.8% of the fluid points have somehow evaporated upon collision with a simple grid <fact>.
My simple questions are…
How did that happen?
and
How can I stop flip fluids from evaporating seemingly illogically?
a sphere as Flip Fluid from Object (with a Y position of 2)
a grid as a Static Object below with volume collision turned off.
the DopNet's flip fluid object is set to
particle separation 0.025 and radius scale 0.5
Frame 1 over 250,000 points
Frame 20 about half way collided has evaporated to under 60,000 points
Frame 40 below 5,000 points
So 98.8% of the fluid points have somehow evaporated upon collision with a simple grid <fact>.
My simple questions are…
How did that happen?
and
How can I stop flip fluids from evaporating seemingly illogically?
Houdini Learning Materials » Separate and Modify Primatives
- GottaGetmedat
- 68 posts
- Offline
It seems you can't do that at all, once again (no solutions given either).
One would have to do all modification before a copy node with the second source (the template to copy to).
Then they are just duplicates so you need to use stamp to get variation.
Very counter intuitive. Others claim this is powerful but it seems to me a little off.
I'm more inclined to put a script node at the top of the copy source chain to set the variables of the nodes below based on a global variable stored array (computed earlier on the right side chain etc).
Still certain sources don't always have an input for that. Tube doesn't while Box does, it seems inconsistent. Using stamp or each modifier node's attribute boxes is simply not efficient when there are many to change (as then the same code is required in each).
Still this was not a solution for the fragments I posted about initially. I'll amend this reply if it ever does.
One would have to do all modification before a copy node with the second source (the template to copy to).
Then they are just duplicates so you need to use stamp to get variation.
Very counter intuitive. Others claim this is powerful but it seems to me a little off.
I'm more inclined to put a script node at the top of the copy source chain to set the variables of the nodes below based on a global variable stored array (computed earlier on the right side chain etc).
Still certain sources don't always have an input for that. Tube doesn't while Box does, it seems inconsistent. Using stamp or each modifier node's attribute boxes is simply not efficient when there are many to change (as then the same code is required in each).
Still this was not a solution for the fragments I posted about initially. I'll amend this reply if it ever does.
Houdini Learning Materials » Separate and Modify Primatives
- GottaGetmedat
- 68 posts
- Offline
Say you have a polygon grid with particles driving Voronoi fracture.
These are extruded and exploded.
You want to modify them with something like taper (aka Twist), but not as a group individually.
How do you suggest that be accomplished?
First thought would be to fuse the polygons as I don't thing they are properly joined as primitives yet. The ExtrudedBack and ExtrudedFront groups show a correct expected count but there's no pieces? I don't think.
Second thought is to set the twist pivot to the center of each “piece” but they don't exist yet I don't think?
Further I've imagined a node like “each” doing something but don't see how to modify geo from in those nodes (which is dysfunctional), or some node to extract the pieces so you can handle them separately. Maybe “copy”?
It's really confusing. I'm lost again. Any thoughts?
These are extruded and exploded.
You want to modify them with something like taper (aka Twist), but not as a group individually.
How do you suggest that be accomplished?
First thought would be to fuse the polygons as I don't thing they are properly joined as primitives yet. The ExtrudedBack and ExtrudedFront groups show a correct expected count but there's no pieces? I don't think.
Second thought is to set the twist pivot to the center of each “piece” but they don't exist yet I don't think?
Further I've imagined a node like “each” doing something but don't see how to modify geo from in those nodes (which is dysfunctional), or some node to extract the pieces so you can handle them separately. Maybe “copy”?
It's really confusing. I'm lost again. Any thoughts?
Houdini Learning Materials » get some objects position inside VEXpression of POP Attract
- GottaGetmedat
- 68 posts
- Offline
okay so my original thing was partly working there was another attractor in there for some reason causing confusion.
I've added similar code to the popdrag1 node below the attractor.
vector targ = prim(“opobj/sphere”, “P”, 0);
float dist = distance(@P, targ);
airresist = (6 - pow(dist, 3));
if(airresist < 0) {
airresist = 0;
}
printf(“ar:%f\n”, airresist);
So then how one would access the this other popdrag node, from the VEXpression (of the other attractor node) to avoid redundant calls to the same code (for getting the distance in this toy example).
{rant begins}
It's my real major burning question that's been plaguing my mind with this stuff (on and off) for years now.
I've mostly learned to resort to using python module globals to store something like that, but it's an ugly block of code to set and extract too.
That and some really lame justification that it's never slower then rendering to call the same (sometimes rather lengthy pass through say all particles) over and over for every value you might stamp to copies or whatever.
So then I look painfully pretty much without success for a place to put the script block before things in the node tree. For instance with a primitive like a sphere if some complex code was needed to calculate the primary parameters that node does not have an input (to plug a script node before it ~ maybe with a merge - script first input?) and so you have to rig one parameter to call a python module script to set globals and then extract them down the tree particularly in the case of a “copy node” since it's pretty hidden where the actual copies are so I can't just write it into them there (in my pyModScripts).
Then you think ya what exactly is the point of all this node stuff and then you say well there is a point. Still it seems to lack a good entry point to write efficient code that doesn't need cutting and pasting all over or some global py mod dance, which I'm fine with but I'd rather write it into the nodes, which in the case of copy stamp stuff is not as simple as it should be since every parameter in the chain of nodes needs to go out to globals.
In this case I'm sure I'll find a way to plug the airresist into that node from the forcescale or in this case the faster more difficult VEXpressions. I've also not been able to find a typical Script or Snippet node in DOPs, what gives there? what do other people do, the best houdini gurus must have a better solution then putting repetitious code in each and every parameter box. Where do I put a master controller code block (preferable python) that sets the things together at once? {rant ends}
I've added similar code to the popdrag1 node below the attractor.
vector targ = prim(“opobj/sphere”, “P”, 0);
float dist = distance(@P, targ);
airresist = (6 - pow(dist, 3));
if(airresist < 0) {
airresist = 0;
}
printf(“ar:%f\n”, airresist);
So then how one would access the this other popdrag node, from the VEXpression (of the other attractor node) to avoid redundant calls to the same code (for getting the distance in this toy example).
{rant begins}
It's my real major burning question that's been plaguing my mind with this stuff (on and off) for years now.
I've mostly learned to resort to using python module globals to store something like that, but it's an ugly block of code to set and extract too.
That and some really lame justification that it's never slower then rendering to call the same (sometimes rather lengthy pass through say all particles) over and over for every value you might stamp to copies or whatever.
So then I look painfully pretty much without success for a place to put the script block before things in the node tree. For instance with a primitive like a sphere if some complex code was needed to calculate the primary parameters that node does not have an input (to plug a script node before it ~ maybe with a merge - script first input?) and so you have to rig one parameter to call a python module script to set globals and then extract them down the tree particularly in the case of a “copy node” since it's pretty hidden where the actual copies are so I can't just write it into them there (in my pyModScripts).
Then you think ya what exactly is the point of all this node stuff and then you say well there is a point. Still it seems to lack a good entry point to write efficient code that doesn't need cutting and pasting all over or some global py mod dance, which I'm fine with but I'd rather write it into the nodes, which in the case of copy stamp stuff is not as simple as it should be since every parameter in the chain of nodes needs to go out to globals.
In this case I'm sure I'll find a way to plug the airresist into that node from the forcescale or in this case the faster more difficult VEXpressions. I've also not been able to find a typical Script or Snippet node in DOPs, what gives there? what do other people do, the best houdini gurus must have a better solution then putting repetitious code in each and every parameter box. Where do I put a master controller code block (preferable python) that sets the things together at once? {rant ends}
Houdini Learning Materials » get some objects position inside VEXpression of POP Attract
- GottaGetmedat
- 68 posts
- Offline
edward
You're only getting the local space positions. If you want the world space position then you need to multiply it by world transform of the owner object. eg. using optransform() for example.
looking now…
http://www.sidefx.com/docs/houdini13.0/vex/functions/optransform [sidefx.com]
Oh thank you for helping!
In the meantime…
I guess my next question would be how do you get the position from a transform matrix?
okay well that's definitely helping in this case…
vector targ = prim(“opobj/sphere”, “P”, 0);
matrix tm = optransform(“opobj/sphere”);
printf(“targPos: %s and %s\n”, targ, tm);
float dist = distance(@P, targ);
forcescale = dist * dist;
printf(“fs:%f\n”, forcescale);
Wait my original code is partly resolving somehow?
vector targ = prim(“opobj/sphere”, “P”, 0);
float dist = distance(@P, targ);
forcescale = (dist * dist) * 2;
if (forcescale < 0.2) {
forcescale = 0.0;
}
printf(“fs:%f\n”, forcescale);
I'll need to experiment more.
The irony is all I really wanted was for the particle attraction to a geometry/sop or null to have diminished strength as it gets closer so there's no bouncing spring effect. squared etc. what exists for that without using chops or something odd and also overly complicated?
Houdini Learning Materials » get some objects position inside VEXpression of POP Attract
- GottaGetmedat
- 68 posts
- Offline
I'm looking at the
/obj/AutoDopNetwork/attract_location_particles/sopnet1
for insight and thinking this looks like a complete mess to me?
It seems to be promoting Detail attributes to “P” and “v” on the primitive level?
but of @OpInput2
definitely lost here.
There are so many nulls ans switches disorganized and tangled together it really can't be the most efficient bit of work in houdini.
switch1 has null2 in it twice and that null has only a switch with a switch? It would seem the one null isn't even needed and two switches could be one but I'm just a beginner.
Still even or maybe only the likes of Socrates might have us rethink this one guys.
If I Google
houdini +dopnodeobjs
there are no results?
If I could turn this into a question how about for starters.
Why is the documentation hidden from Google for “dopnodeobjs”?
I guess I don't understand Google?
http://www.sidefx.com/docs/houdini13.0/expressions/dopnodeobjs [sidefx.com]
Maybe it's hidding because it's replaced by things like…
http://www.sidefx.com/docs/houdini13.0/hom/hou/DopSimulation#objects [sidefx.com]
but version 13 is still using messy legacy code like what we see here in an attract_location_particles/sopnet1
Searching something like opstreamname also leaves one with little to go on.
/obj/AutoDopNetwork/attract_location_particles/sopnet1
for insight and thinking this looks like a complete mess to me?
It seems to be promoting Detail attributes to “P” and “v” on the primitive level?
but of @OpInput2
definitely lost here.
There are so many nulls ans switches disorganized and tangled together it really can't be the most efficient bit of work in houdini.
switch1 has null2 in it twice and that null has only a switch with a switch? It would seem the one null isn't even needed and two switches could be one but I'm just a beginner.
Still even or maybe only the likes of Socrates might have us rethink this one guys.
If I Google
houdini +dopnodeobjs
there are no results?
If I could turn this into a question how about for starters.
Why is the documentation hidden from Google for “dopnodeobjs”?
I guess I don't understand Google?
http://www.sidefx.com/docs/houdini13.0/expressions/dopnodeobjs [sidefx.com]
Maybe it's hidding because it's replaced by things like…
http://www.sidefx.com/docs/houdini13.0/hom/hou/DopSimulation#objects [sidefx.com]
but version 13 is still using messy legacy code like what we see here in an attract_location_particles/sopnet1
Searching something like opstreamname also leaves one with little to go on.
-
- Quick Links