Jump to content

coke can disintegration expirements


itriix

Recommended Posts

  • 3 weeks later...
  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

higher sampling rate:

It looks very clean. For a controlled sim it's pretty good, but that also makes it a bit boring. Advecting your particles with a fluid sim will probably give you more interesting results. Even if it is a little bit, you get the vortex swirls in there which you generally don't get if you just use pops. Something else that would make it cooler is to have a double disintegration: first disintegrate the paint, then disintegrate the metal - and if you really want to push it: whilst the paint is disintegrating, make the can crumble/deform slightly (or violently as if it is resisting disintegration), since everything is pretty much triggered with a gradient ramp you should be able to use different parts of the ramp to trigger different things.

If you want to push the boundaries a bit more you could also disintegrate it from the bottom, turn it into a rbd and update the model with a sop solver. That way it will fall over whilst disintegrating.

Have fun with it!

Link to comment
Share on other sites

Have fun with it!

Hey Peter, Thanks for you're suggestions! That's the kind of challenges I was waiting to hear :) I think i'll give them all a try!

Just giving the "disintegrate paint then metal" approach some thought... That should be easy enough, just having a "different" ramp gradient that's offset a bit later, to drive the "metal particles"... And make the can geometry "alpha" ramp, match the end of the "metal ramp"... However, do you think it's okay that i'm emitting the particles from the same geometry? Or do you think i would need to "up the ante", and have two pieces of geometry, one slightly smaller than the other, which would be for emitting the metal particles? *because the metal technically is "underneath" the paint... even though it's EVER so slightly... My mind keeps jumping to the idea of trying to do this paint to metal reveal in the shader, and possibly try and add some bump to the "paint" layer, but it seems to me that it could get complicated. Every time I think I can quickly do something in the shader, I tend to feel a little lost :) I'm thinking since the paint and metal are ALMOST technically at the same spacial position, i could get away with just emitting from the same geo, which in turn would just make this way simpler) Thoughts on that?

Secondly, I love the idea of advecting the particles with a fluid. I understand the basics of creating a "fluid" and then using the "embed in fluids" tool to advect the particles with the fluid. But, i'm actually a bit curious on how to get a "fluid sim" that matches my "can disintegration"... Seems like I should be able to use my ramp that was driving the particles emission, to somehow act as a source for fluid emission. Not very sure how to go about doing this though. Ideas?

And lastly, I actually had given the "crumbling" some thought but just didn't go through with it because it seemed to make things quite complicated but now i'm ready to jump in and try it! I'm trying to think, where in the chain of events this would have to occur, i mean, if a chunk crumbled off of the can, then obviously i would need to disintegrate that spot in the can... so as pieces crumbled off, they would need to "alter" my emission ramp... HMMmmm..... OOooohhh this just gave me more cool thoughts, but if I crumble the can, It'd be pretty cool to see the "crumbled chunks" disintegrating also... Maybe just a select few, and leave a couple chunks behind... But just that thought of SEEING it crumble and then the CRUMBLE being disintegrated, i like that a lot!

Nice! I'm totally pumped up. I have a feeling i'm going to jump into houdini and then come to a screeching halt wondering, HMMMm, how do i do this? lol :)

So, i'll do just that and see where I get. Will post more results as they come. Thanks!

Cheers,

Jonathan

Edited by itriix
Link to comment
Share on other sites

do you recompute normals of flying points? if so - how do you?

Hello there, nope, i'm not worrying about the point normals of the flying points. I'm actually just "setting the initial velocity" in the source pop with a bit of variation and then some other forces and noise.

Hope that answers you're question! If not, let me know.

Cheers!

Jonathan

Edited by itriix
Link to comment
Share on other sites

Hey, just quick:

watch this:

http://www.vimeo.com/6660287

series on the sop solver, in part 4 he provides you with a way to emit fluid from the edge of your geo.

and have a read through this for the paint:

http://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc07/NardeepC/MSc-NardeepSinghChander.pdf

