How do game engineers pack their data?

Started by
21 comments, last by TheChubu 9 years, 1 month ago


Then there preferable format should be some kind of binary format (unlike collada, that just points to the assets on the disk) that encapsulates the assets' binaries? Am I grasping this wrong?

Yes.

Theory runs that a packed file format contains 'chunks' of raw data (vertex data, audio buffers, etc) which are laid out exactly as they will be needed in memory. Loading these chunks is a straightforward read/mmap operation, with no further processing required.

In order to know what chunks you need to read/mmap, you also need metadata (basically, an index to the packed file). These are stored in their own chunks, which you read in, process, and then use to load the remaining chunks. The metadata chunks should generally be very small compared to the data chunks, so these are not always stored in binary - I've seen systems that store metadata in JSON.

Sorry for bumping. What 3d file formats do you recommend then?

Advertisement


What 3d file formats do you recommend then?

For exchanging data between content creation tools and your art pipeline? Any of a number of interchange formats, such as COLLADA or FBX.

For use at runtime? The custom file format which you are going to write to support the exact needs of your particular game.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I've been using OpenGEX format, there are export plugins for all major 3D editors, and one C++ import implementation, all in that page. There is also a Java OpenGEX importer, which is the one I am using since its self contained (ie, no need to use half of libGDX or jME like for other formats).

As other people said, its not a good idea to use text based formats for runtime though. Best to code up a tool that imports whatever exchange format you use and spits out a binary blob that your engine can easily load.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

This topic is closed to new replies.

Advertisement