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 / Simple tutorials for lights and shadows.

Author
Message
theagg
16
Years of Service
User Offline
Joined: 11th Feb 2008
Location:
Posted: 24th Feb 2008 16:25
Are there any simple tutorials around that someone could point me to demonstrating how to set up a light and have it illuminate a scene and cast shadows in the way you would expect it to, using primitive objects to demonstrate just the basics of getting it working?

I am afraid that the 'samples' that come with gdk ( the "lights" one for example ) are really not that helpful at all and searching the forum just pulls up too many topics.

What seems easy and intuitive in rendering programs, or even in good old Povray years ago, for example, "place sphere on plane and place light above it" resulting in both shadows from the sphere and light levels falling off inversely on surfaces, resulting in an effect roughly as expected, just does not seem to be working when trying the same in GDK.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Feb 2008 03:32
Well - So far - Shadows Stink! That's my experience so far.

You can try to get a Light Map Draped Across Something - Good Luck - Looks Great in the 3d Modellers that have it - "Burnt In Textures" are something I'm waiting on Pixel Perfect - He's working on a 3DWS (3d World Studio) file loader that has lightmaps working - I believe without shaders.

Now the Shader's in DarkGDK and DBPro that are used for "Shadow Mapping" - Slow my system to a crawl - I know I don't have a rocket PC - but still.

You Will be disappointed if you base all your research on primitives though because Stock primitives like the ones you can make in code in DarkGDK are Nothing (in behavior) like loading a model and trying to do the same thing.

I Hope someone posts something cool on this topis - though - many will say - "Have you looked in the DBPro Forums and CodeBase?" because DarkGDK commands and DBPro commands are VERY much alike.

(give or a take a few missing varieties of calls - and simply a few missing ones in DarkGDK...but...)

theagg
16
Years of Service
User Offline
Joined: 11th Feb 2008
Location:
Posted: 25th Feb 2008 16:03
Yes, I browsed through using 'shadows' as a search term.

Trouble is, there were too many posts returned in the searches, along with varying topic titles that didn't really deal specifically with just the basics, such that its just a pain trying to read through every one of those posts trying to glean the required info !!

So, am still left clueless as to how to instigate shadows, especially using shaders.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 25th Feb 2008 17:03
From the header files


I would advise you to either use this command with the iUseShader parameter set to 1 or don't use it at all. Because if you don't use shaders then your FPS will drop far too much. Also, use shadows sparingly, and only on dynamic objects use lightmaps for static geometry.

Quote: "He's working on a 3DWS (3d World Studio) file loader that has lightmaps working"


You can just export the object into DBO format which contain lightmaps, plus have the advantage of faster loading times due to it being a native format for GDK/DBP.

Projects Started: 20
Projects Completed: 0
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Feb 2008 19:24
Quote: "You can just export the object into DBO format which contain lightmaps, plus have the advantage of faster loading times due to it being a native format for GDK/DBP"


Don't bother - it stinks for advanced models. Example: Make a Box. Put a texture on one face, then another texture on another face. Save/export - then load. I always get one Texture of the two.

If you follow my link on my sig - to the gallery - there is a picture of an airport....looks halfway decent considering I haven't done much (hardly any) modelling... but it simply looked better (MUCH better) in the editor. I had a lot of details saved - alot of sweet textures - cinder blacks indoors, aluminum sheet siding outside - but in DBPro/DarkGDK - The export was always dumbed down, flat, textures lost or the scaling of the textures chaged etc.

Pixel Perfect is my hero here for 3DWS. You should scope out his thread about it. His latest screen shots are amazing and its all about getting WYSIWYG from 3DWS 100%... versus the DBO "sorta close"

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 25th Feb 2008 19:32
Strange, I've never had any troubles with 3DWS exporting to DBO. Some of the texture, well most of the textures that come with 3DWS are in it's own format i.e. .stf which is not a format that is supported by GDK/DBP.

There has been bugs in the past with the DBO export but it seems to work ok, like I say I haven't come across any problems as yet. The only problem I have with it is, if you apply a different texture to two different faces on a single brush like a box, 3DWS chops the faces up and creates seperate limbs for each face (Brushes are grouped by texture).

Halo (Joshua) said it does this so that it can have different textures for different faces, but other modelling applications can do this without splitting it up!

Projects Started: 20
Projects Completed: 0
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Feb 2008 19:34 Edited at: 25th Feb 2008 19:35
Hmmm.... Well - I trust you so... thinking. I still think you should see pixel perfect's importer.

How well does the DBO thing do with shadows? I wasn't able to get that to work either

[edit]maybe I used direct.x format [/edit]

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 25th Feb 2008 19:41
Quote: "thinking. I still think you should see pixel perfect's importer"


Yeah, definitely if it loads the model up ok then I would prefer to use the native format of the editor, because like you say it will be a WYSIWYG editor so to speak.


Quote: "How well does the DBO thing do with shadows?"


Dunno I have never got that far in my projects to add niceties like shadows. But I've played with existing examples 'n' stuff, but I can't remember what format the files were.


Anyhoo, just been looking at your game, it's looking pretty damn good mate, is there going to be a demo available????

Projects Started: 20
Projects Completed: 0
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Feb 2008 20:01
Quote: "Anyhoo, just been looking at your game, it's looking pretty damn good mate, is there going to be a demo available????
"
very Kind words - Thank You! (I'm trying really hard)

Demo? Yes, but I don't suspect anything will be available for a long time yet. I WILL SAY that the code base I'm building Now is here to stay... So I AM progressing toward a demo - but I still need a decent Terrain and level creation system in place first that allows me to set physics, terrain mulding (USGS loading also ), object placement both manual and procedural as well as tools to make all that jive with the frutrum system I've written now and that is something that just isn't automatically set up - and now that I know more about squeezing out performance - I'm not sure I want an AUTOMATIC culling system - I think a flexible one - that can bit "taught" the best way to run each specific level is the best.

I have wondered if I should release my DBPro "Practice" run - source code and all - its far from finished - and its not even what I'm working on - but its kinda neat to jump in a tank and drive a bit and shoot then jump in heli... fly and shoot the machine gun - ... Kinda fun to try to shoot the robot heli's down with the tank machine gun too.

the men are unarmed cannon fodder! LOL.

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 25th Feb 2008 20:09
Quote: "I have wondered if I should release my DBPro "Practice" run"


I'm sure many people would appreciate it on the forums, plus it does sound like fun.


Quote: "the men are unarmed cannon fodder!"


What would be even better, if you could shoot them in the back while they are sleeping MUHAHAHAHA.

Fornit some Fornus!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Feb 2008 20:24
Hmmm.... Ok - you convinced me - I'll release it... Let me pack it up tonight - and maybe find a free hosting service so everyone doesn't burn out my router LOL... Just remember its NOT a completed GAME! There' sno object to it - just some vehicles and scenery... kinda.

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 25th Feb 2008 20:29
Excellent, looking forward to it.

Fornit some Fornus!
theagg
16
Years of Service
User Offline
Joined: 11th Feb 2008
Location:
Posted: 26th Feb 2008 13:04
So this is sounding very much like getting working dynamic shadows are still a work in progress as far as GDK is concerned ...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Feb 2008 13:10
Monotonic - I Release it - ITs mentioned in all the main code forums: DbClassic, DBPro, DarkGDK - the actual demo resides in the WIP forums. You'll find the thread I'm sure

Login to post a reply

Server time is: 2024-11-20 03:36:49
Your offset time is: 2024-11-20 03:36:49