hmmm. I may have figured it out. Amazing how writing things down moves the thought process along.
My idea is to use the Spring SOP on a box, contrain the bottom points, get acceleration data from somewhere (RBD sim?), put it in the external force field, and clone the movement of one of the springs to the rest to make the top of the box appear rigid. We'll see how this goes after lunch…
Found 27 posts.
Search results Show results as topic list.
Technical Discussion » Box on springs dynamics setup?
- mikela
- 27 posts
- Offline
Technical Discussion » Box on springs dynamics setup?
- mikela
- 27 posts
- Offline
I've been poking around Houdini trying to set up the dynamics of a car zooming down a road. I started thinking about complexity of solving the differential equations explicity–three degrees of freedom on one end of each four springs, different spring constants for each degree of freedom, linear and rotational inertia for the car–and thought I'd see if Houdini's built-in RBD could handle it for me. The problem seems to be that there is no way to constrain a force to a position on an object. Sure, there's the RBDConstrain “Point to Nail,” and it behaves something like a bungee cord when the “Constraint Time” is too high, but this specifies a position, not a force; I'm stuck solving my diffeq's again.
There's also the Spring SOP, which I've never really used, but it doesn't seem set up for systems of springs. My system involves one end of each four springs to be fixed (which is possible with the Spring SOP) and the other end to be attached to a rigid body (which does not appear possible with the Spring SOP.) Any suggestions?
There's also the Spring SOP, which I've never really used, but it doesn't seem set up for systems of springs. My system involves one end of each four springs to be fixed (which is possible with the Spring SOP) and the other end to be attached to a rigid body (which does not appear possible with the Spring SOP.) Any suggestions?
Technical Discussion » How to make particles flow along a spline? Old question.
- mikela
- 27 posts
- Offline
just thought I'd throw my solution into the ring…
The basic method relies on just a spline, a Source POP, a Force POP, and a Speedlimit POP. Since this requires large force coeffiecients to accurately follow the spline around corners, I've also provided a Sweep SOP/Collision POP slide that you can activate in the POPnet.
let me know if it doesn't work for you guys. Last time I posted a hipnc file the intended recipient couldn't open it. It was made in 6.1.114 NC under win2k.
Mike
http://www.odysseus.anderson.name/mikela/Houdini/StrawParticles2.hipnc [odysseus.anderson.name]
The basic method relies on just a spline, a Source POP, a Force POP, and a Speedlimit POP. Since this requires large force coeffiecients to accurately follow the spline around corners, I've also provided a Sweep SOP/Collision POP slide that you can activate in the POPnet.
let me know if it doesn't work for you guys. Last time I posted a hipnc file the intended recipient couldn't open it. It was made in 6.1.114 NC under win2k.
Mike
http://www.odysseus.anderson.name/mikela/Houdini/StrawParticles2.hipnc [odysseus.anderson.name]
Technical Discussion » How to make particles flow along a spline? Old question.
- mikela
- 27 posts
- Offline
keyframe, that's a fine soultion. I've never done anything useful with the lattice SOP before, and your example gives me some ideas. The main artifact is that velocity is not constant over the arc of the curve, which could become a problem.
What I would like to do (and just might) is to create a force on particles that scales with distance between the particles and the closest point on the spline and also scales with velocity. If some of the particles still want to fly off, I can create a collision tube around the spline and the particles can either slide or die on collision. I just have to reacquaint myself with point() and nearpoint()…
Mike
What I would like to do (and just might) is to create a force on particles that scales with distance between the particles and the closest point on the spline and also scales with velocity. If some of the particles still want to fly off, I can create a collision tube around the spline and the particles can either slide or die on collision. I just have to reacquaint myself with point() and nearpoint()…
Mike
Technical Discussion » copy to follow path
- mikela
- 27 posts
- Offline
As far as I know this isn't as straightforward as it may seem. Here http://www.odysseus.anderson.name/mikela/Houdini/RotateToNormal.hipnc [odysseus.anderson.name] is my solution. Basically I take the curve and resample it so I can get a good approximation of the tangent to the curve by comparing the position of adjacent points. I do this by giving a Point SOP two inputs–the resampled curve, and the resampled curve resorted with a -1 offset using the Sort SOP. In the point SOP I add normals $TX2-$TX, etc, and then with the Copy SOP I make sure “Rotate to Normal” is checked.
This technique leaves something to be desired. The uv's are messed up and the surface isn't smooth. I don't know exacly what you're looking for but you might have better results with the Skin SOP and a 2D cross-section.
Mike
This technique leaves something to be desired. The uv's are messed up and the surface isn't smooth. I don't know exacly what you're looking for but you might have better results with the Skin SOP and a 2D cross-section.
Mike
Technical Discussion » Converting longitude/latitude to x,y,z coord's
- mikela
- 27 posts
- Offline
convert a parametric function, surface(u,v), into x,y,z coord's
Those expressions work for a unit sphere, but it gets trickier when you want to convert (u,v) to (x,y,z) for an arbitrary surface. Mario Marengo helped me think through this case, and I'd give a link to it if the odforce server weren't down… It was in the odforce VEX forum under “(u,v) to (x,y,z)”.
hoping to have the rest coded up this weekend, maybe next week
No worries! Sounds like you're plenty busy over there. At this point I only need it for my demo reel, and there are plenty of other things I can work on for now.
Mike
Technical Discussion » i3d-based volume rendering: what artefacts?
- mikela
- 27 posts
- Offline
you have not understood what I'm talking about
er, sorry. I guess I didn't quite understand.
Artifact is REGULAR noisy grid appears at ever 32nd voxel layer
if it isn't related to noise (try changing the noise amplitude or frequency in the metacloud SHOP) and it isn't related to adaptive step, I really can't think of what the problem might be.
Does anyone else have an idea?
Technical Discussion » Converting longitude/latitude to x,y,z coord's
- mikela
- 27 posts
- Offline
Hi Mark,
I just checked my Physics text and it has the same under “spherical coordinates”–except with theta and phi, of course. “z” is on sphere's axis. x and y depend on latitude because as you go from the equator to the poles you decrease the distance to the z axis.
What I really need is a diagram. If only I had my scanner available I could take one out of this copyrighted textbook :roll:
hope that helps,
Mike Anderson
ps. how is the realflow obj plugin coming?
I just checked my Physics text and it has the same under “spherical coordinates”–except with theta and phi, of course. “z” is on sphere's axis. x and y depend on latitude because as you go from the equator to the poles you decrease the distance to the z axis.
What I really need is a diagram. If only I had my scanner available I could take one out of this copyrighted textbook :roll:
hope that helps,
Mike Anderson
ps. how is the realflow obj plugin coming?
Technical Discussion » i3d-based volume rendering: what artefacts?
- mikela
- 27 posts
- Offline
can you make the voxels interact with each otherVoxels are a raster type, like rendered images, so you usually want to do your manipulation before it's rendered.
It's simple enough to make a blob of cloud by copying metaballs onto points, giving that object to the image3d output in the SOP field, and setting it to render as particles/metaball geometry. For example, I made a nice cloud out of particles by birthing the particles inside a piece of geometry (using the Source POP) and then bringing the points into SOPs with a POP Merge SOP. This was my template for the Copy SOP, and a small metaball was the “primitive to copy.”
BTW, SESI has made a video tutorial on this subject and is available here: http://sidefx.vislab.usyd.edu.au/cd2_5.5.151/pages/learn/video/index.html [sidefx.vislab.usyd.edu.au]
Technical Discussion » i3d-based volume rendering: what artefacts?
- mikela
- 27 posts
- Offline
This sounds as though you are not using adaptive step. When I turn off adaptive step I can easily get artefacts as you described: noisy bounds of volume bucket voxels that look as though they swapped the density values of adjacent tiles. You can also get different, crisp edge artefacts with adaptive step turned on, but they can be reduced by reducing the adaptive step size at the expense of rendering time. Also, you're likely to see some artefacts relating to your low resolution 32x32x32 tiles. I've been using 64^3 tiles up through 300^3 tiles for better results.
Technical Discussion » how to build complex displace shader in vex,thank verymuch:)
- mikela
- 27 posts
- Offline
but you might want to add instead of multiply, depending on what kind of look you wanted.
Technical Discussion » writing to point attributes of arbitrary points
- mikela
- 27 posts
- Offline
I'm trying to get particles to bounce off each other using the Proximity POP, but no matter which way I turn I find I have the problem of writing to the point attributes of two particles from within the same function. This is because a collision needs to modify the velocity of both the collided particles.
At first I thought of using a custom expression function to modify the velocity of each point in a proximity group (using a Velocity POP) and using scripting to create a Velocity POP for each proximity group (since I don't know how else to loop through POPs). The problem is I need to write to the velocity attribute of an arbitrary point in addition to the current point. Is there some way to write point attributes as a function of point number or id?
Next I tried doing it in VEX. I had to use the SOP context (by way of a POP Merge SOP) because the POP context doesn't allow the import() function. The problem here is the same as with my custom expression function: each of the Npt calls to VEX operator writes to only one point at a time. It's no use to export a parameter to be used by a different VEX operator because I can only export attributes that are tied to the original id or ptnum–or am I wrong? It seems to me in order to make VEX work I would have to keep data around between calls using C++, but this is all new territory for me. Help?
Mike Anderson
At first I thought of using a custom expression function to modify the velocity of each point in a proximity group (using a Velocity POP) and using scripting to create a Velocity POP for each proximity group (since I don't know how else to loop through POPs). The problem is I need to write to the velocity attribute of an arbitrary point in addition to the current point. Is there some way to write point attributes as a function of point number or id?
Next I tried doing it in VEX. I had to use the SOP context (by way of a POP Merge SOP) because the POP context doesn't allow the import() function. The problem here is the same as with my custom expression function: each of the Npt calls to VEX operator writes to only one point at a time. It's no use to export a parameter to be used by a different VEX operator because I can only export attributes that are tied to the original id or ptnum–or am I wrong? It seems to me in order to make VEX work I would have to keep data around between calls using C++, but this is all new territory for me. Help?
Mike Anderson
Technical Discussion » how to build complex displace shader in vex,thank verymuch:)
- mikela
- 27 posts
- Offline
I don't have a lot of experience with VEX (yet…) but from what I can tell, you can add as many VEX geometry operators in series as you like, but you can have only one VEX displace shader for a piece of geometry. If you want both bumpnoise and cellcrack in the same VEX displace shader, multiply their “amount” outputs together and use this as the “amount” for a Displace Along Normal VOP.
Technical Discussion » Houdini 6.1.208 in Windows 2000?
- mikela
- 27 posts
- Offline
I'm using 6.1.114 (still…) with Windows 2000 SP6 latest updates. Everything works, but is prone to crashing under stress. I've had problems with previous releases and Windows environment variables when Houdini is installed in a path with spaces, so if you're playing with environment variables you might want to check that. It very well may be a video card/driver conflict, but in my experience this usually results in Houdini starting up properly, but then not refreshing the panes or refreshing them improperly or slowly. This is the problem I have with my ATI FireGL 8800 under Redhat 7.3, and I've tweaked all the environment variables…
Technical Discussion » Geometry instancing with the RBDCreate POP
- mikela
- 27 posts
- Offline
The simplicity of the odforce example [odforce.net] on rigid body dynamics made me think I could adapt it to a project of mine without trouble. Not so! I want my particles to interact with each other as tiny spheres, but I've only been able to achieve this when each particle is instanced by a unique piece of geometry, which would be impractical for thousands of particles. The RBD Create POP advertizes “It modifies input particles to make them into rigid body particles,” but why is it that when I pipe several particles into it, check the “Make Input Particles Rigid Bodies” flag, and give it my sample sphere either as Particle Geometry or in an Instance POP up the pipe, I only get one sphere translated the same as on the geometry level?
I'm probably just not doing it right, but perhaps this is a practical limitation of RBD; maybe it was never meant to handle hordes of particles. In which case, another question: How would I simulate surface and internal friction with the Interact POP? Like the Collision POP, except between particles?
thanks in advance, you guys have been a real help so far!
I'm probably just not doing it right, but perhaps this is a practical limitation of RBD; maybe it was never meant to handle hordes of particles. In which case, another question: How would I simulate surface and internal friction with the Interact POP? Like the Collision POP, except between particles?
thanks in advance, you guys have been a real help so far!
Technical Discussion » Pixel COP: modifying individual pixel positions
- mikela
- 27 posts
- Offline
a belated thank you for that. Problem fixed! I guess I just needed a second set of eyes on that one.
Mike
Mike
Technical Discussion » Pixel COP: modifying individual pixel positions
- mikela
- 27 posts
- Offline
Hi all,
I'm trying to make a center filter for my real world camera to correct for cos^4 light falloff. My first thought was to do it in C, but I wanted to give Houdini a try first. I piped a 400x500 white tiff into a Pixel COP with the expression: 1.77-pow(cos(sqrt(pow(($X+20*(rand(1)-.5)-$W/2),2)+pow(($Y+20*(rand(2)-.5)-$H/2),2))/15),4). The noise on the X, Y coordinates is to reduce the appearance of concentric rings in 8-bit mode. The problem is, the noise is being pre-added to the entire set of coordinates, shifting the filter around and doing nothing to reduce the appearance of rings. What I want is more like:
for (each pixel) {
randomly shift X, Y;
this pixel color = function(shiftedX, shiftedY);
}
I suspect this is an SIMD issue, so I'm not sure if it would be easily fixed in VEX. Any suggestions?
I'm trying to make a center filter for my real world camera to correct for cos^4 light falloff. My first thought was to do it in C, but I wanted to give Houdini a try first. I piped a 400x500 white tiff into a Pixel COP with the expression: 1.77-pow(cos(sqrt(pow(($X+20*(rand(1)-.5)-$W/2),2)+pow(($Y+20*(rand(2)-.5)-$H/2),2))/15),4). The noise on the X, Y coordinates is to reduce the appearance of concentric rings in 8-bit mode. The problem is, the noise is being pre-added to the entire set of coordinates, shifting the filter around and doing nothing to reduce the appearance of rings. What I want is more like:
for (each pixel) {
randomly shift X, Y;
this pixel color = function(shiftedX, shiftedY);
}
I suspect this is an SIMD issue, so I'm not sure if it would be easily fixed in VEX. Any suggestions?
Technical Discussion » translating a combined surface + displacement shader
- mikela
- 27 posts
- Offline
This should be an easy question for all you veterans out there. I am translating a procedural Renderman shader into VEX as an excercise. I have no experience with either language, but after reading the Houdini docs I think I've written something that looks passably like VEX. But I'm perplexed as to how to translate a combination surface and displacement.
In VEX it seems that the main function is either a surface or a displacement, not both. I could have two nearly identical shaders, one doing the displacement and the other the surface, but this seems computationally expensive. It seems I would want to do this in VOPs, putting my VEX code in a custom operator within a displacement shader and exporting the surface color–one more thing I haven't figured out how to do yet. Any suggestions?
In VEX it seems that the main function is either a surface or a displacement, not both. I could have two nearly identical shaders, one doing the displacement and the other the surface, but this seems computationally expensive. It seems I would want to do this in VOPs, putting my VEX code in a custom operator within a displacement shader and exporting the surface color–one more thing I haven't figured out how to do yet. Any suggestions?
Technical Discussion » Orbit POP: how do I use a line as the center?
- mikela
- 27 posts
- Offline
There is a Side Effects demo that demonstrates the orbit around the tangent of a spline very nicely. It's a tornado entitled “Vortex,” and maybe someone here can tell you where to find it. I got a copy from a friend and could post it to my own server if I hear on good authority that Side Effects won't mind.
I tried to make my own tornado by assigning point normals to samples on a spline, with some success, but I was flabbergasted when I discovered someone at Side Effects had built something with the same features, but built much more elegantly. I'm still learning from it.
The demo creates a curve with point normals pointing along the curve, and then uses it as input for two identical Source POPs. One Source POP goes to a Group POP whose group is the Orbit POP's center Group. The other goes to a Property POP, then an Upvector POP, then an Instance POP, then a Group POP (the source group for the Orbit POP). This chain of POPs describes the particles in orbit around the curve. The particles' axes are described in the Property POP's “Orbit” tab as $NX, $NY, $NZ, plus some noise. This works because the particles are birthed on the curve and take on the curve's normal. The Property Pop is also used to define the radius, speed, and orbit index. The Upvector POP defines the particles' individual upvectors according to the $OAXISX, $OAXISY, $OAXISZ defined in the Property POP. The two group POPs are combined in a Collect POP, then funneled into the Orbit POP.
Hope I didn't confuse you too much…I think I confused myself a little. So maybe I'll post that vortex.hip next time I check back here…
Mike
I tried to make my own tornado by assigning point normals to samples on a spline, with some success, but I was flabbergasted when I discovered someone at Side Effects had built something with the same features, but built much more elegantly. I'm still learning from it.
The demo creates a curve with point normals pointing along the curve, and then uses it as input for two identical Source POPs. One Source POP goes to a Group POP whose group is the Orbit POP's center Group. The other goes to a Property POP, then an Upvector POP, then an Instance POP, then a Group POP (the source group for the Orbit POP). This chain of POPs describes the particles in orbit around the curve. The particles' axes are described in the Property POP's “Orbit” tab as $NX, $NY, $NZ, plus some noise. This works because the particles are birthed on the curve and take on the curve's normal. The Property Pop is also used to define the radius, speed, and orbit index. The Upvector POP defines the particles' individual upvectors according to the $OAXISX, $OAXISY, $OAXISZ defined in the Property POP. The two group POPs are combined in a Collect POP, then funneled into the Orbit POP.
Hope I didn't confuse you too much…I think I confused myself a little. So maybe I'll post that vortex.hip next time I check back here…
Mike
Technical Discussion » problems: geometry & refraction; Cookie vs Boolean SOP
- mikela
- 27 posts
- Offline
Cookie operation on incoming Real Flow mesh?I find some of the refraction doesn't look right when I simply put the Real Flow mesh in my glass. You can't see through the liquid where the liquid and the glass meet, so the sides of the glass turn black. So I was cutting out the boundaries between cup and glass with Cookie SOPs to make it look more natural. But still some of my frames won't render, and there isn't even an error anywhere to suggest the cause of the problem…
Hand coding an Real Flow SD file? What? Why?uh, no. Hand coding a .geo file to get the right conectivity. I'm having better luck loading geometry into RealFlow, but it's still inconsistent, even with the very same SD file and workspace.
Mike
-
- Quick Links