Page 1 of 1

Model polygons are bad? [Solved]

Posted: Sat Nov 26, 2016 6:40 pm
by lan1211
I'm writing a decompression algorithm binary format 3D model, but I have something does not work. For example, I unpacked the cube.

This block faces in file (HEX editor):
I came to the conclusion that something is wrong with the faces. Faces extraction code looks like this:


Thank You in advance for your help!
P.S sorry for my English)

Re: Model polygons are bad?

Posted: Sat Nov 26, 2016 7:36 pm
by Sir Kane
For the box you have 8 vertices, but your indices go up to 23, so that's probably not index data or there are more vertices.

Re: Model polygons are bad?

Posted: Sun Nov 27, 2016 8:20 am
by lan1211
Sir Kane wrote:For the box you have 8 vertices, but your indices go up to 23, so that's probably not index data or there are more vertices.
Yes, I know that there should be 24, but in front of the block with the vertices there is a block of 4 bytes, which indicates the number, there is number 8. Face correct, because in the file there are no more blocks, in which could be faces. I noticed that all the options vertices, which could be a cube (no repeated vertices), where present, so there is likely peaks are compressed to reduce the file size.

Re: Model polygons are bad?

Posted: Sun Nov 27, 2016 10:53 am
by Karpati
lan1211,

Nice to see my program (3D Object Converter) in work.

Which file format are you working on?

Re: Model polygons are bad?

Posted: Sun Nov 27, 2016 1:40 pm
by lan1211
Karpati wrote:lan1211,

Nice to see my program (3D Object Converter) in work.

Which file format are you working on?
Zoltan,

I'm writing a program to extract the 3d model in the binary file format (.dobj v1) in the .x format (Direct X ASCII). 3D Object Converter I use to visually see the results.

By the way, I once wrote to you on your email about this file format DOBJ v1.

Re: Model polygons are bad?

Posted: Sun Nov 27, 2016 5:25 pm
by Sir Kane
Can you provide the box file?

Re: Model polygons are bad? [Solved]

Posted: Tue Nov 29, 2016 12:10 pm
by lan1211
Problem Solved.

Re: Model polygons are bad? [Solved]

Posted: Tue Nov 29, 2016 3:34 pm
by Sir Kane
Well, what was it?

Re: Model polygons are bad? [Solved]

Posted: Tue Nov 29, 2016 7:17 pm
by lan1211
Sir Kane wrote:Well, what was it?
Lossy compression, maps in other files:)