B3D file format & cube map storage

Blitz3D Forums/Blitz3D Programming/B3D file format & cube map storage

MCP(Posted 2010) [#1]
Hi all,
I'm writing a small application that can read/modify & write Blitz B3D files but I've hit a small problem with saving cube map mode information.

The official texture chunk info is defined as...

TEXS
{
char file[]
int flags,blend
float x_pos,y_pos
float x_scale,y_scale
float rotation
}

Storing the cubemap flags is not a problem as it is stored in TextureFlags (flags) as expected... But where is the cube map mode information stored??

Official cube map modes are defined as:-

1 - Specular 2 - Diffuse 3 - Refraction

Hope someone can help,

Thanks.


Ross C(Posted 2010) [#2]
I don't think there is one. The blitz 3d file format hasn't been updated, so taking into consideration the cubemap mode was implemented way after that, then i think you may be out of luck. You could always store this information in the entityname field, and parse it upon loading.


MCP(Posted 2010) [#3]
I thought as much Ross! I think I may have to forget cube map mode storage for now.
Thanks for replying.


SLotman(Posted 2010) [#4]
Maybe the Irrlicht engine B3D loader could help? I don't know if it supports cubemap, but at least is somewhere to look for info...


Kryzon(Posted 2010) [#5]
I think it assumes mode 1 as default.

If the guy wants anything other than that, he has to set it up by code.


MCP(Posted 2010) [#6]
I'm contemplating creating a new chunk type for storing cube map mode information. It should follow TEXS,BRUS chunks and look something like this..

CMMO
{
int texture_id
int cmap_mode
}

Official documentation says that any unknown chunks can be replaced with a pivot by default (personally I'd just skip unknown chunks altogether)
so having the extra chunk shouldn't really effect existing software in theory but will provide cube map mode information for any software that would care to look for it.

Anyone else think that's a reasonable idea?