Page 1 of 2

cinematic error...

Posted: Mon Oct 01, 2012 11:27 pm
by pulpum
hello all.

I assume I have understood the concept of intro.lua but I still have a problem:

[string "CinematicMode.lua"]:0: Not a valid DDS file: mod_assets/textures/cinematic/page01.dds
stack traceback:
[C]: in function 'load'
[string "CinematicMode.lua"]: in function 'showImage'
[string "CinematicMode.lua"]: in main chunk
[string "CinematicMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk

OS Version 6.1

OEM ID: 0
Number of processors: 4
Page size: 4096
Processor type: 586

Total memory: 5611 MB
Free memory: 2742 MB

Display device 0:
Device name: \\.\DISPLAY1
Device string: AMD Radeon(TM) HD 6620G
State flags: 00000005

Display device 1:
Device name: \\.\DISPLAY2
Device string: AMD Radeon(TM) HD 6620G
State flags: 08000000

Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008

Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008

Display device 4:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008



my music is played, but game exit, and this error message appears.

I put my picture into mod_asset/textures/cinematic

it's a dds file made with photoshop...

Re: cinematic error...

Posted: Tue Oct 02, 2012 12:08 am
by SpacialKatana
Seems to me you've either saved the .dds improperly....needs to be A8R8G8B8 format and also has to have mipmaps, easy to miss that checkbox ( I use CS5 with Nvidia dds support plugin)

or...

Where you've saved the image leave it as a .dds file, but in your script use the .tga extension ie ( /mypic.tga).

Re: cinematic error...

Posted: Tue Oct 02, 2012 12:42 am
by pulpum
hmmm.

you were right. my export parameters were not the good ones :) thanks!

now, I can work on intro. yeah! :mrgreen:

Re: cinematic error...

Posted: Tue Oct 02, 2012 1:34 am
by SpacialKatana
Glad I could help. Good luck with your intro ;)

Re: cinematic error...

Posted: Tue Oct 02, 2012 4:12 pm
by Grimwold
SpacialKatana wrote:Seems to me you've either saved the .dds improperly....needs to be A8R8G8B8 format and also has to have mipmaps, easy to miss that checkbox ( I use CS5 with Nvidia dds support plugin)
Do you (or does anyone) know how to get this to work using the DDS plugin for GIMP? When I get to the dds save dialogue the format A8R8G8B8 is not listed although there are a dozen other variants on the letters RGBA and the number 8! I've tried a few and the game always crashes out at the intro. I definitely ticked mipmaps.. but am not using compression (should I? I thought I read it was not necessary for 2D images)

update.. ok fixed it. I read in another thread I needed to add an alpha channel. then I saved in "RGBA8" format using the GIMP plugin and it seems to work

Re: cinematic error...

Posted: Tue Oct 02, 2012 5:31 pm
by Komag
can you clarify that whole process in one brief tutorial? I'm having a bit of trouble with it

Re: cinematic error...

Posted: Tue Oct 02, 2012 6:05 pm
by Grimwold
Komag wrote:can you clarify that whole process in one brief tutorial? I'm having a bit of trouble with it
Briefly.. using GIMP.. this is what I did.

* Install the DDS plugin for GIMP if you haven't already (I got it from here - http://code.google.com/p/gimp-dds/)
* open a suitable background image in GIMP (to test, I used a jpg I found online... which due to copyright will not be appropriate for a published mod).
* add an alpha channel to the image. This is done via "Layer > Transparency > Add Alpha Channel" In GIMP 2.6.3
* choose Save As and name the file with a .dds extension
* On the DDS dialogue tick "create mipmaps" and change the Format to RGBA8

This saves your background image as a DDS file, but in your intro.lua script you must refer to it as a .TGA file of the same name.

Hopefully that helps. (and actually works as I've only done it once so far.)

Re: cinematic error...

Posted: Tue Oct 02, 2012 6:10 pm
by Komag
thanks, I'll try it out soon!

Re: cinematic error...

Posted: Wed Oct 03, 2012 12:01 am
by Komag
great, it worked for me!
I'm using a newer GIMP, version 2.8.2, and I have to "Export" instead of "Save As" in order to be able to choose a DDS option.
I first selected the format RGBA8, then I selected "Generate mipmaps", then back at the top I selected a Compression, since petri mentioned " Use DXT1 for textures without alpha (transparency channel), DXT5 for textures with alpha." I selected "BC3 / DXT5" and it saved a file that was 4MB instead of 16MB when it was uncompressed

Re: cinematic error...

Posted: Wed Oct 03, 2012 12:05 am
by Grimwold
Looks like I need to update my GIMP ;)

Thanks for the tips about compression.. my 75Kb jpg became a 3Mb dds file, so I will definitely look at compressing it.