How to export a complete scene into a binary file?

im trying to use binaryexporter to save a complete scene including textures, models, particles, lighting and etc into one binary file.



but it seems that the textures are only saved as paths.



how to i save all the files into one binary file?

This should do it:

myTexture.setStoreTexture(true);

im using "Texture.DEFAULT_STORE_TEXTURE = true;". but when i use binaryImporter to load the saved jme file back into the game again, all the textures disappear and the model is just a white model.



HELP :expressionless:

em…someone plz help~

This is very dumb so my suggestion is worthless, so I think you know this and have tried it… I am pretty sure you did, but anyway… Have updated the lighting state (activated it) after loading the models?  :expressionless: white models always point at a lighting problem…

Well actualy duenez if lighting is completely white the model would still be textured because lighting is multiplied, not added, by texture color.

Momoko_Fan said:

Well actualy duenez if lighting is completely white the model would still be textured because lighting is multiplied, not added, by texture color.


Yeah!, what I meant is completely white, without any depth cue or anything, just a big white blob and no more... I know light and texture are blended.  ;) Otherwise I would willfully take the newbie status once again.

Neakor: Have you tried looking at the model you just saved into jme format in some other way? like with MW3D... Maybe that could give you a clue... If that does not help, you could try to debug your program and see inspect your objects to see if they "have" texture, just not showing, or really the textures are not even present (null).

yes the lighting is fine. its not compeletly white, it has the lighting on it just without the textures.



thx for the info anyways…

i debugged it before, the textures r there, its just they dont show up. besides i used storeTexture so the file itself has the image information in there…



i dont understand it now~

If you send me the model I could take a look at it.

Momoko_Fan said:

If you send me the model I could take a look at it.


thx alot. but u have the model as well. i just used the mobboss model from jmetest.

i loaded it up with colladaimporter, and set Texture.DEFAULT_STORE_TEXTURE = true;. then i exported the node containing both the skinnode and skeletonnode using BinaryExporter. the file turned out to be 1.87MB.

plz help~
MoleHillRocker said:

Hello neakor,

have you already made some advances on saving a whole scene?
I currently have the same problem :S


nope, not at all. my textures still dont show up~

Can you just post the broken jme model? I don't want to mess with that collada stuff and exporting things…

Momoko_Fan said:

Can you just post the broken jme model? I don't want to mess with that collada stuff and exporting things..


ill post it as soon as i get home. thx

heres the exported .jme file.



help~



http://rapidshare.com/files/72982809/model.jme.html

I checked the file, the images are all null (they were not stored in the file to begin with, it seems).



EDIT: Found it, setting Texture.DEFAULT_STORE_TEXTURE to true forced loading the textures.



EDIT 2: This is odd. The model contains the image data but the storeTexture variable is not set on the model at all, which causes the importer to use the default value (DEFAULT_STORE_TEXTURE).

Momoko_Fan said:

I checked the file, the images are all null (they were not stored in the file to begin with, it seems).

EDIT: Found it, setting Texture.DEFAULT_STORE_TEXTURE to true forced loading the textures.

EDIT 2: This is odd. The model contains the image data but the storeTexture variable is not set on the model at all, which causes the importer to use the default value (DEFAULT_STORE_TEXTURE).


so em....am i doing something wrong?

I think what he meant was that the exporter is wrong since it seems to ignore the value of the Texture.DEFAULT_STORE_TEXTURE value, (i.e. does not get stored) and when you import, well, it does not have it! 

duenez said:

I think what he meant was that the exporter is wrong since it seems to ignore the value of the Texture.DEFAULT_STORE_TEXTURE value, (i.e. does not get stored) and when you import, well, it does not have it! 


but the image data is in there though coz the file size has increased alot after i set DEFAULT_STORE_TEXTURE to true.

Yes, yes… it is just that the importer does not know that it is there, because the model is incorrectly reporting it. (i.e. it did not save that it did have the texture, only the texture itself)