He uses two layers of geometry, which allows him to first peel off the paint by displacing it (on shader level, but the same maths applies on sop level, just needs a lot of points)... you could do the same and then make it disconnect from the actual mesh as a separate slice.

Bigger chunks of paint disintegrating should not be too hard (it's a matter of disintegrating bigger pieces of the mesh first and using those pieces as the source of a second emission), different chunks of metal disintegrating will be a lot harder as you somehow have to update the object to go from a single object to a fractured object in DOPS (and I have not really tried that myself... however, you could have a look at the Katamari challenge here on odforce - that basically does the reverse -> it sticks individual objects dynamically together to form one bigger object).

In that technical effects dvd I did for 3dbuzz it shows fractured geometry as cloth objects... that can provide bending/fracturing/bigger pieces floating/bigger pieces copied to particles, especially with the latest releases of the cloth. But it's slow and if you are using H10 you need to make a slight modification to your clothconfigure object: http://www.3dbuzz.com/vbforum/showthread.php?t=181202

Tackle one thing at a time. The Dops one having the metal disintegrate in different pieces is probably the hardest. Advecting particles is not so difficult and you should be able to find several hip files here on odforce showing that off.

Link to comment
Share on other sites

Thanks for the suggested references. The last two days i've been researching and doing some tests on some simpler scenes. I manged to create a basic shader setup to fade out the top layer texture (paint) to reveal another texture (metal) underneath and eventually fade out completely. I also made a leading edge ramp to put points into a group and use this to drive a soft transform to displace the geometry. I also got the deforming geometry to shatter and work correctly inside of dops... (just a simple scene test though, but i'll post a vid) *it's a bit funky for the moment tho* because it's just a common rbd shatter, whereas I want to drive the shattering based on the "leading edge" bump ramp, to force the crumbling. If I just store the leading edge ramp as an attribute, and use that to drive the "glue strength" on the rbd glue object, then it seems it should work. *just theory at the moment*... Next, I still need to figure out how to get the fine detail addressed in the .pdf on weathered textures you posted. So far I can't really think of a way to get detailed displacement without resulting to hi-res geometry because I actually need the geometry in order to drive my simulation instead of just using a nice displacement shader that could easily get nice detail. Also are you aware of a .hip file of that weathered texture work anywhere online? Lastly, I figured out how to advect the particles with fluids, using the advect by volumes pop. I definitely need to experiment with it more because it didn't seem to add any detail to my particle motion. It seemed like it just pushed my particles faster. Even with vortex confinement up to 10, seeded vorticles with strength of 3 and distance to 1 or 2, wind with noise... While experimenting, I had randomly tried the "embed in fluids" tool, which gave me a cool little result, that i'll post. However, that's not the tool i need to use for this sim.

Tonight I'll try messing with the advect by volumes fluid and the actual fluid sim a bit more and see if I can get the particles swirling around more. I have the same "ramp" that's driving my particle sim, being used to source the density for my "smoke" fluid sim... using the method Peter Quint used in his Match Fire tutorial by copying metaballs to the "emit points"... and using these metaballs as the source to emit fluid.... So essentially I get the same "basic" sim as my original particle sim, but just need to try and noise it up even more... I'm not sure if there is something i'm leaving out to get the "swirling"... hmmm. Well anyways, I did a render last night of the "advect by volumes" sim also but you'll notice the lack of detail in that one like i was talking about. So here are my current results, and now it's back to more experimentation!

Thanks for all you're help. I'll be posting more results very soon.

Jonathan

two_layer_fade.mov

advection_test_x264.mov

coke_can_disintegration_11_x264.mov

Link to comment
Share on other sites

i'm not sure why, but when i play back the disintegration_11_x264.mov in the web browser, it does some weird stuttering at the end... This doesn't occur when I play it in quicktime/vlc not in the webbrowser. curious if that occurs in anyone elses?

Thanks,

Jonathan

Link to comment
Share on other sites

successfully have gotten added detail in my sim using the advect by volumes method now!!!! It definitely adds a lot more to the particle simulation. A simple and fantastic new technique to know and use now!!

