LXO File Format

Exchanges about 3DBrowser
Post Reply
Synide
Posts: 1
Joined: Sat Feb 11, 2017 3:13 am
Contact:

LXO File Format

Post by Synide » Sat Feb 11, 2017 4:04 am

Hi, I just bought your '3DBrowser for 3D Users + Polygon Cruncher 13.00 x64' and as a modo user one of the first things I did was try the 'convert to lxo' format feature. I was just letting you know that the .lxo file format your application creates is slightly flawed. The first noticeable problem I've identified is that your writing out VX index values incorrectly. What it should be doing is... When the index (say for polygons) is 65280 or greater it should be writing the index out as a 4 byte long (or unsigned int, a U4 in the modo vernacular) where as your app isn't writing it as a U4 until it gets to 65535 (or 0xFFFF).

If I find more issues I'll post them here. Also, if this is all part of your SDK I'd be happy to make alterations to the C++ source (if allowable) as I'm very well versed in the .lxo format and a fairly accomplished c++ programmer. I've documented the file format to a certain extent on the modo wiki http://modo.sdk.thefoundry.co.uk/wiki/File_Formats.

If you have any questions or such feel free to respond here and/or to my email.

cheers, Sy

mootools
Site Admin
Posts: 249
Joined: Thu Jul 05, 2007 11:06 am
Contact:

Re: LXO File Format

Post by mootools » Tue Feb 14, 2017 12:38 pm

Hi Sy,

Many thanks for this precision. What is the side effect of this problem?

The writer uses a higher tool provided by Luxology which is in charge of writing the flow of polygon itself.
Looking at the code, here is the way indexes are flushed:

Code: Select all

/*------------------------------- Luxology LLC --------------------------- 03/09
 *
 * Write a Variable length index, used to represent an index into a list.
 * If the value is < 0xFF, write it as a 2-byte value; otherwise, write it as 
 * a 4-byte value, but put 0xFF in the high byte so it will be known to be
 * stored in 4 bytes.
 *
 *----------------------------------------------------------------------------*/
LxResult LxoWriteData::WriteIndex (LxULong const value)
{
        if (value < 0xFF00)
            return WriteShort ((LxUShort)value);

        return WriteLong (value | 0xFF000000);
}
May be there is a newest version of this wrapper?

Thanks,
Manuel
I'll check that for the next release.

mootools
Site Admin
Posts: 249
Joined: Thu Jul 05, 2007 11:06 am
Contact:

Re: LXO File Format

Post by mootools » Tue Dec 12, 2017 1:31 pm

This has been corrected in 3DBrowser release 13.51 / Polygon Cruncher release 11.51.
Please could you confirm this fix the issue?

Thanks,
Manuel

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests