Jump to content
spice

hair,fur,fiber rendering with VEX

Recommended Posts

Lol. (It's actually a bald uakari monkey.) I can't figure out what happened. All of the test renders worked fine. The particle system's gone bonkers :blink:

Share this post


Link to post
Share on other sites

It gets better.

Appreciate the level of detail in the body geometry, the subtle use of shaders, the realistic facial expression...

:dots:

post-791-1111679972_thumb.jpg

Share this post


Link to post
Share on other sites
It gets better.

Appreciate the level of detail in the body geometry, the subtle use of shaders, the realistic facial expression... 

:dots:

post-791-1111679972_thumb.jpg

17086[/snapback]

Haha!

Something tells me that you should bake out the animated hair sequence to .bgeo files first. Now you can inspect the sequence for subtle glitches long before you render. It makes lighting iterations and flipbooks and everything sooo much faster.

Do you know how to do that?

Share this post


Link to post
Share on other sites

I would go one step further, and write out the hairs before the animation is applied and render that to make sure it is working. Then run the simulation, you must be using the softBodyPOP, since you mention particles in your previous mail.

With the pre and post curves done, you can then blend in and out hairs over their length very easily to correct things. It is fairly easy to paint on the animated skin and transfer those weights to the hairs and then blend based on that amount. The attribTranser and attribPromote are your friends when it gets down to it.

Let me know if you what an example file.

-k

Share this post


Link to post
Share on other sites

I'm afraid you'll have to bear with me, as I'm still pretty new to the world of 3D. I'll quickly go over how the hair simulation is working:

The character itself is a piece of poly modeled geo, with a bones and controls etc etc to control the deformation.

The animated deform SOP is imported into the hair object, which is where things get a bit... er... hairy. Excuse the pun. For the hair on the body, I've used a Group SOP to select all the individual polys I want hair to grow from. Then I use a Scatter SOP to generate 150,000 points on these poly for the roots of the hair. I give each point a normal interpolated from the normals of the original geo. Then I take a 4-knot NURBS curve, give it length and render width, lock it, copy it to each of the scattered Points using the normals to orient the curves. Then I wire it all into a Spring SOP and wire the original geo into the Collision input (where I think the problem may be). Add a bit of tweaking and a shader and hey presto.

I can't do any work on it at the mo as I'm away from my workstation for a week or so. I think that things started going loopy when I added a collision object to the Spring SOP.

thekenny: I'm not sure what you mean with painting weights and promoting attributes etc... This setup has taken me weeks to figure out :huh:

Share this post


Link to post
Share on other sites
thekenny:  I'm not sure what you mean with painting weights and promoting attributes etc... This setup has taken me weeks to figure out 

That's okay. It sounds like you are doing very well for being new to Houdini. I try to mock up a file and show you what I'm talking about.

-k

Share this post


Link to post
Share on other sites

Here comes another version (v_1.4a) of my Marscher implementation, featuring a different opacity formula for blending (described in the tutorial)...

Try this one if you were not content with previous results...

Cheers

Arno

arno_hair_far_field_v1_4a.zip

Share this post


Link to post
Share on other sites

I've fixed the problem - for some reason the Spring SOP wasn't behaving itself when I added collision geometry so I just unwired it and all returned to normal. I've also removed all but one of the lights and changed the shadows to Z-depth, which has sped up my renders a lot - thanks for the tips!

Here's a couple of screenshots of the rigged and posed character, the first with the 1.3 shader, the second with the 1.4a shader - I can't see much difference apart from a slight difference in hue. I've also attached the .preset for the settings I used.

Can anyone suggest a way to introduce a little random variation into the colours of the hairs? Currently it's looking a little too uniform. All I can think of is creating a few different groups and shading each with a different shader. Ideally, though, I'd like to also be able to visually 'paint' an attribute onto the geometry, say with a floating point value between 1 and 0, that would be inherited by each hair to set an interpolation of the colour of the shader between a minimum and a maximum value... or is this not possible in Houdini?

The next thing I need to do is get the shading/texturing for the skin sorted. It needs to look a lot more natural than it currently does. I know that 'dirtying up' 3D renderings isn't the simplest of tasks, if you're going for a natural look...

Any comments/critiques/suggestions are welcome. I guess this should continue in the WIP forum so I'll post my next reply up there. Thanks again for all of the suggestions and advice - certain odforce forum members will be getting personal credit in my project hand-in!!!

shader 1.3:

post-791-1112474425_thumb.jpg

shader 1.4:

post-791-1112474461_thumb.jpg

and the preset:

fur_shader.zip

Share this post


Link to post
Share on other sites

Hi Tom,

I had a look at your parameter settings. Wit theese settings the shader is more or less a diffuse one!!! :)

