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.

Dark GDK / why dbSetShadowShadingOn make my fps low.

Author
Message
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 14th Aug 2008 13:45
dbCloneObject (ObId , nId );
dbTextureObject ( ObId, 2000 );
dbSetShadowShadingOn ( ObId ) ;

i want to place showdow of hero on floor.
using this command is good.
but my game turn slow down very very much.. fps = 10!

when i not use dbSetShadowShadingOn it fast but no shadow
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 14th Aug 2008 16:09
What do you expect? Stencil shadows aren't a 'free' effect. If your scene is complex, or your shadow caster is then it might be faster to use 'shadow mapping' which you can search the forums for.

Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 14th Aug 2008 19:29


1. is the shadow ineed to put on floor so i use dbSetShadowShadingOn ( heroID ) ;
2. is fps is so low
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 14th Aug 2008 19:30


http://img47.imageshack.us/img47/3691/86687167pa3.jpg

sorry image is not show up
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 17th Aug 2008 07:31
how many way to make shadow like the picture ..
i use dbSetShadowShadingOn and it very slow

i search for "shadow mapping" but i think it use to maping texture
not a hero's shadow on floor.
Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 17th Aug 2008 14:02
the problem with dbSetShadowShadingOn is it uses your cpu to work it out, and thus low frame rates, in dark basic proffesional you can set it up so it uses your gpu, which (if your graphics card can take it) means you get no loss of frame rate, but i cant seem to do this in GDK, but ill have a look around and see.

in DBPro The Command Is...
SET SHADOW SHADING ON Object Number, Mesh Number, Shadow Range, Use Shader

so im wondering if theres a hidden command for GDK.

Yours Tv.

david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 17th Aug 2008 16:44
shadow shading is a fps eater. you need to optimize your code to make up for the lost cycles. each time you add something to your game your going to loose some fps. you really should be more worried about frame time and not fps time.
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 17th Aug 2008 21:45
my come is fast ..
my game's fps is max.. speed is very fast if i dont use dbSetShadowShadingOn..
but when insert the command dbSetShadowShadingOn fps turn to 3...
so bad..
i dont know how to use that command in the right way.

i've ever been use dbLoopObject in the loop so my game slow..

there is one way to make hero's shadow on floor like that?
General Reed
18
Years of Service
User Offline
Joined: 24th Feb 2006
Location:
Posted: 23rd Sep 2008 18:38
DBpro shadows are stupidly slow. U have to use shaders to get standard results.

CPU: AMD X2 6000+ 3.0ghz GFX: NVIDIA BFG Geforce 8800GTS 640MB OC-550mhz core RAM: 2048mb

dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Sep 2008 04:04
DBPro and GDK's stencil shadows DO use shaders, and they aren't exactly any/much slower than other implementations of them.

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 24th Sep 2008 13:00
Do not cast the shadow on the main hero mesh.
Instead of that, performance can be increased if two objects are used: Create a low poly count hero mesh, make it transparent, and cast the shadow on this low poly mesh. Then position it at the viewable character position with its pose.
Pros:Increased performance.
Cons:The resulting shadow has less detail

Login to post a reply

Server time is: 2024-09-30 07:11:33
Your offset time is: 2024-09-30 07:11:33