Cel shader scene lighting

Posted By: JetpackMonkey

Cel shader scene lighting - 07/20/06 09:26

Hi,

I'm playing aroung with cel shaders in my project, but one thing I'm unsure of is how to light a cel shaded scene-- is lighting even necessary? I've been sniffing around but really only been able to find the cel/toon shader on the wiki, with technical information on cel shading, but not a lot of much use for the art side of it.

Does anyone here have any tips for using the cel shader in general? like lighting, what the texture on the models should be like in complexity, tips for speedier cel shading, etc etc?

Merci,
Posted By: Captain_Kiyaku

Re: Cel shader scene lighting - 07/20/06 09:42

cell shading doesnt really use real light sources. theres sometimes only the sun, and maybe torches in caves. the torches will through a round, hard shadow, and the sun often makes a smooth super soft shadow for the environment. the characters and items have hard shadows too, and doesnt really get brighter with a lightsource. They often have 100% lighting anyway.

look at those screens:



you can see that the torch makes a hard light, but the sun doesnt:

http://www.take2.co.za/covers/ss/big/zelda_windwaker_gc_4.jpg

the objects outside even have almost no shadow sometimes.

and at night its the same, the windows doesnt produce light at all:

http://www.dreamstation.cc/reviews/gamec...d_waker_005.jpg

the textures always have the same brightnes.

thats why i prefer cellshading, its easier with lighting
Posted By: ello

Re: Cel shader scene lighting - 07/20/06 09:53

imho, the textures should be as simple as they are allowed to be. for example a leave could have one basecolor, some veins and maybe some dried out browns. thats it. skin should have one base color and if you need a tattoo or blood another color for that. wood should have some basic structure consisting of two or three colors...

for the lighting i guess best would be if it reacts to all lights possible, just because you may wish to have torches, explosions, other light effects aside the sun/moon light

btw, there are ways to create toonscenery as a postprocess
Posted By: Captain_Kiyaku

Re: Cel shader scene lighting - 07/20/06 10:04

yes the textures in cellshading are really simple. they exactly only have one base color, and the details comes with shadows and highlights on it, nothing more, nothing less.
Posted By: JetpackMonkey

Re: Cel shader scene lighting - 07/20/06 10:52

Quote:

the torches will through a round, hard shadow, and the sun often makes a smooth super soft shadow for the environment. the characters and items have hard shadows too, and doesnt really get brighter with a lightsource. They often have 100% lighting anyway




Thanks guys for your feedback. Windwaker sure does look good! Let me list off a few more questions, if you have answers I'd be very grateful.

1. So about the soft and hard light shadows from different light sources-- can I use dynamic lighting? I am using only MDL geometry (not blocks hence no A6 lightmaps)? Or am I stuck with putting blocks beneath the levels somehow?

2. I have the impression that a lot of background textures might not actually even need the cel shader applied to it, if the cartoon-look is somehow faked and hand painted the textures, e.g. if they already look cartoony enough. Any idea if this has been done in other projects, even like the wind waker? I imagine this could save time.

3. So I just keep the textures as nice solid pieces-- like the hat is just one color of brown, the shirt a solid blue, etc?

I'm mostly concerned about the difference between soft/hard lighting and how to accomplish it (.e.g will dynamic lights work, or must I find some other way?)

Thanks muchly!
Posted By: Captain_Kiyaku

Re: Cel shader scene lighting - 07/20/06 11:05

1. i think the normal cellshader from the wiki wont change the shadows with dynamic lights, it only uses the sunlight i think. but every model has its own self shadow with the toonshader, so you should use MDL Geometry to get the shadows on the objects. maybe its possible to rewrite the shader so models will be affected by dynamics light.

2. i know your graphic style and your textures. i actually think you dont need any cellshader. your style is perfect like it is, cause you drew all the details and light effects on the textures. it looks a bit like Kingdom Hearts. They dont use any light source either, they actually just bake the light onto the textures and draw the highlights and shadows.

3. your character has solid colors. with a toonshader, it will create more steps to your color, depending on the shadow steps you use (i prefer using only one shadow step). so for example your shirt is blue, and you have 2 shadow steps, your shirt has a blue, dark blue and darker blue color on it. it will look a lot more detailed than solid colors. so you dont actually need to add details onto the model / Textures when you use the shader.

but let me tell you something. i know your games graphic and i tzhink you should keep it like it is. the textures of the houses, woods, bottom, and so on is allready detailed, and the colors fits so nice. you shouldnt use a cellshader at all. just draw details and shadows onto the texture of your character, and keep the graphic look like it is. then even more people can play it, not everyone has a super good graphics card.
Posted By: JetpackMonkey

Re: Cel shader scene lighting - 07/20/06 11:24

Wow, thanks for such fast feedback, Kihaku..

Quote:

but let me tell you something. i know your games graphic and i tzhink you should keep it like it is. the textures of the houses, woods, bottom, and so on is allready detailed, and the colors fits so nice. you shouldnt use a cellshader at all. just draw details and shadows onto the texture of your character, and keep the graphic look like it is. then even more people can play it, not everyone has a super good graphics card.




Thanks for the opinion, that makes me glad to hear. Yep I've been thinking about that too-- like, do I really need to do that? In the few instances where I've tried out the shader it's looked a little overdone or kitschy-- my original logic was that it might be a good idea of a way to make it stand out, attract some novelty value since everyone loves shaders these days. Oh well at least I've got a good looking water shader in there

Though it is kind of in the same spirit as something that could be right for cel shading. But I think there is already a cartoony balance in there right now which probably doesn't need it.. So it's nice to hear a similar opinion.

I can probably take the cartoony look a little bit further in the game without using the shader anyway-- and have more control over it--plus I noticed I dropped about 10-15 fps when I use it! Yeuch!

I think I might not use cel shading after all, I've just been playing around with the idea and toonshader. It sure looks great in Wind Waker though. I've never seen Kingdom Hearts before, I just found some screenshots-- whoah Bambi and Tron together? Bizarre! But yea I see your point-- it does manage to look cartoony without cel shading, I think in a way it looks better than way.

Thanks a lot for the feedback!
Posted By: Captain_Kiyaku

Re: Cel shader scene lighting - 07/20/06 11:34

Kingdom hearts 1+2 are my favorites games and will ever be. the story, the graphic, the animation, the music, the life in it, its so impressive.

yeah your style is cartoony a lot allready. if you really want to increase it, one thing might help. you should try to bright up your textures and objects, like 100% albedo or the other thing (forgot the name, i stoped gamedesign, so i forgot xD). ahh ambient.. was it? whatever. but this might help, it looks more cartoony then too.

and yeah shaders sucks xD i dont really like shaders. i love those shaders without any puixel or vertex version, cause they run almost everwhere. but im too much in love with bloom shader, heat hazard and cell shader. i love it. but i dont really use cell shader often, dont know why. the 3dgs shaders slows down the game a lot (i think it creates a copy of each model, give it a black texture, scall it and flip the normals) but i love the shadows on it, and i always use vector style for pictures so yeah thats why i love cell shading.

but really, keep your graphic style, and try to bright it up when you want it more cartoony, that might help.
anmd use point shadows
Posted By: JetpackMonkey

Re: Cel shader scene lighting - 07/20/06 11:40

wow we are using the forum nearly in real-time


Yea I think you're right about albedo and ambient-- I've played around with that a lot and it seems to really help. Umumumum I just searched the forum for it, but I can't find anything on point shadows. Could you explain?

Bye!
Posted By: Captain_Kiyaku

Re: Cel shader scene lighting - 07/20/06 11:46

lol yeah im bored at work so i press the refresh button thousand times per minute 8D

im glad it helped a bit with the ambient and albedo.

yeah sure. point shadow is just a round, black fading sprite, that you use as shadow for your characters, like in cartoons. they only have a black spot under themself which fades out. just create a round black sprite, and place it on the bottom under your player.use it also for ovbjects like trees, pots, and so on i do it in my game too, so you dont need to use stencil shadows or whatever.
Posted By: JetpackMonkey

Re: Cel shader scene lighting - 07/20/06 14:30

AH! Cool! Yeah those look good I've also painted some shadows directly onto the terrain textures themselves, too. Okay that's much easier than what I thought it might be..

I was thinking point shadows were some kind of crazy dynamic light calculating stencil shading lightmap multipass shader thing that would make my head explode
Posted By: Captain_Kiyaku

Re: Cel shader scene lighting - 07/20/06 14:57

no its a drawn sprite 8D that simple. dont expect me to do complicates stuff, pff im lazy.
Posted By: lostclimate

Re: Cel shader scene lighting - 07/21/06 08:00

i dont know if this helps, i think you even posted on it but heres a link to my cel-shaded game, i think its starting to look ok, and all i had to do is just use the sun, stencil shadows... given tho, that mine is outdoor , i dont know if that matters.

also with those drop shadows (thats what i call the point shadows or whatever) if its going to have toon shader in the game, id have them semi transparent with hard edges tho, cuz the second you use a soft shadow, welll.... just look at the last screen on the second page of the thread i sent you, it just doesnt look right. [image]http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/673278/an/0/page/0#Post673278[/image]
Posted By: Matt_Aufderheide

Re: Cel shader scene lighting - 07/21/06 13:59

Quote:

some kind of crazy dynamic light calculating stencil shading lightmap multipass shader thing




Or maybe some kind of binormial alphamasked quadralateral per-bit megatexture
Posted By: JetpackMonkey

Re: Cel shader scene lighting - 07/21/06 15:02

Quote:

Or maybe some kind of binormial alphamasked quadralateral per-bit megatexture




*head asplodes like that guy from scanners**
Posted By: PHeMoX

Re: Cel shader scene lighting - 07/22/06 23:24

Quote:

Or maybe some kind of binormial alphamasked quadralateral per-bit megatexture




You've just made me very curious about what in the world that would look like, so do me a favour and add that über cool super 1337-feature to the 'to-do' list for Sphere 2.0 please will ya! j/k

Cheers
Posted By: lyingmime

Re: Cel shader scene lighting - 08/02/06 07:21

ello or others, could you add more info about this statement?

"btw, there are ways to create toonscenery as a postprocess"

I can't seem to find helpful info about how to do postprocess effects.

thanks!
Posted By: PHeMoX

Re: Cel shader scene lighting - 08/04/06 15:40

Quote:

ello or others, could you add more info about this statement?

"btw, there are ways to create toonscenery as a postprocess"

I can't seem to find helpful info about how to do postprocess effects.

thanks!




Yes, it's possible. But you'd need pro's render-to-texture feature for that, unless a more or less predefined kind of post-processing effect like sphere's bloom is what you are looking for, then you could go with Matt Aufderheide's Sphere engine...

In case you've got the pro version (A6.31 pro or higher), go visit ello's site, or search for Oliver2s's refraction shader, that should get you started ...

Cheers
Posted By: Tor

Re: Cel shader scene lighting - 06/11/07 13:00

Sorry to bring up such an old thread. But I have some similar quips about Toon Shading in general.

I agree with most of what has been said above. However, we have a very strong night scene in a town that's shadowed in tree's. And I really wanted the effect of the main character passing the lanterns on the road...

However, I don't think 8 dynamic lights would be enough, so I'd have to do some sort of static branch with pixel shader 2.0 or such. Think this is a good idea?

Also, there's no BSP geometry in the scene, it's a height map and meshes added in. Thoughts would be appreciated!
© 2024 lite-C Forums