so i'm looking at the cel shading demo, and i'm wondering if there's an easier way to produce cel shading that doesn't involve CG scripts. But i can't seem to export a cell shaded model from, say blender, and make it match in OGRE. anything i'm missing?
r.d.
is there an easy way to get cel shading
-
- Gnoblar
- Posts: 3
- Joined: Wed Dec 31, 2008 5:19 pm
Re: is there an easy way to get cel shading
No the cel shading effect is done with a shader, CG is preferable because it translates down to HSLS & GLSL, but if you have it in Blender you might be able to export or copy the GLSL shader from Blender.
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
Re: is there an easy way to get cel shading
I once managed to do it by just using a spheric (though I recommend cubic) reflection map. It actually works, but I suggest it just as a fallback when shaders aren't supported. I find the shaders much better (higher customisation level and better-looking results)
-
- Gnoblar
- Posts: 5
- Joined: Mon Apr 06, 2009 4:45 am
Re: is there an easy way to get cel shading
hmm, i looked into exporting the glsl shader from blender but that turned out to be a dead end.
what about the the Cg script being used in the cel-shading demo, can we just re-use that onto other meshes and materials? sorry if it seems like a ridiculous question, i still haven't gotten into writing cg scripts...
what about the the Cg script being used in the cel-shading demo, can we just re-use that onto other meshes and materials? sorry if it seems like a ridiculous question, i still haven't gotten into writing cg scripts...
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
Re: is there an easy way to get cel shading
Yes, it's possible, of course But note it doesn't use the model's texture. You should add another sampler to the shader (and another texture unit with the real object texture), then take the texture colour in the shader, and then multiply the lighting and the texture colour to tint it.
Anyways, to add the shader to the material, just add the references (fragment_program_ref and so on) like in the example material.
Anyways, to add the shader to the material, just add the references (fragment_program_ref and so on) like in the example material.