Help: Large SkyBox image file crashes 3DGS

Posted By: Taskmaster065

Help: Large SkyBox image file crashes 3DGS - 12/23/14 03:34

Hi

I have been evaluating 3DGS for developing a project that will require High Definition SkyBox.

However when I try to run my script that loads a High Definition SkyBox (eg 2048x2048 pixel face) 3DGS crashes (ie get "send report to microsoft window" and SED

closes down).

Below I have included a small script that replicates the problem.

I am using the ent_createlayer() function to creat the Skybox. In the code below I have several examples (uncomment the one u want to test) and have included notes

above each line I show which ones worked and the detail of the skybox image file that was being loaded.

(Note: that I have not included any image file here as they are large but you can easily create a simple/empty image in Paint to do a test. Just make sure it has the correct pixel dimensions and +6 on the end of file name).

==========Source Code beg
Click to reveal..

////////////////////////////////////////////////////////////////////
//#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
ENTITY* my_sky;
//================MAIN
function main()
{
video_mode = 8; // lite-C: start resolution: 6=640x480,8=1024x768
video_screen = 2; // lite-C: start settings for Fullscreen =1; window = 2.

//next line works works: png file is 6144x1024 pixels (filesize = 12,855,770 bytes)
// my_sky = ent_createlayer("C:\\SkyBoxTest\\SkyBoxes\\Beach01_1024+6.png", SKY| CUBE | SHOW , 2);

//works: bmp file is 6144x1024 pixels (filesize = 18,874,422 bytes)
// my_sky = ent_createlayer("C:\\SkyBoxTest\\SkyBoxes\\Beach01_1024+6.bmp", SKY| CUBE | SHOW , 2);

//next line works works: bmp file is 6144x1024 pixels (filesize = 18,874,422 bytes)
// my_sky = ent_createlayer("C:\\SkyBoxTest\\SkyBoxes\\Beach01_2048a+6.png", SKY| CUBE | SHOW , 2);

//if use next line then has error: file will load but images streched and in wrong places: png file is 12288x2048 pixels (filesize = 32,675,366 bytes)
// my_sky = ent_createlayer("C:\\SkyBoxTest\\SkyBoxes\\Beach01_2048b+6.png", SKY| CUBE | SHOW , 2);

//if use next line then has error: SED crashes: png file is 12288x2048 pixels (filesize = 46,391,940 bytes)
my_sky = ent_createlayer("C:\\SkyBoxTest\\SkyBoxes\\Eiffel01_2048a+6.png", SKY| CUBE | SHOW , 2);

my_sky.flags2 |= VISIBLE;

level_load ("");
wait (1);
wait (1);

//=====================================================================Main Loop
while (1)
{
if (key_w) camera.tilt += 2 * time_step;
if (key_s) camera.tilt -= 2 * time_step;
if (key_a) camera.pan += 2 * time_step;
if (key_d) camera.pan -= 2 * time_step;
wait (1);
}
}
//==============EOF

==========Source Code end


Below is the contents of the acklog.txt:


=================acklog.txt beg
Click to reveal..

Log of A8 Engine 8.45.4 run at Tue Dec 23 12:49:25 2014
Greg on Windows NT/2000/XP version 5.1 Build 2600
Options Test_SkyBox_Bug.c -diag -te -debug
App: C:\Program Files\GStudio8\SED.exe in C:\SkyBoxTest\

MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened(c) Conitec - www.3dgamestudio.com
A8 Engine - Free Edition V8.45.4 - Jan 16 2014
Development version
Registered to: Free Version

Mouse found
SoundMAX HD Audio O opened
ATI Radeon HD 5800 Series pure T&L device 1ff9 detected
D3D device ATI Radeon HD 5800 Series 1ff9 selected.
ackphysX.dll opened
Compiling TEST_SKYBOX_BUG.C - [Esc] to abort........... 0.204 sec
Running TEST_SKYBOX_BUG.C.
2 objects
Main started at 1.318 in debug mode
PATH C:\SkyBoxTest\SkyBoxes\
Nexus overflow at 368784
D3D_Init Window: 1024x600 -> Window: 1x1024x600x32
Video memory found: 1130 MB
LevelInit at 1.520 0 lmaps 0 textures...ok
LevelReady at 1.523
def_startup started
Main loop at 1.525....
1st frame with 1130 MB.

=================acklog.txt end

one of the above lines says:
"Nexus overflow at 368784"

Is this the indicative of a problem that would lead to 3DGS/SED crashing.


The system system I am testing it on is:
Windows XP SP3
CPU: Intel Core2 6600 @2.4GHz
RAM: 4GB
Video adapter: ATI Radeon HD 5800 series (1GB on board video Ram)

(Note also test on similar system with nVidia GeForce GTX 560 Graphics Card with (1GB of video ram...crashed as well).


Can any help please?
Posted By: Superku

Re: Help: Large SkyBox image file crashes 3DGS - 12/23/14 03:58

Have you tried starting your application with a higher nexus then, for instance 200mb?
Posted By: Taskmaster065

Re: Help: Large SkyBox image file crashes 3DGS - 12/23/14 04:04

Thanks.
Posted By: xbox

Re: Help: Large SkyBox image file crashes 3DGS - 12/23/14 04:23

In SED, open your script, click Options>Preferences and then under the Engine tab, at the bottom under 'Command Line Options' in the text field type "-nx 200" (without the quotes)
Posted By: Taskmaster065

Re: Help: Large SkyBox image file crashes 3DGS - 12/23/14 04:24

I just tried that by adding -nx 200 option Command Line Options in preferences window and it stopped 3DGS from crashing (which it did before I did this) with the image file: "Eiffel01_2048a+6.png " which is 12288x2048 pixels (filesize = 46,391,940 bytes), BUT it does not display the images correctly: the faces are streched and in wrong locations.

This result is similar to the test image above this one in the source code: "Beach01_2048b+6.png" which is is 12288x2048 pixels (filesize = 32,675,366 bytes).

Any idea why this would be happening?
Posted By: Taskmaster065

Re: Help: Large SkyBox image file crashes 3DGS - 12/23/14 04:51

Hi again

I tried another file "Eiffel01_2048a+6.bmp" which is 12288x2048 pixels (filesize = 75,497,526 bytes) and it WORKED even though it is larger size than the "png" version of the same file used above (ie "Eiffel01_2048a+6.png ").

At least that's a solution, but would rather use the "png" format.

Any Ideas?
Posted By: Kartoffel

Re: Help: Large SkyBox image file crashes 3DGS - 12/23/14 12:17

( There's no memory difference in png and bmp once it's loaded into the ram. )
© 2024 lite-C Forums