Skip to content

New polygon form found ! #23

@aybe

Description

@aybe

I guess I've found something 💃

HEAD.PRM (Wipeout 1)

For those polygons:

        FlatTriangle = 0x05,
        FlatQuad = 0x07,

Basically the SubType in the polygon header is misleading, when there are more than 255 vertices, the SubType actually becomes an index as you can see below, and the length of polygons change:

2015-11-11 04_25_54-calculator
(SHLD is a small object with less than 0xFF vertices, HEAD exceeds 0xFF)

They are bigger than usual:

                case PrmPolygonType.FlatTriangle:
                    var flatTriangle = new FlatTriangle
                    {
                        Header = header,
                        Indices = reader.ReadUInt16BEs(3),
                        Unknown1 = reader.ReadUInt16BE(),
                        Colors = reader.ReadUInt32BEs(3)
                    };
                    if (prmObjectHeader.PolygonCount > 0xff)
                    {
                        reader.ReadBytes(52);
                    }
                case PrmPolygonType.FlatQuad:
                    var flatQuad = new FlatQuad
                    {
                        Header = header,
                        Indices = reader.ReadUInt16BEs(4),
                        Colors = reader.ReadUInt32BEs(4)
                    };
                    if (prmObjectHeader.PolygonCount > 0xff)
                    {
                        reader.ReadBytes(72);
                    }

The if are the code I've added to my working base and you can see the result below,

2015-11-11 04_20_07-unity personal 64bit - modelscene unity - wxx-rebirth - pc mac linux standa
2015-11-11 04_20_20-start
2015-11-11 04_20_38-cortana
2015-11-11 04_21_24-plotly
2015-11-11 04_21_39-start

It seems to be the trophy championship or something but I can't remember where it's in the game ...

By the way I did somehow try to understand the logic in IDA, there were nearly 20+ cases in switch blocks which makes me believe there are way more forms of polygons that one can think of ... but there must be some logic after all !

Any clue/hints are welcome !

Thanks :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions