Jump to content

parsetrisurf error


Recommended Posts

I have a big lake map.

because i am unabled to ripped out from a game in a single shoot and i need the entire landscape, i extracted collada from with a tool from game (model ex 4).

collada lost his textures so i need to manually assign (i have no problem on that with 3DS format i discover a method for ripper 3d ripper dx frames. but however... i need this area to an high quality not ripped enviroment.

i imported collada on blender, i removed sky and water meshes (they are silly big for model). because area is BIG and is done by 50 meshes, i have no choice that export on MD3. i assigned manually materials and textures with "md3shader custom properties" and "copy custom properties" and 1 hour of painful work to put correct texture name to each mesh, i had no problem on that.

but obvius 50 mesh are too much for MD3 format.

so i splitted the model into two MD3, by 25 meshes each one.

on radiant is all okay.

i not use spawnflag solid because if i use i hit the MAX_BRUSHES error (map have more of 32k etc brushes)

so... okay, i can build with no solid and using clipping. at least player can walk only in a little road valley of the landscape. cannot go into lake. is a vampire and water is deadly for vampires. so... that's fine.

 

what is the problem:

i tryed to load the map on JKA with a build meta and i get this error

"parse trisurf indices  > Max (8550 > 6000 ) on misc_model

models/sr2/sarruins/lake2b-1090

 

i seek on blender the mesh that use this texture and is of 929 vertexes

So... why it give me this error? (and i get also with another model more more more simple of that.)

strangely, if use the 3DS format with ripped models i not get any error on radiant or on map, also for very bigh, high and massively models structures.

 

mmm i see there are some meshes that overcap 1000 vertexes md3 limit... strangely i not get crash for that motivation.

Link to comment

By a code way, i see crash is caused from this:

tr_bsp.cpp

Sorry, i got problem with bbcode. i show that:

 

/* =============== ParseTriSurf =============== */ static void ParseTriSurf( dsurface_t *ds, mapVert_t *verts, msurface_t *surf, int *indexes, world_t &worldData, int index ) { srfTriangles_t *tri; int i, j, k; int numVerts, numIndexes;   // get fog volume surf->fogIndex = LittleLong( ds->fogNum ) + 1; if (index && !surf->fogIndex && tr.world && tr.world->globalFog != -1) { surf->fogIndex = worldData.globalFog; }   // get shader surf->shader = ShaderForShaderNum( ds->shaderNum, lightmapsVertex, ds->lightmapStyles, ds->vertexStyles, worldData ); if ( r_singleShader->integer && !surf->shader->sky ) { surf->shader = tr.defaultShader; }   numVerts = LittleLong( ds->numVerts ); numIndexes = LittleLong( ds->numIndexes );   if ( numVerts >= SHADER_MAX_VERTEXES ) { Com_Error(ERR_DROP, "ParseTriSurf: verts > MAX (%d > %d) on misc_model %s", numVerts, SHADER_MAX_VERTEXES, surf->shader->name ); } if ( numIndexes >= SHADER_MAX_INDEXES ) { Com_Error(ERR_DROP, "ParseTriSurf: indices > MAX (%d > %d) on misc_model %s", numIndexes, SHADER_MAX_INDEXES, surf->shader->name ); }   tri = (srfTriangles_t *) Z_Malloc( sizeof( *tri ) + numVerts * sizeof( tri->verts[0] ) + numIndexes * sizeof( tri->indexes[0] ), TAG_HUNKMISCMODELS, qfalse ); tri->dlightBits = 0; //JIC tri->surfaceType = SF_TRIANGLES; tri->numVerts = numVerts; tri->numIndexes = numIndexes; tri->verts = (drawVert_t *)(tri + 1); tri->indexes = (int *)(tri->verts + tri->numVerts );   surf->data = (surfaceType_t *)tri;   // copy vertexes verts += LittleLong( ds->firstVert ); ClearBounds( tri->bounds[0], tri->bounds[1] ); for ( i = 0 ; i < numVerts ; i++ ) { for ( j = 0 ; j < 3 ; j++ ) { tri->verts.xyz[j] = LittleFloat( verts.xyz[j] ); tri->verts.normal[j] = LittleFloat( verts.normal[j] ); } AddPointToBounds( tri->verts.xyz, tri->bounds[0], tri->bounds[1] ); for ( j = 0 ; j < 2 ; j++ ) { tri->verts.st[j] = LittleFloat( verts.st[j] ); for(k=0;k<MAXLIGHTMAPS;k++) { tri->verts.lightmap[k][j] = LittleFloat( verts.lightmap[k][j] ); } } for(k=0;k<MAXLIGHTMAPS;k++) { R_ColorShiftLightingBytes( verts.color[k], tri->verts.color[k] ); } }   // copy indexes indexes += LittleLong( ds->firstIndex ); for ( i = 0 ; i < numIndexes ; i++ ) { tri->indexes = LittleLong( indexes ); if ( tri->indexes < 0 || tri->indexes >= numVerts ) { Com_Error( ERR_DROP, "Bad index in triangle surface" ); } }

}


Link to comment

Try loading it by the renderer, using misc_model_static.

Ok, i'll do. the alternative is to split in a large amount of MD3 all the scenes and also to become crazy to detach all meshes with more of 1k vertexes.

Why a entity model static is more sure respect a misc_model for this kind of silly errors of q3map2 and vanilla engine?

Link to comment

@@DT85 still better. now i get "only" the f****ed "ohi ahi i hate this md3 because have more of 1k vertexes on that mesh..."

so i think for fix is sufficient to split the incriminated. on blender i can easily see vertex number of a mesh.

 

i think misc_model problem is strange. seems to happen when misc_model have more of 6k vertexes as total amount of meshes...

(md3 have total of 10k vertexes each one) otherwise... with ripped stuff into 3ds format i not get never this trouble.

and i tested a map of a cathedral with a mesh with more of 10k! (cathedral was splitted in a mesh for material and some was very very... load as vertexes numers.)... so i think depend by limitation of MD3 format. pity there is not a way to rip into a single frameshot this lake with 3dripper. is so big that cannot render all area on original game.

however thanks. :)

i had already this kind of trouble when i recreated the ruined pillars of nosgoth from soul reaver 2 for first level of my mod.

when i did that, i used only MD3... i get a very craziness for force JKA to eat the misc_models of pillars... i was forced to spli the scene into 4 different MD3.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...