View Full Version : Real-time fur/hair/grass creation.
MilesBaskett
2006.01.19, 01:45 AM
I stsrted up a thread on this subject over at cgtalk.com in the game modeling thread.It may be of interest to some here.
http://forums.cgsociety.org/showthread.php?t=304996
TomorrowPlusX
2006.01.20, 09:01 AM
I wish I knew Japanese.
Anyway, the fur interests me less than a couple other parts. First, how do they do the blurred distant background? Is it pre-rendered? Or are they doing something fancy, like rendering the background into a low-res texture, blurring it, and then drawing it behind everything else?
Same with the bloom effect. I didn't know the PS2 could run a blur on a texture. Of course, I don't know anything about the PS2's hardware, but still, I'm impressed.
Bachus
2006.01.20, 03:13 PM
I wish I knew Japanese.
Anyway, the fur interests me less than a couple other parts. First, how do they do the blurred distant background? Is it pre-rendered? Or are they doing something fancy, like rendering the background into a low-res texture, blurring it, and then drawing it behind everything else?
Same with the bloom effect. I didn't know the PS2 could run a blur on a texture. Of course, I don't know anything about the PS2's hardware, but still, I'm impressed.
http://www.beyond3d.com/forum/showpost.php?p=660151&postcount=18
None of it is terribly revolutionary. And quite frankly, the fur looks like ass, as that's how all fur done with the shell/fin method looks.
psyba
2006.01.20, 09:09 PM
GLSL Shaders anyone? I'm no expert, but I've seen a GLSL pixel shader that made fuzzy fur on any kind of mesh. GLUT fuzzy teapots and all. I found this link for ATI specific extensions but you may be able to work it into GLSL.
http://cgi3.tky.3web.ne.jp/~tkano/
PowerMacX
2006.01.20, 09:31 PM
Here is another translation, it includes all the pictures & thumbnails of the original article, along with captions, so it is easier to follow than the translation on the forum post.
http://www.dyingduck.com/sotc/making_of_sotc.html
As Bachus says though, nothing really revolutionary - the outdoors scenes look nice, and so does the fur (from a distance), but it is still a pretty "common" set of techniques.
arekkusu
2006.01.21, 05:45 AM
GLSL Shaders anyone? I'm no expert, but I've seen a GLSL pixel shader that made fuzzy fur on any kind of mesh.
You can do shells and fins without any sort of shaders. Much less GLSL.
OneSadCookie
2006.01.21, 06:18 AM
http://onesadcookie.com/~keith/fur10.zip is a port of a (now ancient) PC fur demo. It ran OK-ish on a Rage 128, so it should scream on anything even relatively recent.
needs an "unsigned" at the start of line 90 of texture.h to compile with Xcode 2.2. Read the ReadMe for keys. Play with constants near the top of fur.c for amusement value.
AnotherJake
2006.01.21, 05:37 PM
Very cool demo! I've never seen fur in real-time that I can recall. It looks surprisingly good. I'm not sure the fins really add anything since the shells seem to do the trick all on their own IMHO.
Strangely (or not so strangely with Xcode sometimes), changing to unsigned char didn't fix the problem right away. For some reason Xcode simply couldn't get it out of its brain that the problem had been fixed. I tried cleaning the project and it still refused to see reality. After trying to build it and changing a couple different lines to trip it up it finally picked up the correction. Weird! I don't think that's the first time I've encountered that happening.
blobbo
2006.01.21, 08:20 PM
Fun little Demo. Can't wait for TomorrowPlusX to implement this. Seems he always manages to get way cool generative graphics effects working in his engine.
akb825
2006.01.21, 08:40 PM
I can't compile it in XCode. It says that
Command /Developer/Private/jam failed with exit code 1
This is with XCode 2.2 on OS X 10.4.4. I looked through all the build settings, but I don't know what it's breaking on. :(
aarku
2006.01.21, 08:54 PM
What do the detailed build results say?
OneSadCookie
2006.01.21, 09:13 PM
It's got -Werror set, and contains a warning (new for GCC 4.x I think), therefore doesn't build. See the edit to my original post for the fix.
MilesBaskett
2006.01.22, 07:01 PM
http://www.gamasutra.com/education/theses/20051028/sheppard_01.shtml
There is a 50+ page pdf at the link on realtime fur creation, including the coding on making a few creation and viewer apps.Very interesting.
akb825
2006.01.25, 01:10 AM
Works now. Quite a nice effect.
MilesBaskett
2006.01.25, 01:17 AM
They used that type of fur creation for the new KingKong videogame as well, not as good looking as in Shadows of the colossus though.
Thanks for the app OSC. I'm definitely going to make a reason to have fur in a game now :p.
It also looks cool if you go into fur.c and change the number of shells (it's defined as NUMBER_OF_SHELLS) from 8 to 20. Anything more and it just looks solid. I think 20 gives it a nice, full fur and still runs fine on my 1.33Ghz PowerBook G4.
MilesBaskett
2006.01.25, 02:23 AM
20 may be a bit too much in a full game though.I've seen alot of pics from other games that have used the technique for fur, and the most shells used looked like 8 layers thick at most.Its gets hard to caculate all the fur dynamics and keep fast frame rates with lots of shells(well at least on the lower spec systems).Or maybe program the number of shells depending on the on screen LOD.Similar to how they added the "fins" in the PDF I posted a link to.
TomorrowPlusX
2006.01.25, 08:18 AM
Now, what I think would be pretty astonishing looking would be if the shells followed the movement of the base object via a tight, dampened spring system. The hair would move pretty "realistically".
arekkusu
2006.01.25, 02:51 PM
Now, what I think would be pretty astonishing looking would be if the shells followed the movement of the base object via a tight, dampened spring system. The hair would move pretty "realistically".
Try googling for "ATI fur" and you'll get exactly that.
There was even an OS X port at one point, a big furry "X" logo.
Shady994
2006.01.25, 03:12 PM
Try googling for "ATI fur" and you'll get exactly that.
There was even an OS X port at one point, a big furry "X" logo.
Perhaps the one on this page:
http://www.ati.com/developer/demos/macss1/index.html
Also, on:
http://www.ati.com/developer/demos/macss2/index.html
the bear and chimp demos are using this fur rendering technique. No source though. :(
akb825
2006.01.25, 04:33 PM
It really sucks that those SS2.0 demos won't even work on an X800... You'd think they would since it's newer, but no...
TomorrowPlusX
2006.01.25, 05:22 PM
No luck here, I've only got an NVIDIA 5200
kodex
2006.01.25, 05:26 PM
Wow those demos look really really amazing
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.