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 / first step with lightmapping

Author
Message
pamercomov
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 13th Jan 2015 07:48
hello everyone.
as the title says .... what are the steps to make my own lightmap?

see ..... I have a floor at the scene and two cubes. all are part of the scenario ie will not move.
I tried to follow the footsteps of the help files but I have not succeeded.

simply would need something like:

define the static universe. (which means exactly ??)
places and positions the objects
make them static (so ??)
adds light map lights ......

just so serious ??
that then? because it does not work ....

and once you have created the map ..... how do I use the object?

thank you very much
PD1: with basic commands darkbasic pro or darklight which also what I have

using AppGameKit V2 tier 1
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Jan 2015 10:24 Edited at: 13th Jan 2015 10:25
What a funny morning, posting links to Evolved twice...

http://www.evolved-software.com/mapscape/mapscape

Have a look around to find a Lighting Shader...

http://www.evolved-software.com/shaders/shadowing

Dark Lights has help documents...

Find them in:
...\Projects\Dark Lights\Documentation\

pamercomov
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 15th Jan 2015 19:33
thx mr valentine.
I looked at the page you're saying and I tested the mapscape and looks very complete and useful.
but does not solve my doubt. what I need is how to do it step by step to create a lightmap from 0.
I do not want the commands, if not a little logic that continues to understand the operation.
thx

using AppGameKit V2 tier 1
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 16th Jan 2015 03:33 Edited at: 17th Jan 2015 01:44
In the attachment are two projects. The first builds a static objects and adds lightmaps then saves the static universe. The second project load a saves static universe. Both with movement and collision checking.

Quote: "define the static universe. (which means exactly ??)"


Set Static Universe x, y, x; x, y and z or the width height and depth respectfully and should be divisible by 100 - 3D units. Set Static Universe 4000, 2000, 4000 will set the static universe to be 4000 units wide by 2000 units high by 4000 units deep which is how FPS Creator set the universe.

Quote: "places and positions the objects
make them static (so ??)
"


Now, say we set up our universe as FPS Creator does. What this means is our universe is 4000 unit wide by 2000 units high by 4000 units deep in the positive x, y and negative in the z dimensions. We must place our object within this box we created for the objects to be visible in our static universe. We can give the objects a texture, position, rotation and even a effect. Then we add it to the static object with -

Make Static Object Object Number, Collision, Arbitrary Value, Cast Shadow, Portal Blocker;

Next we call Build Static Portals.

Quote: "adds light map lights ......"


Now we can either; Add Static Objects To Light Map Pool or start adding lights with - Add Light Map Light, the order does not matter. Once all the light are set just call - Create Light Maps. You need to create the directory for the light maps as the - Create Light Maps function will not do this for you.

Project 1 will create a static universe with light mapping and it will save the static universe so it can be loaded into project 2. Now here is the problem. Project 1 will crash on exit in DarkBasic Professional. However, this is not an issue with Dark GDK. I mention that, as I’m currently working on a level editor using the GameFX functions in Dark GDK.

I have DarkLights from the DBPro Extra's download for modding the FPS Creator source. So I really haven’t used it much. Sorry, can’t be much help there.


Edit: Please stay tuned. I am currently experiencing technical difficulties uploading the files.

Edit #2: Since I uploaded this code with out the light mapping a week or two ago on another thread, you can download from here and replace the code.

GameFX1:


GameFX2:


Well if this doesn't freak'n work this time, I give up!

Edit #3: Looks like I can't even get a link to work tonight. So, here is the url to the thread the download is at; http://forum.thegamecreators.com/?m=forum_view&t=212972&b=1

Edit #4: Download fixed. Had a virus.
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 19th Jan 2015 03:50 Edited at: 19th Jan 2015 03:52
To use dark lights replace the GameFX1 code with this snippet. No more crash on exit. Remember, since I’m using Dark Lights from the DarkBasic Professional Extra’s download, I’m working without the assistance of the help file.

pamercomov
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 22nd Jan 2015 19:36
thx wickedX. its works fine for me

using AppGameKit V2 tier 1
pamercomov
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 22nd Jan 2015 19:51
hi.
testing your code, i recivied a log, about quality reduction...
the txt say:


Listed below are object limbs that were too large to fit onto a texture and had their quality reduced
To allow the original quality to be used try splitting your object up into limbs and splitting large polygons into several smaller ones

Object Number: 1, Limb Number: 5, New Quality: 0.118519
Object Number: 1, Limb Number: 4, New Quality: 0.079012
Object Number: 1, Limb Number: 3, New Quality: 0.079012
Object Number: 1, Limb Number: 2, New Quality: 0.079012
Object Number: 1, Limb Number: 1, New Quality: 0.079012

using AppGameKit V2 tier 1
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 23rd Jan 2015 01:19
The Dark Lights code generates the same Quality Change text file for me as well. I don’t think its anything to be concerned about. The objects should only have one limb, they’re only boxes. I don’t fully know how Dark Lights works under the hood but, I think the quality change has to do with the lightmap quality.

Login to post a reply

Server time is: 2026-07-05 03:50:22
Your offset time is: 2026-07-05 03:50:22