L3DT users' community
Large 3D terrain generator

exporting texture error.

Got a problem or need advice?

exporting texture error.

Postby dead.rabit » Tue Mar 06, 2007 5:45 pm

heyya im trying to export the texture file as any filetype that photoshop supports.

it should be 19,456 x 19,456 Px

i go:
view-> show map -> texture map (to bring up the texture if its not already)
file-> export-> active map
deselect "split map into tiles"
select anything for the file format (photoshop supports jpg, png and bmp's)
select an output file
hit ok

and then i get this error messege
Image
if that fails to load it says
CL3DTio_FIApp::SaveMapFile error
- FreeImage failed to allocate bitmap

CExtDLL::SaveMapFile error
- call to DLL function 'SaveMapFile' failed

CMapGroup::SaveMapFile3 error:
- save failed



thanks for any help anyone can give
D.R
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby Aaron » Tue Mar 06, 2007 8:46 pm

Hi DR,

To save that image, the FreeImage library has to allocate a contiguous block of 1.4GB as a buffer. That error occurs when the operating system couldn't allocate the buffer. How much RAM do you have?

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby dead.rabit » Tue Mar 06, 2007 10:32 pm

2 GB and a heap of virtual memory (scratch disk)
ill try again after shutting down some proccesses.

but is there a way to let L3DT use the virtual RAM in the preferences or something?
thanks alot
D.R

p.s. in the meantime ill try shutting down some proccesses
thanks again
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby Aaron » Wed Mar 07, 2007 1:02 am

Hi DR,

As I understand it, all Windows programs are always using virtual RAM (see Microsoft). However, virtual memory is only useful for paging separate blocks of RAM that are not in use. If you request one gigantic block of RAM that is larger than the amount of physical RAM you have, it will be refused (I think that's how it works anyway; can anyone confirm/deny this?). Anyway, to get around this, programs themselves must implement their own paging system; Photoshop does it, L3DT does it (mosaic maps), and other programs that deal with large map/image/data blocks do it. Now, FreeImage does actually have a paging system, but currently it only works with TIFF, ICO and GIF formats, and not the more useful BMP, JPG and PNG formats. This is why when writing the FreeImage plugin for L3DT I did not use their multi-page features. However, I can write a new plugin that uses L3DT's paging system to save large maps as single bitmap images, and I've put that on the to-do list.

Before I get carried away with that, though, can you verify that on your system you can open Photoshop and create a new RGB image that is 19,456 x 19,456 pixels, save it as a bitmap, and load it again? I'd like to be sure that it will work before I start coding another format plugin.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby dead.rabit » Wed Mar 07, 2007 11:21 am

i did try shutting down all but vital proccesses, but i still got the same error.

i have loaded 20k x 20k images before in photoshop and it takes its sweet time, but works eventually.

ill try again later tonight when im on my own computer.

if i saved it as tiles, is there a way to convert those files into bmp/jpeg etc.
it'd take some time but with that i could join the tiles together in photoshop.

again im not on my own computer so i cant try it out at the moment.

ill post again later tonight with anything i find
thanks again
D.R
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby Aaron » Wed Mar 07, 2007 11:40 am

dead.rabit wrote:if i saved it as tiles, is there a way to convert those files into bmp/jpeg etc.


The tiles are already saved as bmp/jpeg/png/tga, depending on what you set in file->preferences.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby dead.rabit » Wed Mar 07, 2007 5:45 pm

ok well, the long awaited update.

as for exporting as tiles. it worked fine however looking at the pictures afterwards they looked very posterized.

can i reduce this effect at all? because at the moment its my only way of exporting
maybe reducing/increasing tile size


photoshop is fine with editing saving and opening RGB bitmaps at this kind of size, although its a little troublesome waiting for it to calculate things, ive never known it to crash.

thanks again
D.R
=]
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby dead.rabit » Wed Mar 07, 2007 6:41 pm

ok ive confirmed the detail of the exported mosaic images depends on how big the tiles are.

smaller tiles have alot of detail
large ones look very posterized.

rendering at the default 512 x 512 gives me this
which is beautifully detailed. however being confronted by 1444 .bmp images that need to be manually put together is very disturbing
Image

this however is the picture i got from rendering 9728x9728 (half of 19456x19456) giving me 4 images to stitch together.
Image

is there something in the pref's or anything to repair this?

thanks alot
sorry for ranting so much
D.R
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby Aaron » Wed Mar 07, 2007 9:42 pm

Hi DR,

Sorry, there's no option to fix this. I've never seen it before. What is the size of the file (in pixels and MB?) Did the file look as dodgy when you opened it in Photoshop? (Windows Picture and Fax Viewer has serious limitations.)

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby dead.rabit » Wed Mar 07, 2007 11:58 pm

its alright you dont need to keep on appologising

anyway umm

i exported into tiles of 9728x9728 i exported as a jpeg and its 1.45 MB
all 4 images were the same

and im afraid its the same in photoshop. i took this screenshot at "actual pixels"
Image

wait no... while browsing my files i attempted to try again using different formats and it crashed because i had too many things running

the size isnt the problem i dont think

the smaller image i just happened to render as a .bmp (at the time i was choosing at random as it didnt matter)

but the larger ones were rendered in .jpg format

just checked my preferences and discovered that saving textures-> jpg's the quality is set to "1"

which explains everything

i can't get it to change to 95% quality like all the others. but thats fine ill just render as .bmp's

anyway thankyou for all the help, sorry to send you on a wild goose chase

all the best
D.R
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby Aaron » Thu Mar 08, 2007 3:43 am

Hi DR,

Eww, a JPEG quality of 1? I wonder how that got set? I just installed a fresh copy of L3DT on a fresh computer, and it's initialising at '95' as it's supposed to. Has anyone else seen this happen? (wrong quality settings)

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby dead.rabit » Fri Mar 09, 2007 10:08 pm

i tried setting it to 100 at one point.. i think it might well of been that

i have had this problem quite often because of this damned wireless keyboard.

if the reciever is more then 4 inches away only 1/5th of the keys work.
(and the point of a wireless keyboard is??)

not only that its not just a set of keys going off like say the numpad or the Function keys not working... its just random keys

so i appologise for the scare again
my bad
D.R
dead.rabit
Member
 
Posts: 12
Joined: Sun Mar 04, 2007 2:47 pm

Postby Aaron » Sat Mar 10, 2007 7:24 am

Hi DR,

I'll put a warning in the plugin when the JPEG quality is less than 50.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Help and support

Who is online

Users browsing this forum: No registered users and 8 guests

cron