Jump to content

Clone trooper Phase 2 armor


Recommended Posts

You should probably try to reduce the polycount some more, your main mesh is quite high.

that's starting to get fairly difficult without destroying the UVs

I could delete the sides of the knee and ellbow pad straps probably, maybe remove a few more edges at the helmet

 

EDIT: 500 tris down, still crashes

Link to comment

@@DEVISS before I can think about that this one has to work properly without crashing the game (an issue thats allready fixed for those using openjk)

 

I seem to be close to fixing the crash though - 755 tris down leaving me with 7794 tris in total and a single clone no longer crashes the game, as soon as you spawn a second and shoot one of them while the other is still alive it crashes.

Strangely I can have 20 ragdolling dead clones lieing around and still spawn&shoot another clone without problems occuring.

 

I als succesfully tested 10 solaires fighting that single clone, Solaires tricount is 7355 so I assume the treshold for the ghoul2 error to be at around 7.5k tris

 

Edit: down to 7514 tris and it still crashes

 

Edit2: 7490 tris and it crashes with 3 clones on screen  while 6 7355 tri Solaire models work fine - there must be another trigger for this error than just the tri count

 

@@eezstreet, @@Xycaleth any ideas what else could be related? the clone is split into many sub objects could that be part of the problem?

Link to comment

Damn that is looking sweet, shame about the crashes. I'm sure you'll sort it out in time.

Excellent work on the model though - never thought we'd see the new clone model we've been wanting so many years for.

Link to comment

and they both are using the _humanoid.gla?

yes, they are

 

here's a list of differences that you can't take from the linked pics:

 

Solaire:

-4 Materials (2k for the whole body, 1k for accesoires and 2 sided alphamapped variants for both)

-slightly different hierarch (bolts for LODs are not linked correctly, hips_x are not linked to the coresponding stupidtriangle_off)

 

Clone:

-7 materials (6x 1k for the test version (have higher res 2k versions available) and a shader based at textures/common/black with an env stage)

-everything in the hierarchy is linked to the proper LOD variant

 

Similiarities between both:

-all materials have 2 shaderstages (just diffuse and spec)

-LODs seem to work fine for both ingame and in Modview

 

time fore more extreme tests...

 

EDIT:

I'm done.

I'm fucking done - now a single scalped, beltless clone crashed the game

 

it's official @@neomarz1's clones have a protective curse

 

the crash can't be related to vertex, tri and surface count alone

 

EDIT2: a hierarchy change didn't do the trick either

Link to comment

The exact error can happen in two different places (in MP, couldn't find the error in SP):

 

TransformedVerts = (float *)G2VertSpace->MiniHeapAlloc(surface->numVerts * 5 * 4);

 

g.mTransformedVertsArray = (size_t*)G2VertSpace->MiniHeapAlloc(g.currentModel->mdxm->numSurfaces * sizeof (size_t));

It's either the number of vertices in a single surface, or it's the total number of surfaces.

AshuraDX likes this
Link to comment

the number of vertices in each surface is below 500

I guess I'll try to merge a few objects to reduce the surface count...

 

EDIT: strangely enough the error only occurs in singleplayer

Yeah, that's because singleplayer JKA has half the miniheapsize of multiplayer. Don't ask me why it's like that, but either way it's correctly set as the MP size in OpenJK.

If you're getting errors in singleplayer while using jamp.exe, it's not even worth it to sacrifice quality imo.

Link to comment

Yeah, that's because singleplayer JKA has half the miniheapsize of multiplayer. Don't ask me why it's like that, but either way it's correctly set as the MP size in OpenJK.

If you're getting errors in singleplayer while using jamp.exe, it's not even worth it to sacrifice quality imo.

people still complain

I have 2 versions for now, a high res model with 2k textures and the lowres which is the model I'm butchering atm with 1k textures

eezstreet likes this
Link to comment

Okay, just looked at the code. In OpenJK, SP and MP both have the same amount of 'transform space', which is 262144 bytes. JASP seems to have roughly half the amount of transform space compared to JAMP; JASP has 132096 bytes of transform space, JAMP has 262144 bytes.

 

The equation you're trying to satisfy is:

 

number of surfaces * 4 + total number of vertices in an LOD * 20 <= transform space
In other words, both the number of surfaces and the total number of vertices can trigger the error, but total number of vertices more-so. I don't know which LOD gets used, but assuming you're hitting the error, I'm guessing it's using LOD0.

 

For JASP, you can have around 6600 verts maximum before you hit the error.

In JAMP and OpenJK, you can have around 13100 verts before hitting the error.

 

Both cases assuming you have 32 surfaces.

 

EDIT: The 'transform space', in case anyone is curious, is used for transforming the model vertices for collision detection.

eezstreet and Archangel35757 like this
Link to comment

Okay, just looked at the code. In OpenJK, SP and MP both have the same amount of 'transform space', which is 262144 bytes. JASP seems to have roughly half the amount of transform space compared to JAMP; JASP has 132096 bytes of transform space, JAMP has 262144 bytes.

 

The equation you're trying to satisfy is:

 

number of surfaces * 4 + total number of vertices in an LOD * 20 <= transform space
In other words, both the number of surfaces and the total number of vertices can trigger the error, but total number of vertices more-so. I don't know which LOD gets used, but assuming you're hitting the error, I'm guessing it's using LOD0.

 

For JASP, you can have around 6600 verts maximum before you hit the error.

In JAMP and OpenJK, you can have around 13100 verts before hitting the error.

 

Both cases assuming you have 32 surfaces.

 

EDIT: The 'transform space', in case anyone is curious, is used for transforming the model vertices for collision detection.

 

happens with any LOD actually

and the current clone model has 6246 verts, 7490 tris on 27 surfaces

 

doing the math (132096-(27*4))/20=6599.4 max verts, which I should not reach

but that's for a single model I guess?

 

atm I'm only crashing with 2 or more clones rendered at once

Link to comment

That's strange :/ I can't see anything in the code that would cause this to happen. Do you ever get the transform space error when you only have one player on screen? My only explanation is that the collision detection isn't happening unless there's more than one player.

 

I don't believe this is a problem caused by rendering models. Instead, it's when collision detection needs to be done.

Link to comment

@@Xycaleth it's even more random!

If I use the clone model as my character model instead of spawning the npc version in, me being hit instantly crashes - while a single clone npc I shoot won't crash the game

 

EDIT: the circumstances for the crash to occur are very varied - now I could have 2 at once without problems but a third caused the crash again

Link to comment

@@Xycaleth - so this os the vanilla game limit? Since you say OpenJK 13100 verts?

 

can we increase this transform limit so that in SP we can have same number of vertices?

we have that for OpenJK SP

 

the crash only occurs with the base JASP

 

@@Xycaleth did some more systematic testing and noticed something:

https://docs.google.com/spreadsheets/d/1OLTu9MrDbIFFQkcKWgDCxUjtbXt5ietF4Wqu1k1Tjr8/edit?usp=sharing

 

green is fine, red crashes

Xycaleth and Archangel35757 like this
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...