Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, bigsmack, 7th_zorro, dr_panther), 1,364 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Getting started on a toon shader #20830
12/07/03 22:51
12/07/03 22:51
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi,

Having never played with shaders or advanced DirectX stuff before, I've been browsing this forum for tips on getting started on a toon shader, and I admit I am still at a loss. I have found the following cel chading examples on the old intraweb and would like to have a crack at using them in 3dgs:

Cartoon Shading in DirectX 8.0 Using Vertex Shaders (MSDN)

GameDev Cel-Shading Introduction

Cel Shading Torus Example

Frankly, I don't know where to begin - this is in a different league to normal C-scripting. Could anyone point me in the direction of a good basic tutorial on using/creating/converting shaders? Or is that plain impossible because of the complex nature of DirectX and shaders? (Just a shader example with a breakdown-guide to what all the code does and why it is needed etc would be a nice start.) Could anyone just give me some basic tips or help on where to begin with converting the above examples for use with DirectX?

This is like being a newbie again.

Many thanks,
Keith

Last edited by Keith B [Ambit]; 12/07/03 22:53.
Re: Getting started on a toon shader [Re: Keith B [Ambit]] #20831
12/08/03 04:52
12/08/03 04:52
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i would start with the shader fundamentals (follow the link) to get a basic understanding of shaders. -> http://www.shaderx.com/direct3d.net/index.html

btw. here is another nice toonshading tutorial -> http://www.gamedev.net/reference/programming/features/cartoon/ but i guess the inker part currently wouldn't work with a6...

Re: Getting started on a toon shader [Re: Keith B [Ambit]] #20832
12/09/03 06:00
12/09/03 06:00
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
I am also doing some work on toon shaders. Check out "Biyu Biyu Rocket" in the Showcase II section to see a basic cel-vertex shader done in 3DGS. I am downloading that last example you posted... looks interesting. I actually did a conversion of the MSDN one, but its a really bad example because it does not display textures.... makes it nearly imposible to figure out how to.

Here is a shot of my MSDN toon conversion:
[image]http://axelgames.tripod.com/bumpmap.txt[/image]

Here is a shot of Alex Esslinger's toon shader for 3dgs:


Here is a shot of BBR using a modification of Alexander's shader in order to fit my game:


EDIT: I took a look at that 3rd example of toon shading that you posted. That really is a great one, plus he put in some nice doumentation of the actual shader. I am going to give the conversion a whirl, and if its something decent, I'll post it.

Good Luck!


--Eric
Re: Getting started on a toon shader [Re: Nadester] #20833
12/09/03 11:17
12/09/03 11:17
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
thats cool looks great...please share it!!




Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: Getting started on a toon shader [Re: Keith B [Ambit]] #20834
12/09/03 16:32
12/09/03 16:32
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: Getting started on a toon shader [Re: Keith B [Ambit]] #20835
12/09/03 22:52
12/09/03 22:52
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Oops! I gaveyou a link to my bump mapping instead of my MSDN shader conversion. Here it is:

[image]http://axelgames.tripod.com/cel.txt[/image]

That is also a very decent example ello. But it is in German, which may be a disadvantage for some of us. (Although the code can still be ripped from the page).

Last edited by Nadester; 12/09/03 22:56.

--Eric
Re: Getting started on a toon shader [Re: Nadester] #20836
12/11/03 11:11
12/11/03 11:11
Joined: May 2002
Posts: 845
Missouri the "Show me" State
Zerodin Offline
Developer
Zerodin  Offline
Developer

Joined: May 2002
Posts: 845
Missouri the "Show me" State
This all is sounding and more importantly looking VERY promising!


Re: Getting started on a toon shader [Re: Zerodin] #20837
12/12/03 02:59
12/12/03 02:59
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi,

Thanks for the replies and all the information, I appreciate it muchly. Although I've never touched anything as advanced as shaders before, I'm going to go through what you've given me at the weekend and have a crack at it (any other info or examples are always welcome).

Nadester - I saw your game on Showcase II and meant to post over there that it looks excellent, but I must have forgot. In fact, that was what inspired me to try my hand at a cartoon shader. Until I saw that I hadn't even realised that it was possible as I know nothing about shaders - I was intending to fake the effect by painting shadows on the textures like in Fear Effect 2 - very old fashioned! If you manage to convert the above example before me, I'd love to see the results.

Is it currently not possible to create black lines around objects using shaders? (I know you can fake it using an extra model with inverted normals, but that doubles your polycount.)

Thanks!
Keith

Re: Getting started on a toon shader [Re: Keith B [Ambit]] #20838
12/23/03 20:38
12/23/03 20:38
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Hi,

i get A6 Com tommorow, and i have a question.

how can i use the cell shader code from this page http://www.paulsprojects.net/direct3d/celshading/celshading.html in 3DGS?


Bye


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: Getting started on a toon shader [Re: Captain_Kiyaku] #20839
01/01/04 03:20
01/01/04 03:20
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Thank you Keith!

@Tsumi&Keith, As for that shader example, I am not quite sure if that renders the model's UV. If it doesn't, then that makes it a big problem because(like the MSDN example) it would most likelly be using the ot0 for the actual cartoon part. So then you would be stuck with using ot1 for the UV, which means you would have to use a pixel shader the blend ot0 and ot1 (the lighting and the texture). This is what I tried to do with teh example MSDN put out, but I was stuck because my comp is limited to vertex shaders. Btw, my example didn't use the fixed function pipeline. But anyways, Alexander Esslinger managed to make the shader w/o pixel shaders, and he shared it with me. His uses a 1D image for the lighting transition. This allows you to get any type of lighting effect you want, including a better realism. All you have to do is edit the image, and it can be colored as well. Not only does his work with the sunlight, but it also was scripted to have an additional dynamic light that can be set up. You should ask him about it!


--Eric

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1