Rendering out some attempts now, will probably experiment with the look a little while before I settle on one look. I'll post my results in the morning.

Cheers,

Jonathan

Edited by itriix
Link to comment
Share on other sites

your sims already look a lot more interesting.

Also the paint cracking seems to work.

One of the things you should make sure of is that no paint cracks come back. You can do this by accumulating your values using a sops solver, rather than simply defining them with an expression. Eventually your system should consume all surface area (except if you were to define a hard mask where it could not go - that way you can erode shapes out of your paint)

Also try to avoid floating "islands" of isolated paint floating in mid air. You could probably identify those islands with the connectivity sop and measuring their area.

Have a look at this to start playing more with sopsolver and attributes (Odforce Attrib Simulator):

http://www.sidefx.com/index.php?option=com_wrapper&Itemid=149

You can also potentially slowly have your paint "grow back" over time, which would allow you to then erode it again :). Which is a nice cycle.

Seems like you are well on your way! Good luck with the other effects.

Link to comment
Share on other sites

Thanks Peter!

In fact, I solved the "floating island" last night by using a method similar to your suggestion using a connectivity and partition and a foreach loop to assign a primnum attribute *the number of primitives* in that group, and if that number is under a given thresh hold, I delete those prims.

The "returning" paint issue, seems to be due to a "metaball" approach... if i'm emitting particles with some variation in their speeds, as "some metaballs" reach the surface *to deform*, they bump up the surface, but then it seems like some of the "still traveling on their way metaballs" begin to arrive, and it seems like it "unbumps" the surface... I'm still testing that but i seem to be side tracked on something i have a feeling you might be able to help me with. I'm SO close to getting it to work but it's still not there. After I get it, i'll move onto the actual "cloth" paint breaking off of the surface!

Anyways here is my issue now:

When the paint begins to "chip", i'm attempting to get that area of the bumped up surface to actually "curl" backwards a bit... I've gotten it "SOMEWHAT" working but i think my math is wrong... im kind of shooting in the wind getting it to work. However, my basic approach is finding the edges of the chipped paint... i simply created a group named edge_gr defined by edges and turned on "unshared edges"... Next I created a float attribute called edge_pt and used an expression: haspoint("edge_gr", "path/to/edge_gr", $PT)

That returned me a 1 if the point was "an edge point" and 0 if not... Then I tried using an attributeTransfer with edge_pt to "give some spread" to that attribute across the surface... This gave me a slight falloff of 0 to 1 values from the edge to essentially a little distance away from the edge, which i'm considering the "boundary of the NON - EDGE POINTS"... So, now I have that information... I then wanted to essentially "curl" those points that do not have a 0 for edge_pt... with an increasing "bend" as it gets closer to the edge. So points with edge_pt 0 gets no curl, and points with edge_pt 1 gets MAX curl... The problem is i'm a bit lost on how to exaggerate "bend/rotate" my normal.

I created a vector attribute called: edgeN... and it uses pretty much the same expression as above: haspoint("edge_gr", "path/to/edge_gr", $PT) but then i multiply the individual vector component by $NX, $NY, $NZ in respective order.

example:

val1: haspoint("edge_gr", "path/to/edge_gr", $PT) * $NX

val2: haspoint("edge_gr", "path/to/edge_gr", $PT) * $NY

val3: haspoint("edge_gr", "path/to/edge_gr", $PT) * $NZ

So basically i would get a vector attribute that returns 0 for it's N component, for a point NOT on the edge, and would return the actual NORMAL component of the point on the edge... I then did an attributeTransfer with this just like the edge_pt above, to spread out this normal value outward from the edge points to the non - edge points, so i now have an edgeN attribute that is basically a "somewhat bent" normal"... but i want to be able to exaggerate that bend... and curl it even more from non-edge to edge-pt...

I created a vopsop, and expiremented inside but didn't get anything that seemed to be working, so it led me to believe i'm doing the math wrong. I tried taking the global N and subtracting edgeN from it, to get a "difference vector"... not sure if that was right... i then normalized this and pumped that into a nN of displace along normal vop, and then pumped P into the P of the disp along normal vop... I then used the "edge_pt" attribute i made to put into the "amount" of the disp along normal vop... and then piped the resulting dispP into the P of the output vop...

I got some "KIND" of but not really curl... looked more just like it was raising the surface up a bit. I'll post my examples.

Anyways, if you have any thoughts on what i'm doing wrong here, i'd love to hear any suggestions.

I've been suggested looking into point clouds for curling the paint chips but i'm quite inexperienced with them. It seems like i could use somewhat the same method i attempted above with the pcloud method but once again, i think i'm still a bit stuck on the whole "vector" math involved with getting the correct normals and displacement amount on it. Once i get that part working, I think either method will work fine for now!

Once again, thanks for you're continued help and critique!

Cheers,

Jonathan

Edited by itriix
Link to comment
Share on other sites

You are getting close.

Have a look at the hip file, there are some interesting tricks in there :).

It's a bit rough and the points could do with some filtering through chops so they are a little less jittery. Also there are some intersections which need some cleaning up. -- What I would really do is apply this deformation in a sop solver and with a ray operation check if it is about the collide with something else, then limit the deformation to that projected point.

The jitter is most likely coming from the redefinition of the outward vector coming from the pointcloud at every frame. You could build in a trigger so it takes that outward vector only when a point is triggered.

Next thing to look into could be that sop solver... you won't go back to any other software when you start using it :).

Sop solver and attribute transfer... or pointcloud attribute transfer for speed and filtering a lot more points.

curl_metal_01.hip

curl_metal_particles_01.mov

curl_metal_no_particles_01.mov

Link to comment
Share on other sites

MUWAHAHAHA! :)

Thanks so much... It's funny... I just posted a topic asking about point clouds then I saw you're post! :lol:

ANYWAYS, I'm going to look at this right now. Looks SUPER FANTASTIC! NEXT STOP - implementing this new approach and applying you're suggested methods with the sop solver!

Will post my updates asap...

Thanks once again,

Jonathan

Link to comment
Share on other sites

alright so i've gone over your hip file multiple times to the point where i can rebuild it in my sleep... a couple questions. first one is about workflow: what's the advantage/reason of grouping by prims then using the edit tab to convert from prim to points and then doing another group node that converts that group from point to prims :)

the next question i have is about my attempts to detect interpenetrations so that i can use this information to control the amount of displacement applied to that point... i tried looking for some approaches within dops and using the sop solver but haven't been able to really find any way of doing this. Was thinking that i could detect "collisions" somehow, but since it's simply one piece of geometry, there is nothing to check it against... I was suggested using the sop solver for this task could be slow and hard to debug and that another possibility would be to just do it all within sops first by detecting interpenetrations and storing this information in an attribute, then caching out the geometry to disk... then read in the geometry cache, and use the "attribute" that was created to adjust the "amount of displacement" in the actual vopsop_curl... now the issue is how to actually "detect" interpenetrations... My friend suggested booleans but i've been unsuccessful so far at getting this to work...

I tried using a "cookie sop", set it to creases and turned off autojoin edges... it gave me a set of points that "kiiiiiiiiiinda looked like they might be interesection points"... when i say kind of, it looked like some were, and some weren't... It did seem to show some general areas where there were penetrations so it was a start. I applied an attribute to these points called "penetrate" and gave it a value of 0... I then gave my "main branch of my network" an attribute called penetrate with a value of 1. Then I did an attribute transfer on the attribute, and spread out the value a VERY slight bit... In the vopsop_curl, this attribute was read in and multiplied with the "displacement amount" and the "rotation amount"...

It seemed to fix some spots but not others. It also altered the look a bit which made me want to "tweak it again" and then the cycle continued.. This makes the "sop solver" approach sound better in that it will directly effect the result while i'm playing it. The key is locating the penetration spots. I'll be trying more today!!!!

Any ideas come to mind for the "sop solver approach" or just on how to detect interpenetrations?

Seriously thanks so much, i have learned an invaluable amount from you're file!

