Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / The use for 'set cartoon shading on'

Author
Message
Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 24th Sep 2010 23:18
Can I use SET CARTOON SHADING ON with a textured object?

I am using .x -format models. I want the models to have black outlines.

How do I manipulate the lighting for the models? Does the shade image overwrite the texture? Any other ways to have black outlines.

Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 27th Sep 2010 01:51
Still struggling with this...
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 28th Sep 2010 00:31
Honstly I don't believe that command works as one would expect. I would look into using another shader if you want to do cartoon shading. Of course, someone might know the key to unlocking the potential of that command, you never know


Guns, cinematics, stealth, items and more!
aparri
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location:
Posted: 2nd Oct 2010 14:41
I can't remember where I found this toon shader (see attached), but I prefer it to DBP's cartoon shader... only works with a single light, but retains original .x textures.

Quote: "
REM Edge image
toon = 1 : LOAD IMAGE "shade.bmp", toon
REM Toon shader
fx = 1 : LOAD EFFECT "toon2.fx", fx, 1
REM Vector for lighting
vec = make vector4( 1 )

REM Apply shader to each limb of your object
perform checklist for object limbs myObject
for limb = 1 to checklist quantity()
if LIMB EXIST( myObject, limb )
SET LIMB EFFECT myObject, limb, fx
endif
next limb

do
REM Update light for shader
position light 1, camera position x(), camera position y(), camera position z()
set vector4 1, camera position x(), camera position y() + cam.distance, camera position z(), 0
set effect constant vector fx, "LightPosition", 1

sync
loop
"
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Oct 2010 01:37
I would suggest Evolved's cartoon shader if you are looking for a 'cell shaded' 'outlined' 3D look. I used it on my game Odd Blox here:
http://www.youtube.com/watch?v=ISnW_S1zW_U

Login to post a reply

Server time is: 2026-07-22 03:51:31
Your offset time is: 2026-07-22 03:51:31