You'll have to hunt down a shader that works in ogre and does that.
I've seen that effect on League of Legends game, where characters have there body 'outlined'
Toon Shader
Re: Toon Shader
Shaders are referenced inside of a material-script. PB loads
one material-script for every entity (when using #PB_Material_None).
At this point, PB supports the whole functionality of a material-script,
that includes shaders. As i remember, there is the possibility to
set (and get?) shader-variables. But i haven't done anything
with that ... so i can't give you a working example or a hint,
how a shader needs to be implemented in a material-script
There shouldn't be much differences from PB-OGRE and
OGRE itself. So if there is an example in the OGRE-SDK,
that does this ... you can use the resource from that as a
beginning.
But if you get a toon-shader working with OGRE and PB, i
would be glade to have an example, too.
MFG PMV
one material-script for every entity (when using #PB_Material_None).
At this point, PB supports the whole functionality of a material-script,
that includes shaders. As i remember, there is the possibility to
set (and get?) shader-variables. But i haven't done anything
with that ... so i can't give you a working example or a hint,
how a shader needs to be implemented in a material-script
There shouldn't be much differences from PB-OGRE and
OGRE itself. So if there is an example in the OGRE-SDK,
that does this ... you can use the resource from that as a
beginning.
But if you get a toon-shader working with OGRE and PB, i
would be glade to have an example, too.
MFG PMV
-
Num3
- PureBasic Expert

- Posts: 2812
- Joined: Fri Apr 25, 2003 4:51 pm
- Location: Portugal, Lisbon
- Contact:
Re: Toon Shader
Is this what you are trying to do?
https://www.youtube.com/watch?v=uKamhvUIAQk
Different shaders can be applied to different meshes, but it must be done with material scripts.
Troll the Ogre forums, there are a lot of shader and material scripts there you can use
https://www.youtube.com/watch?v=uKamhvUIAQk
Different shaders can be applied to different meshes, but it must be done with material scripts.
Troll the Ogre forums, there are a lot of shader and material scripts there you can use
Re: Toon Shader
kelebrindae did something about toon shader
http://www.purebasic.fr/french/viewtopi ... 9&start=24
see also here
http://www.purebasic.fr/french/viewtopi ... 9&start=24
see also here
Please correct my english
http://purebasic.developpez.com/
http://purebasic.developpez.com/
Re: Toon Shader
Hello Everyone,
Is this the desired effect, Alexi?
http://imageshack.us/photo/my-images/689/lgf1.png/
If it is then I can post the code later on when I have some spare time.
Also, if you want multiple outline colors. The only way I know how to get it is by using separate meshes.
Using your picture for example. You would have the body as one mesh with a purple outline. Then for the tail and head hair you would have separate meshes
with a dark blue outline. Then just attach the meshes together to get the desired effect.
Let me know what you guys think.
Is this the desired effect, Alexi?
http://imageshack.us/photo/my-images/689/lgf1.png/
If it is then I can post the code later on when I have some spare time.
Also, if you want multiple outline colors. The only way I know how to get it is by using separate meshes.
Using your picture for example. You would have the body as one mesh with a purple outline. Then for the tail and head hair you would have separate meshes
with a dark blue outline. Then just attach the meshes together to get the desired effect.
Let me know what you guys think.
Re: Toon Shader
The specular highlights can be turned on or off. They work off of purebasic's light commands so it's easy to adjust.
Unfortunately, I don't think I'll be much help with the inside outlines. Sorry...
I wont be able to post it for at least a few hours yet, but I thought I would let you know that this uses The Nvidia Cg Toolkit.
Here's the link if you need it.
https://developer.nvidia.com/cg-toolkit
I'll get started on this right after I'm done with work.
Unfortunately, I don't think I'll be much help with the inside outlines. Sorry...
I wont be able to post it for at least a few hours yet, but I thought I would let you know that this uses The Nvidia Cg Toolkit.
Here's the link if you need it.
https://developer.nvidia.com/cg-toolkit
I'll get started on this right after I'm done with work.
Re: Toon Shader
Everything about the shader ended up being big. So, I created a separate topic. I didn't want to engulf this one.
I hope it helps.
http://www.purebasic.fr/english/viewtop ... 36&t=56159
I hope it helps.
http://www.purebasic.fr/english/viewtop ... 36&t=56159
Re: Toon Shader
I searched the ogre forums, but I couldn't find any info on a toon compositor. It's possible I missed something though.
You may have to write your own. That or find one that's similar and just tweak it to your liking.
You may have to write your own. That or find one that's similar and just tweak it to your liking.

