January 6, 20251 yr Hi! I'm not a programmer but I'm trying to write a program to process models. So, I encountered a problem: conversion of binary level aka env files does not occur correctly, which is some of the faces are drawn incorrectly + some of the faces are inverted. As far as I know, this problem is related to incorrect processing of indices. Can someone help me with this? Example of a level + screenshots of problem: Env.7z Some information about levels aka env's: After the information marked in orange comes the following: 4 byte value about the number of vertices, 4 byte value about the number of indices, vertices, indices. And so on. ENV Level Vertices have the following structure: struct VERTEX { float pos[3]; float normal[3]; float unknown[1]; float tc[2]; }; I can also provide the code of my program, but the code there is terrible so be prepared for that 😄 https://github.com/gabengaGamer/JAMC Edited January 6, 20251 yr by GameSpy
January 6, 20251 yr Author Here is an example of a converted level. .obj format. All conversion problems are clearly visible there output.7z Edited January 6, 20251 yr by GameSpy
February 22Feb 22 Supporter Hi, for theextra faces I have no idea. You're avoiding deformed faces with this code: //Skip degenerated faces. if(v1 == v2 || v2 == v3 || v3 == v1) goto next_face; and the tri strips code looks as usual. Hex2obj shows the extra faces, too, mesh_100: The inverted faces seem to be related to whole objects so I flipped mesh_164 manually:
Create an account or sign in to comment