I recomend following changes:

1.) Set diffuse intensity to less or in the order of 0.1 and the diffuse color to about 60-80% of your current values !!!

2.) Decrease absorption coefficients to about 20-30. If the color looks still to dark increase scale_TRT & scale_R & scale_TT and/or the azimuthal width of the caustic.

3.) Set eccentricity to 1.0 please, since you don

Share this post


Link to post
Share on other sites

Hi Arno,

Thanks for the tips - those settings were mostly just random tweakings - I haven't got round to getting through the Marchener model itself yet. I'll make some adjustments and post more results up here.

I'm doubling the number of hairs to 200,000 but the skin will remain the same, as that's the colour it is in real life for this animal!!! B)

Share this post


Link to post
Share on other sites
Here we are:

post-791-1112613212_thumb.jpg

17270[/snapback]

All right, this looks much better now (except the aliasing artifacts) !:)

In my opinion even 200000 hairs is not enough. I was thinking about half a billion (500000+) !!! :)

To overcome the problem of time consuming hair dynamics you could perhaps animate only guide hairs ?!

Could I have a look at your current shader settings please ... B)

Arno

Share this post


Link to post
Share on other sites
All right, this looks much better now (except the aliasing artifacts)  !:)

In my opinion even 200000 hairs is not enough. I was thinking about half a billion (500000+) !!! :)

To overcome the problem of  time consuming hair dynamics you could perhaps animate only guide hairs ?!

Could I have a look at your current shader settings please ... B)

Arno

17271[/snapback]

Guide hairs would be a lot better. My computer's choking on a regular basis trying to cook even 200,000 hairs, I've got 1GB of RAM and I keep getting Memory Allocation errors and crashes. So I've ordered another 512MB RAM. For the moment I'm just saving the hairs out to bgeo and using those to test renders. I'll try again with half a million... :blink:

fur_shader.zip

Share this post


Link to post
Share on other sites
No chance... I don't have the RAM for 500,000. :(

17277[/snapback]

That

Share this post


Link to post
Share on other sites

Here's the changed settings, but from before your edit :)

post-791-1112635472_thumb.jpg

And here, with the changed settings from your edit:

post-791-1112636056_thumb.jpg

This is now looking really nice. Thanks for your tips. I'll get an animation going, how about that? :)

Share this post


Link to post
Share on other sites

Some sort of procedural will need to be used if you want to render more hair. Otherwise, you could try to fake it with some texture map underneath to fill out the volume.

Share this post


Link to post
Share on other sites

Don't forget you can save a lot of RAM by:

*/ Stripping all attributes you don't need from the geometry

*/ Strategic use of the Unload flags on SOPs can keep RAM usage down.

*/ Writing the geometry to disk, and then setting "Render From File" in the Render tab of the hair object. Now you can use some proxy representation of the hair interactively. Doing this will cause Mantra to load the geometry definition directly from disk instead of causing Houdini to compute all the hairs and then feed the geometry to Mantra every time. Very useful capability, this thing of Mantra's.

Share this post


Link to post
Share on other sites
Don't forget you can save a lot of RAM by:

*/ Stripping all attributes you don't need from the geometry

*/ Strategic use of the Unload flags on SOPs can keep RAM usage down.

*/ Writing the geometry to disk, and then setting "Render From File" in the Render tab of the hair object. Now you can use some proxy representation of the hair interactively. Doing this will cause Mantra to load the geometry definition directly from disk instead of causing Houdini to compute all the hairs and then feed the geometry to Mantra every time. Very useful capability, this thing of Mantra's.

17317[/snapback]

Hi Jason, thanks for your comments. I hope you don't mind, but because I am a bit of a houdini newbie, could you give me a couple of specifics as to how the above might be accomplished? In the hair object, I have several different groups of hairs, which are all grown individually at different lengths and use different shaders, then merged. Should I move them all into separate objects? After that, how exactly would I go about saving each frame's hair to geo without having to do it manually for each frame? Sorry again for the newbie questions. I'm going to see if I can work out how to remove attributes I don't need, but if I can't, I may need your help again :unsure:

Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×