Fur Shading in OGRE

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
SFAOK
Kobold
Posts: 32
Joined: Thu May 20, 2004 9:22 pm

Fur Shading in OGRE

Post by SFAOK »

Has anyone managed to implement a fur shader in OGRE? Or do you know of where I could get hold of a realtime cg fur shader example?

The kind of effect I'm looking for is similar to what Lionhead have used for their creatures in Black and White 2, see the screenshot below:

Image

I imagine that effect was accomplished via shaders, although I might be mistaken as my knowledge of shaders is pretty basic at the moment! :)

Any help/information would be great!
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I don't know if anyone here did this yet.

A while ago I looked into it, it seems most techniques for fur shading use transparant shells around the object with the fur texture, but it results in kind of blurry fur. There might be better ways, I'd say try searching on google :)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I recently saw a fur shader *somewhere* - so that is correct.
Who googles finds.. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

The directx 9 SDX already came with an example fur shader, AFAIK
Image
User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

I might be wrong but I doubt Lionhead would use standard "out-of-the-box" shaders, let alone release them to the public.

Try downloading ATI's Rendermonkey or Nvidia's CG Toolkit, I believe there are fur-shaders included...
User avatar
TobascoSpam
Halfling
Posts: 86
Joined: Thu Nov 18, 2004 2:30 am
Location: Texas

Post by TobascoSpam »

Yeah Render Monkey has one in it but its not so good, unless there has been an update and they have a better one than what I last saw. Best place to go is to ATI's developer page: http://www.ati.com/developer/index.html. The Tomohide Dynamic Fur Demo is the best I've seen, very cool demo: http://www.ati.com/developer/indexsc.html. I think it has all the source included in the demo too.
SFAOK
Kobold
Posts: 32
Joined: Thu May 20, 2004 9:22 pm

Post by SFAOK »

TobascoSpam wrote:The Tomohide Dynamic Fur Demo is the best I've seen, very cool demo: http://www.ati.com/developer/indexsc.html. I think it has all the source included in the demo too.
Wow. That indeed is a fantastic demo.

I had a look at the source and my brain exploded :(
RoundSparrow
Greenskin
Posts: 145
Joined: Wed Jan 19, 2005 4:36 am
Location: Arica, Chile

Post by RoundSparrow »

Anyone care to detail a little mor what a fur shader is?

I might be interested in funding development of an ogre one, hint hint :)
Looking to hire people working out of their home to do C++ Ogre programming. Blender artists also wanted. Looking for long-term relationships. PM on forums or contact via AIM or email Art@Arica3D.com
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

Ya, but IMHO that's the sort of fur that can cover a donut and be used in a tech demo, but not in realtime. That's why we haven't seen it being used in a game.

I don't doubt that Lionhead used the fin approach to fur, where fins are placed all over the body.

Here's a new fur shader posted April 1st, but no source code or demo yet. It's a variation of the parallax map fragment shader.

http://graphics.cs.brown.edu/games/Stee ... index.html
SFAOK
Kobold
Posts: 32
Joined: Thu May 20, 2004 9:22 pm

Post by SFAOK »

Falagard wrote:Ya, but IMHO that's the sort of fur that can cover a donut and be used in a tech demo, but not in realtime. That's why we haven't seen it being used in a game.
I have actually implemented fur in my code using the shells technique. But it was brute force (non shader) so whilst the effect was pretty decent, it hammered the fill rate. And yeah, I guess this technique would suffer when used with more complex model and simulation.
I don't doubt that Lionhead used the fin approach to fur, where fins are placed all over the body.
Is this the same technique as what is usually done with grass? I.e loads of quads on an object with semi-transparent textures?
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

The fin approach doesn't sound that bad. Its typical cheating with graphical techniques used in computer games (IE, let the artist do the work, not the GPU :) You could even have the fins affected by wind with a simple vertex shader, a bit like the Grass demo.
User avatar
TobascoSpam
Halfling
Posts: 86
Joined: Thu Nov 18, 2004 2:30 am
Location: Texas

Post by TobascoSpam »

Well if you lower the number of layers (i guess fins?) depending on distance and maybe even switched to a texture at some distance I think it could be managed. I mean you wouldn't want to cover everything in sight with it. Lionhead for example is only covering thier creatures with it. Most movies that are CG use this technique for grass as well (from what i know just from extra features on DVDs :D ). I'm not sure that it would be wise to use it for grass though in a game, I suppose that so long as there aren't a whole lot of polys with it on screen at any one time it would be fine and if you reduced detail in the distance again. I do know that in the featured projects Antilia appears to use this: http://www.antilia-game.com/index.php?page=media. I was also wondering has anyone thought about using this technique of fins on trees for all the leaves?
User avatar
TobascoSpam
Halfling
Posts: 86
Joined: Thu Nov 18, 2004 2:30 am
Location: Texas

Post by TobascoSpam »

I found another Fur demo with code that I forgot about on NeHe: http://nehe.gamedev.net/data/downloads/ ... p?letter=F. It's at the bottom of the page. It runs faster than the Tomohide fur demo, probably because it does not simulate physics acting on the fur. Anyway just some more example code for ya all.
Post Reply