Jonathan

Edited by itriix
Link to comment
Share on other sites

alright so i've gone over your hip file multiple times to the point where i can rebuild it in my sleep... a couple questions. first one is about workflow: what's the advantage/reason of grouping by prims then using the edit tab to convert from prim to points and then doing another group node that converts that group from point to prims :)

That is a simple way to expand your group by one neighbour :). This is just to make sure you include not just the points that have been selected, but one extra level, so the subdiv will include a bit more. note also that expanding the sampled values (as in group points that are a bit more or less red) will not give you the same as grouping points by expanding them to include the closest neighbour. This becomes really obvious at very low resolutions.

the next question i have is about my attempts to detect interpenetrations so that i can use this information to control the amount of displacement applied to that point... i tried looking for some approaches within dops and using the sop solver but haven't been able to really find any way of doing this. Was thinking that i could detect "collisions" somehow, but since it's simply one piece of geometry, there is nothing to check it against... I was suggested using the sop solver for this task could be slow and hard to debug and that another possibility would be to just do it all within sops first by detecting interpenetrations and storing this information in an attribute, then caching out the geometry to disk... then read in the geometry cache, and use the "attribute" that was created to adjust the "amount of displacement" in the actual vopsop_curl... now the issue is how to actually "detect" interpenetrations... My friend suggested booleans but i've been unsuccessful so far at getting this to work...

Any ideas come to mind for the "sop solver approach" or just on how to detect interpenetrations?

It is a tricky problem. I have not yet explored it further, but what comes to mind is the ray sop to measure the distance against the surface (you delete everything but the curving edges and ray them against the original geometry, that should give you the ray distance.). Or if the object is not too complex, you could even turn it into an sdf and check if the signed distance of a point is negative. If it is negative, that means it is inside the geometry and then you should be able to push it back to the surface (linearly this will give deformation problems and bunching up of points), or reduce the displacement amount at that point until it sits on the surface. I highly recommend watching the CmiVfx fluids dvd if you have never done this, or browse odforce for some sdf hip files.

One of these hip files I did a while back might also give you some ideas (it's with particles, but it does the same thing, it pushes the particle out of the object until it sits on the surface again):

(and if you want to get sidetracked and learn about how to use pointclouds in pops, the answer is here: )

There must be another way, perhaps by checking the curvature, or measuring the occlusion in sops... or performing a better curl operation: you might actually be able to perform a second rotation after the first. So you would curl it as if you were pressing metal between and around two cogs, the resulting shape would be like an "eight" as in -> 8, but cut in half -> the deformation would be more like a sin wave, rather than a full circle.

There should also be a possibility to smoothen out the geometry around the intersections. If you have ever pelted a uv map you'll see how the points will try to lay themselves out as evenly spread as possible. Almost like an interact pop (or lots of little magnets) pushing the points away from eachother where they are about to intersect... again that is more of a sopsolver solution though.

Just on a side note: if I can avoid booleans I tend to. Because often they will give unpredictable geometry (topology wise) back or if they use the cookie sop they might not work at all.

Seriously thanks so much, i have learned an invaluable amount from you're file!

Jonathan

Well, glad you are learning. Now you can teach the next guy that wants to do disintegration :) -or if you are feeling generous... share your hip file at the end of the project, this will allow others to refer to this thread for months to come. Try to do the fracturing cloth and disintegrating bigger pieces too.

I'm going on holiday soon, so don't know when the next reply might be. So far I think you have made good progress and I hope you'll continue to challenge yourself by mixing your sop skills and math with some dynamics. The sopsolver can get slow when dealing with very heavy geometry, but if you make use of pointclouds and vops a lot you can get it fast again through multithreading.

good luck with it!

Link to comment
Share on other sites

Thanks and Happy Holidays! I will hopefully have this thing completed soon. When I do, i'll create a tutorial and hip file for others to learn from! Once again, I can't express my gratitude enough for all of your time and effort!

Hope I have this thing finished by the time you check back,

Cheers,

Jonathan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...