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 / How can I get the static loader to load textures automatically

Author
Message
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Feb 2012 06:08 Edited at: 8th Feb 2012 06:13
Place the textures assigned to your model in the same folder, and DBPRO will load the textures automatically when using the usual Load Object command (If using 3D World Studio, you will have to export the lightmap if you use the DBO format). All fine and dandy.

The problem is the Save Static Objects & Load Static Objects commands. In the documentation it says:

Quote: "This save operation will also note any textures and lightmaps that have been loaded or generated for the universe.
"


I do not use GameFX library lightmaps (I use Dark Lights & Evolved's stuff), but at least the textures should be considered when saving the level.

I can't imagine this command being made to not write the texture information, since part of the point of the static system is to allow you to save and load game levels (We can already save objects individually, so why save them all automatically and save their texture paths aswell...)

I tried texturing the object manually (using TEXTURE OBJECT) before calling Make Static Object, but no joy. When you load it back it is all white or black dependig on whether I supply lightmapping.

Here is the map loader code:


And here is the map saver code:


I have attached the media.

If no body knows this stuff well enough to crack this, I will pass this on to Lee through the 'annoying bugs thread'; although I feel it is not a bug but rather that I have missed out on some key undocumented information, since this command set was used to create FPSC.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Feb 2012 06:36
The answer to the problem is to use SET DIR when loading the mesh. Unlike with the Load Object command, the static loader requires you to specify where the textures are in this manner.

Not too bad after all, plus you could alter the directory to load different texture themes for the same level; so that's somewhat useful.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Feb 2012 22:28
this thread

But whats the static object loader command? is it native?

I never knew it existed...

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 12th Feb 2012 22:39
These commands have been undocumented for the early parts of the DBPRO development; but they are now in the GameFX part of the main index of the help file.

You make a static object or limb using: Make Static Object | Make Static Limb.

You finalize with Build Static Portals

You save with Save Static Objects, and you load with Load Static Objects. You need not specify the object's individual Ids when doing so.

You should call Set Static Universe Width, Height, Depth before doing so, stuff outside of the universe will be invisible.

It is called the GameFX library because it has a lightmapping command set; but this appears to be unsupported now since Dark Lights came out. There are also 3D CSG (Boolean) operations and some static ray casting, LOD and collision functions which should work faster than the usual.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Feb 2012 01:24 Edited at: 13th Feb 2012 01:24
hmm... so in essense I could ignore most of these right?

EDIT

bolded... can you spot it? I know I can...

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 13th Feb 2012 13:42
Quote: "so in essense I could ignore most of these right?"


Indeed, you can.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Feb 2012 13:51
thanks Chris

Login to post a reply

Server time is: 2026-07-10 15:52:01
Your offset time is: 2026-07-10 15:52:01