Game Development Community

Question regarding Toon Shaders

by David Horn · in Torque X 3D · 07/01/2009 (4:16 pm) · 2 replies

I have a question regarding shaders.

I want my new game to be cell shaded.

I got this tutorial from the following link...
http://forums.xna.com/forums/t/27849.aspx

My question is.. before I dive into the toon shading on the xna side, does torque x 3D have (or plan to have) and "easy" method of changing the shader of a model or of a level to 'toon shading?

Thanks

#1
07/06/2009 (9:30 am)
You set shaders per texture. If you want to do it per a level or model you will have to set the shader for all the textures for the level/model. You can do this in xml or in code though it is very tedious do to per level/model in xml. To set a shader to a texture you give it a material that uses your shader.


Alan
Perfect Dork Studios
#2
07/26/2009 (1:14 pm)

EDIT - this should be moved to TX2D forum, but I don't know how?


I see how you do it in xml...

http://tdn.garagegames.com/wiki/TorqueX/CustomMaterials

but how do you do it via code?
I can get the material list and individual materials in my T2DShape3D object, but they don't seem to have any "type" property?

I'm assuming you have to create a new SimpleMaterial, but how can I relate that to the materials in my T2DShape3D?