Post news Report RSS Character rim lighting

When I loaded Aubrey's new rabbit model, it was clear that we needed a new rendering method in order to do it justice. Our basic object shader works best for hard surfaces like wood, leather and stone, not fuzzy ones like fur and cloth.

Posted by on

When I loaded Aubrey's new rabbit model, it was clear that we needed a new rendering method in order to do it justice. Our basic object shader works best for hard surfaces like wood, leather and stone, not fuzzy ones like fur and cloth. This problem was most obvious when the model was lit from behind:

Rabbit

It suffers from the 'plaster effect' -- it doesn't have the subtle shading effects that characterize the materials, so the surfaces that should look soft instead look harsh and rigid. In real life, fur and cloth always have tiny stray fibers that catch the light when lit from behind, giving a 'halo' effect. We can start to approximate this halo by lighting up surfaces that are perpendicular to our viewing direction, like this:

Rabbit

This is often used as a 'selection' effect in 3D games because it's an easy way to highlight edges. However, it needed to be toned down before we could use it as a realistic effect. First, I decided to modulate the brightness of the highlight by a softer version of the standard lighting equation, so that surfaces facing directly away from the light remain in shadow.

Rabbit

Finally, I used one of our unused texture channels (the alpha channel of the normal map) to specify which parts of the model are affected by rim lighting. This gives us detailed control of how fuzzy each surface should look. Here's the final shader applied to the rabbit model:

Rabbit

While I don't have time to make a detailed fur shader yet, I thought this effect went a long way towards making the rabbit's fur and clothes read as 'soft' materials. Does this effect work for you? Can you think of any ways that I could improve it? (permalink)


Track us on ModDB (visit our page)

Please join us here too:
Facebook icon ModDB icon Steam icon Twitter icon YouTube icon

Post comment Comments
Larceny196
Larceny196 - - 19 comments

Looks good to me really. A bit of changing of textures and a bit better lighting would be better. But for the most part good job.

Reply Good karma Bad karma+1 vote
Elementalist
Elementalist - - 732 comments

I'm kinda curious... You say you used the unused texture channel, the alpha channel of the normal map, but to specify which areas are affected by the rim lighting.

This makes it sound like really, you can do whatever you want with a texture channel, what's the point of specifying it with a name (such as normal map alpha channel) when it doesn't have to specifically be that? Why aren't they just texture channels?

Reply Good karma Bad karma+1 vote
jeffr Author
jeffr - - 383 comments

Well, in the file format they are four chanels: RGBA. They don't have to be used for that, but it's good to keep track. ;)

Reply Good karma+1 vote
NGS616
NGS616 - - 364 comments

That is great lighting! I seen that rabbit model over on poly count that thing is amazing.

Reply Good karma Bad karma+1 vote
Nebcake
Nebcake - - 443 comments

A very smart idea you used their, great job

Reply Good karma Bad karma+1 vote
Assaultman67
Assaultman67 - - 848 comments

yea, i definitely need to work on making shaders ... mine never do the model justice

I was reading your article and looking at the pictures and was like "Yea ... ok ... ok ... where is he going with this? ... Holy crap thats good! O_O"

Reply Good karma Bad karma+1 vote
chris_sloany
chris_sloany - - 2,830 comments

awesome job!!

Reply Good karma Bad karma+1 vote
awesomepossum
awesomepossum - - 997 comments

It tis awful purdy! nice work

Reply Good karma Bad karma+1 vote
PringleX
PringleX - - 55 comments

(buried)

Phong shading.

Reply Good karma Bad karma-6 votes
vfn4i83
vfn4i83 - - 692 comments

Nice touch, the characters are going to look awesome that way.

Reply Good karma Bad karma+1 vote
Joe_Shmoe
Joe_Shmoe - - 304 comments

This is rather fascinating... This is why I love developer notes, so much to learn from others, and some developers cover even the smallest of things like this =] btw realy well done with this, easy to read and understand and probably a simple thing to miss (i know i did when i saw the first post of the model in the level, never paid that much attention to the lighting and apearance) but awsum info, thanx for sharing

Reply Good karma Bad karma+3 votes
hushpuppy
hushpuppy - - 761 comments

The third model looks Call of duty 4'ish, they had no idea what subelty is.

Really nice work, the last one is diffinatly perfect ammount.

Reply Good karma Bad karma+1 vote
Jam3s007
Jam3s007 - - 1,217 comments

Its the way the lighting hits the characters is in that game, i can see what you mean.

Reply Good karma Bad karma+1 vote
deathparadeNL
deathparadeNL - - 2,061 comments

looking really good nice work keep on going like this :)

Reply Good karma Bad karma+1 vote
kinesis916
kinesis916 - - 739 comments

That's awesome.

Reply Good karma Bad karma+1 vote
KEEP_IT_UP!
KEEP_IT_UP! - - 1,444 comments

love it! keep it up ;)

Reply Good karma Bad karma+1 vote
Myloman
Myloman - - 884 comments

Looking wonderful. It's great that you logically explain things in an easy to understand manner, so that we may all learn from your development. Makes each update rewarding and exciting :).

Reply Good karma Bad karma+1 vote
DOLBYdigital
DOLBYdigital - - 623 comments

Another great update that was both interesting and educational :)
Love all the time you guys are putting into not only perfecting this game but also showing your thought process and procedures. I have been saying this a lot but its really time for me to pre-order and jump into the alphas !

Keep up the great work team

Reply Good karma Bad karma+1 vote
Bird_of_Prey
Bird_of_Prey - - 1,616 comments

Really nice effect. Gives some nice depth to the character.

Reply Good karma Bad karma+1 vote
maniacmoop
maniacmoop - - 200 comments

I enjoy rabbit incest.

Reply Good karma Bad karma-3 votes
jeffr Author
jeffr - - 383 comments

Pardon?

Reply Good karma+1 vote
masterofhobbiton
masterofhobbiton - - 26 comments

The final picture is incredible!

Reply Good karma Bad karma+1 vote
Ka!
Ka! - - 74 comments

now THAT's what a rimjob should be. ;o
I kid!

Looks great, as with all the updates. o.o

Reply Good karma Bad karma+1 vote
doublethink
doublethink - - 148 comments

So many games mess this up, I'm talking major retail titles too.

Nice to see you take notice.

Reply Good karma Bad karma+1 vote
Atlasfield
Atlasfield - - 1,117 comments

Pretty interesting, I was wondered how looks in front the face of the character.

Reply Good karma Bad karma+1 vote
vp21ct
vp21ct - - 84 comments

awesome

Reply Good karma Bad karma+1 vote
dill1233
dill1233 - - 94 comments

Wow, looks great! I love the way how you guys have all of these little details that you get really in def with and explain your little tricks on those little details. I can't wait to see you mesh every one of those little details into one big product that will be so perfect in every which way. Keep it up!

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: