Jump to content


Rounded Fur/Hair solution?


  • Please log in to reply
17 replies to this topic

#1 SgtSpamBoy

SgtSpamBoy

    Peon

  • Members
  • Pip
  • 10 posts
  • Joined: 28-April 07

Posted 23 June 2010 - 06:39 AM

Hi,

What I'm looking to do is create the illusion of roundness to the individual hair strands so they look like tubes rather than flat strands (on extreme close up).
I've done this in Maya using Renderman by putting a displacement ramp shader across the width of the hairs - is there a way to achieve this in Houdini?

#2 tmdag

tmdag

    Peon

  • Members
  • Pip
  • 72 posts
  • Joined: 07-January 09
  • Location:Wellington, NZ
  • Name:Albert Szostkiewicz

Posted 23 June 2010 - 07:42 AM

could you show any example of effect You would like to achieve ?
Albert 'tmdag' Szostkiewicz
http://tmdag.com

#3 Jason

Jason

    King Tapir

  • Administrators
  • 3,708 posts
  • Joined: 08-November 00
  • Name:Jason Iversen

Posted 23 June 2010 - 08:39 AM

Hi there;  

I believe you can calculate the tube normal and then use it in a surface- or displacement shader. If you use it in a displacement shader, you might want to switch "True Displacements" off, at least for that object/material.

Look here:  http://forums.odforc...dpost__p__13877
jason iversen
++odforce guy, and supervisor @ r+h, jiversen-at-rhythm
odforce g+ page: https://plus.google.com/103473736257525043693

#4 symek

symek

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,544 posts
  • Joined: 02-November 04
  • Location:Waw/Pol
  • Name:Szymon Kapeniak

Posted 24 June 2010 - 11:59 AM

View PostSgtSpamBoy, on 23 June 2010 - 06:39 AM, said:

Hi,

What I'm looking to do is create the illusion of roundness to the individual hair strands so they look like tubes rather than flat strands (on extreme close up).
I've done this in Maya using Renderman by putting a displacement ramp shader across the width of the hairs - is there a way to achieve this in Houdini?


Just to be clear about it: the standard Houdini hair shader is built with HairNormal VOP, which does that *illusion* in shading by simulating rounded shape's normals of a hair. As to displacing actual geometry this would be the same approach as PRMan, just displace hair based in its 's' attribute (s is always facing a camera unless a curve doesn't specify different orientation with attributes).
(...) It was late, late in the evening, the lovers they were gone;
The clocks had ceased their chiming, and the deep river ran on.

#5 SgtSpamBoy

SgtSpamBoy

    Peon

  • Members
  • Pip
  • 10 posts
  • Joined: 28-April 07

Posted 24 June 2010 - 07:32 PM

Thanks all!  Some great info on that thread, Jason!

This is a link to an example/tutorial using Maya/Renderman to render curves with a bump to give them roundness - pretty plug-and-play setup though, quite different implementation.  Below is an example from Houdini showing the flat hairs.


SYmek - good to know.  I'm not really sure where to implement "HairNormal VOP," but I found this listed on the "Hair VEX Node" help article: "The roundness of each hair is determined by the value of the Bump Scale (scale) input."
That might be a solution as well, but I can't find where the bump scale is located yet (I'm using the shelf "Add Fur" solution rather than the furball example from h9.0).


I'm doing a pull-out from an extreme close-up POV and would like to give them some depth and detail.  The image on the left shows the flat hairs, whereas from farther away it is not an issue.

Attached Thumbnails

  • hair_cu.jpg
  • hair_mid.jpg


#6 symek

symek

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,544 posts
  • Joined: 02-November 04
  • Location:Waw/Pol
  • Name:Szymon Kapeniak

Posted 26 June 2010 - 04:42 AM

The approach is exactly the same as in PRman (Jason has given you a hint). Bump mapping based on 's' attribute. See attachment ;)

Attached Thumbnails

  • curves.jpg

Attached Files


(...) It was late, late in the evening, the lovers they were gone;
The clocks had ceased their chiming, and the deep river ran on.

#7 SgtSpamBoy

SgtSpamBoy

    Peon

  • Members
  • Pip
  • 10 posts
  • Joined: 28-April 07

Posted 28 June 2010 - 06:05 PM

View PostSYmek, on 26 June 2010 - 04:42 AM, said:

The approach is exactly the same as in PRman (Jason has given you a hint). Bump mapping based on 's' attribute. See attachment ;)

Wow!  Thanks so much for the example file, SYmek - I can really learn a lot from it!  It does works nicely with hair/fur as well.  I now see the similarity between this method and PRman (inside the VOP VEX displace).  I don't think I would have thought to use $NVTX with the width, nice touch...

Thanks again!

#8 Macha

Macha

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,654 posts
  • Joined: 23-July 08
  • Location:The Small Big P
  • Name:Marc ♥

Posted 12 October 2010 - 06:01 PM

Symek, I understand what you were doing to get the displacement to look round. But, can I use this technique on the default textured_hair shader? It looks different from the other vex shaders, somehow packaged differently. I'm not sure how to combine it with displacement.  Sorry, but my vex knowledge is quite bare.
My Vimeo

LinkedIn

improve side effects - use haskell


#9 symek

symek

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,544 posts
  • Joined: 02-November 04
  • Location:Waw/Pol
  • Name:Szymon Kapeniak

Posted 13 October 2010 - 06:43 AM

View PostMacha, on 12 October 2010 - 06:01 PM, said:

Symek, I understand what you were doing to get the displacement to look round. But, can I use this technique on the default textured_hair shader? It looks different from the other vex shaders, somehow packaged differently. I'm not sure how to combine it with displacement.  Sorry, but my vex knowledge is quite bare.

In H11? It's a new Material Builder slightly reorganized compared to H10. You can of course do the same thing (note, this is actually happening in a a way, because hair shader uses Hair Normals (fake roundness*)). Anyway in Material Builder you need to add Output VOP, change its type to displacement, connect it to collect vop and the rest stays the same.

* - like this:
Nhair += (u*2-1) * normalize(dPds);

Attached Thumbnails

  • MaterialBuilder.png

(...) It was late, late in the evening, the lovers they were gone;
The clocks had ceased their chiming, and the deep river ran on.

#10 Macha

Macha

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,654 posts
  • Joined: 23-July 08
  • Location:The Small Big P
  • Name:Marc ♥

Posted 13 October 2010 - 03:22 PM

:D
My Vimeo

LinkedIn

improve side effects - use haskell


#11 shareu

shareu

    Peon

  • Members
  • Pip
  • 14 posts
  • Joined: 24-November 04
  • Location:korean
  • Name:jeonghun seong

Posted 05 October 2011 - 01:25 AM

View PostMacha, on 13 October 2010 - 03:22 PM, said:

:D


I adopted this technique. but I wondered that how to archive this result? please tell me something to solution.

Attached Thumbnails

  • thickness1.jpg


#12 jesschaco

jesschaco

    Peon

  • Members
  • Pip
  • 27 posts
  • Joined: 04-April 10
  • Location:california
  • Name:J T

Posted 19 February 2012 - 03:33 AM

Hi SYmek,

Thanks so much for the solution. I tried your method about adding the extra nodes in the hair shader. For some reason, the strands are still rendering flat. My vex knowledge is very limited. Hope you can help me figure out what exactly went wrong....... :(

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users