Jump to content

blood splat effect


tyrn

Recommended Posts

Hi,

I am trying to acheive a seemingly simple effect where a high impact wound causes blood to splat on a wall, then, drip down. I have attempted several solutions and would appreciate it if anyone could offer some suggestions.

On one attempt my blood has the consistency of oatmeal with that metaball look. At best, I have come up with a cartoon blood splat. Unfortunately, I am going for realism.

To get the individual blood drops to look more like drops and less like tennis balls in a sock I used a trail sop piped out of my popnet with the Result Type set to Connect as Polygons and I unchecked Close rows. Then, I converted each individual poly line into a Nurbs Curve with the convert sop. I applied uv texture coordinates setting the Texture Type to Uniform Spline which maps the uv's from 0 to 1. I piped this into the pscale attribute of a point sop using $MAPU in place of $PSCALE so that the metaballs on the drops are scaled larger at the bottom and smaller at the top.

I've played around with the convert meta, and smooth sops and tried various numbers in the parameters. Even when I was able to smooth out the metaballs I get weird clipping on the edges which doesn't animate smoothly.

I've also tried subdividing the converted polys.

Any suggestions on a shader approach would be appreciated too. I've played around with procedural shaders and textures. While adjusting the refraction index in the Vex Glass Shader I came up with a nice liquid jolly rancher, unfortunately, not blood. I also experimented with the Vex Super Material.

I found this blood dripping image on the web. This is the sort of thing I'm going for, but, higher impact with more blood spray. As far as the dripping is concerned... similar to this.

Thanks for any of your ideas if you have time.

post-808-1107406908_thumb.jpg

Link to comment
Share on other sites

cool... well, thanks for the input. I might do it practically using a syrup substance, but, I have only explained the part of the effect in which I am having trouble. When the blood reaches the bottom of the wall it takes another form, so, thats why I wanted to try it in 3D.

Link to comment
Share on other sites

On the rendering, not the modeling...

In the shader - a nice trick you can investigate is to cast a ray (RayHitVOP) in the direction of the refracted ray and roll off the opacity based on the depth. This way you can make the blood see through to the wall where its very thin and be completely opaque where its thick. You can also attentuate the three channels seperately to get shifts in colour. There is more to this but you might get a better looking surface without going into more detail for such a simple effect.

Link to comment
Share on other sites

On one attempt my blood has the consistency of oatmeal with that metaball look.  At best, I have come up with a cartoon blood splat.  Unfortunately, I am going for realism.

...

Any suggestions on a shader approach would be appreciated too.  I've played around with procedural shaders and textures.  While adjusting the refraction index in the Vex Glass Shader I came up with a nice liquid jolly rancher, unfortunately, not blood.  I also experimented with the Vex Super Material.

16099[/snapback]

Not that I'm trying to make things even harder on you, but I too am having to do liquidy stuff of varying viscocities with metaballs and getting it to look at all liquidy is tough. Level sets are the way to go...too bad I'm not a real coder so I'll have to hope these make it into a future Houdini.

Anyway, I too went down the road of smoothing and convert meta and never achieved anything but the cottage cheezy, stuck in the '90s look of metaballs. I did get a little better result by converting the metaballs to i3D and then using an isosurface SOP where you can control how the field gets filtered. The Bartlet kernel gives me similar smoothness to Gaussian but at about half the compute time for a given filter size.

Because the i3dgen output ROP is adaptive by nature, it also aliases by nature and gives you inconsistent sampling results due to scaling your XYZ samples to the current bounding box size. I'm getting better results than I've previously achieved by placing a tiny metaball at the corners of a box SOP that I size to encompass the largest my sim will get and merge these into the geometry being evaluated by i3dgen. They're tiny enough that they're filtered right out by the isosurface SOP but they force a consistent space and better geometry coherence in the end.

I'd just add, since I've had to do digital blood several times now, getting it right means going redder than you might think and more opaque than you might think. Your Jolly Rancher example is funny because that's where I went first and that was the comparison an FX sup made. It might look neat to so some sort of refraction and roll off the color on thinner edges but that's something more like what you see in wine, not blood. Blood is very opaque. Enough so that doing refraction in most circumstances might be rays spent better elsewhere.

Link to comment
Share on other sites

I've done that sort of thing by using particles, trace SOPs, and a custom timefilter COP to generate a series of texture maps (colour, displacement, spec, etc.) which then get applied to the surface receiving the splat. This way it's easy to get the miniscus and the sense of depth in the liquid by manipulating the maps in the compositor. It's surprisingly effective.

Link to comment
Share on other sites

I'm going to look into the RayHitVOP.

Level Sets... AH yes... I have used them before, and don't have any custom tools available at the moment. Not sure I could just whip that out in a timely fashion. However, I haven't really thought of the iso-surface trick you described below.

I've already been playing around with COPs as well and figure that I will be returining to them. It's definitely tough getting the proper miniscus. I've sort of been able to fake it with a displacement map.

Thanks a lot for the responses.

Link to comment
Share on other sites

Because the i3dgen output ROP is adaptive by nature, it also aliases by nature and gives you inconsistent sampling results due to scaling your XYZ samples to the current bounding box size.  I'm getting better results than I've previously achieved by placing a tiny metaball at the corners of a box SOP that I size to encompass the largest my sim will get and merge these into the geometry being evaluated by i3dgen.  They're tiny enough that they're filtered right out by the isosurface SOP but they force a consistent space and better geometry coherence in the end.

16106[/snapback]

Not so much help with the blood, but in response to the above:

Another method to deal with your res stretching over your particle sim is to do the following:

1. Append a Bound SOP to your particle network/merge

- This will calculate and create bounding box for the whole particle sim.

2. In your I3D ROP, put the following expression in to your resolution:

[X,Y,Z] = [bbox("/obj/geo1/bound1",D_XSIZE)*$VOLUMERES,bbox("/obj/geo1/bound1",D_YSIZE)*$VOLUMERES,bbox("/obj/geo1/bound1",D_ZSIZE)*$VOLUMERES]

The bbox expression is pulling the size of your bounding box created by the Bound SOP in all 3 axis. Then I just have a global variable "VOLUMERES' that I am using as a multiplier. This way, you will automatically be adjusted for resolution based the size of your sim and you can easily control the overall quality with the global variable.

Link to comment
Share on other sites

Level Sets... AH yes... I have used them before, and don't have any custom tools available at the moment.  Not sure I could just whip that out in a timely fashion.  However, I haven't really thought of the iso-surface trick you described below. 

16111[/snapback]

I wouldn't have thought level sets would help. My understanding of levels sets is that they are for continous surfaces, whenever you want something to break out of the surface, like a splat, you would need particles or something else anyway.....

Link to comment
Share on other sites

I wouldn't have thought level sets would help. My understanding of levels sets is that they are for continous surfaces, whenever you want something to break out of the surface, like a splat, you would need particles or something else anyway.....

16121[/snapback]

true, though, I think perhaps they would be handy for some long hero drips that are continuous...

Link to comment
Share on other sites

I wouldn't have thought level sets would help. My understanding of levels sets is that they are for continous surfaces, whenever you want something to break out of the surface, like a splat, you would need particles or something else anyway.....

16121[/snapback]

Nope, you get very nice splats, splashes and surface breaks with level sets and a CFD solver.

Link to comment
Share on other sites

  • 1 month later...

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...