FAQ  •  Register  •  Login

Cel shading

Moderator: Inside3D Admins

<<

SimplySerenity

Posts: 23

Joined: Sun Apr 15, 2012 12:03 am

Post Sun Apr 15, 2012 12:05 am

Cel shading

So I've finally made my account after lurking here for quite sometime. This may be a dumb question but how can I add cell shading to darkplaces? ^.^
<<

qbism

User avatar

Posts: 790

Joined: Thu Nov 04, 2004 5:51 am

Post Sun Apr 15, 2012 12:09 am

Re: Cel shading

Welcome! I've seen some cel-like shading in Nexuiz and Xonotic, which are based on DP.
<<

SimplySerenity

Posts: 23

Joined: Sun Apr 15, 2012 12:03 am

Post Sun Apr 15, 2012 12:19 am

Re: Cel shading

Thank you. ^.^ I asked someone who had cell shading in one of their projects how they added it, and they said that it became a feature in one of the newer builds of DP?
<<

leileilol

User avatar

Posts: 2400

Joined: Fri Oct 15, 2004 3:23 am

Post Sun Apr 15, 2012 12:28 am

Re: Cel shading

You could simulate celshading in realtime lighting by messing with lighting exponents.
<<

SimplySerenity

Posts: 23

Joined: Sun Apr 15, 2012 12:03 am

Post Sun Apr 15, 2012 1:42 am

Re: Cel shading

Are there any tutorials on that? :P
<<

SimplySerenity

Posts: 23

Joined: Sun Apr 15, 2012 12:03 am

Post Fri Apr 20, 2012 4:52 am

Re: Cel shading

Bumping as I really wish I knew how to do this. :3
<<

r00k

Posts: 908

Joined: Sat Nov 13, 2004 10:39 pm

Post Fri Apr 20, 2012 7:55 am

Re: Cel shading

google glsl/hlsl celshading it will giv eyou at least the math
<<

toneddu2000

Posts: 320

Joined: Tue Feb 24, 2009 4:39 pm

Location: Italy

Post Fri Apr 20, 2012 12:04 pm

Re: Cel shading

Hey SimplySerenity! Cel shading in xonotic has been made, IIRC, using glsl like this video shows, but SteelStorm 1 used a very simple ink shader. For what I remember you should insert in NetRadiant in world spawn a key "ink" and then apply to an object the ink shader.

When I come back home tonight I'll post here the complete procedure.

motorsep said that in SteelStorm 2 used direct celshading in DarkPlaces engine but I admit I didn't understand how he achieved that result.
Here the demonstration (look at the motorsep reply at the first comment from above).

cheers
<<

toneddu2000

Posts: 320

Joined: Tue Feb 24, 2009 4:39 pm

Location: Italy

Post Sat Apr 21, 2012 9:03 am

Re: Cel shading

ok I found it.
from Steel Storm shader
  Code:
// ink shader for maps
// In folder scripts:
// to use, add "cel" to shaderlist.txt
//IN gtkRadiant or NetRadiant:
// add a "_celshader" key to worldspawn entity with a value of "cel/ink"


create a shader named cel in folder scripts

PS: keep in mind I don't know if Kot-in-action has some copyright on it, so, before use it in your game, first contact them!
  Code:
textures/cel/ink
{
   qer_editorimage textures/colors/black.tga
   
   q3map_notjunc
   q3map_bounce 0.0
   q3map_shadeangle 120
   q3map_texturesize 1 1
   q3map_invert
   q3map_offset -5.0
   
   surfaceparm nolightmap
   surfaceparm trans
   surfaceparm nonsolid
   surfaceparm nomarks
   surfaceparm noimpact
   
   dpnoshadow
   
   {
      map textures/colors/black.tga
      rgbGen identity
   }
}


<<

leileilol

User avatar

Posts: 2400

Joined: Fri Oct 15, 2004 3:23 am

Post Sun Apr 22, 2012 12:03 am

Re: Cel shading

a q3map2 hack to make outlines on the brushes is outlines, not shading.
<<

toneddu2000

Posts: 320

Joined: Tue Feb 24, 2009 4:39 pm

Location: Italy

Post Sun Apr 22, 2012 9:16 am

Re: Cel shading

yeah, you're right, I was inaccurate. I still wonder if DP has cel shading embedded in the engine, now. Gonna experiment
<<

toneddu2000

Posts: 320

Joined: Tue Feb 24, 2009 4:39 pm

Location: Italy

Post Sun Apr 22, 2012 5:12 pm

Re: Cel shading

ok, to enable REAL cel shading in dp
  Code:
r_celshading 1


  Code:
r_celoutlines 1


  Code:
r_shadow_deferred 1


It doensn't seem to "splotch" texture image, but I'll dig it up
<<

SimplySerenity

Posts: 23

Joined: Sun Apr 15, 2012 12:03 am

Post Mon Apr 23, 2012 7:55 pm

Re: Cel shading

wow thanks for all the help toneddu! :D
<<

toneddu2000

Posts: 320

Joined: Tue Feb 24, 2009 4:39 pm

Location: Italy

Post Mon Apr 23, 2012 9:16 pm

Re: Cel shading

no problem, I learned something new too! :)
<<

Ace12GA

Posts: 54

Joined: Sat Jan 28, 2012 12:08 am

Post Tue Apr 24, 2012 12:30 am

Re: Cel shading

What version of DP does this work with?

EDIT: Never mind, downloaded the latest autobuild, and its there. Wow, does that deferred shadow stuff ever kill my frame rates.
Next

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft