help compiling high-poly model

Hi! I have ported NFS:S Audi RS4 but Im having trouble compiling it. It has roughly 43k polys, and I know limit per reference is ~10k. So I divided it to multiple references, but I still cant compile it. The compiler doesnt give any error (read “short conversion out of range”), but when I load the model in-game the game crashes. If I remove a reference or two (one if mesh in it is high poly and two if meshes in them arent so high poly) then it works, but as soon as I include all parts it doesnt work (im starting to think the limit is 40k polys per skin, but that cant be true as I have heard people have compiled even 60k)
http://www.shrani.si/f/20/td/3Hp5W9KR/hl2-2011-08-07-22-06-13-.jpg
Any suggestions are appreciated. Thanks!

This is how I divided the model:



/*
----------------
Drivable Audi RS4 QC
----------------
*/

$modelname "vehicles/cars/nfss_rs4.mdl"
$mostlyopaque
$cdmaterials "models\cars\shift_audi_rs4\"
$origin 0 0 0 90
$scale 1.0
$body "Body" "reference.smd"
$body "Body" "carrosserie.smd"
$body "Body" "dashboard.smd"
$body "Body" "dash_plastic.smd"
$body "Body" "structure.smd"
$body "Body" "tyres.smd"
$body "Body" "bottom.smd"

$surfaceprop "metal"
$noforcedfade

$include "rs4_shared.qci"


Reference doesn’t have 10k limit. It’s just suggested to keep under 10k polygons.

But I did that anyway, and it compiles with every mesh as long as they arent all together, so that cant be the reason :frowning:
Mybe there exists some kind of trick people use…

Have you tried compiling it as one ref?

or if you are using 3ds max. Try using Pro-Optimizer modifier. It can easely help reduce polygons and still keep quality.

Nope, just tried it, unfortunately it still crashes the game. It didnt give “short conversion out of range” error though, which surprises me o.O

Ill try reducing polycount after a while, when Im sure there’s no other solution. Thanks for advice though, will surely try it (later on).

Well sure you have collision model? Or is it properly made at least?

Also don’t think you need $mostlyopaque for car. Not sure though.

I use carroserrie model only for phy reference and the compiler then creates phy mesh.
phy

Master Chris had $mostlyopaque in his qc, so I left it in, I didnt really know what it does. (Not to mention that the car is barely driving in-game, I probably set everything up wrong, from suspension to rotation, but even as prop_static it didnt want to compile as whole). Ah well, since there is no tutorial I have no choice but to experiment, but this compiling problem doesnt make it easy…

By compiling the model multiple times, each time deleting a few hundred polys I determined that the model viewer crashes if going over roughly 37716 polys according to model viewer’s counter. Has anybody been able to go over that limit? That surely cant be the source engine limit, can it? :\

I think bodygroups is the solution. I compiled a model with 100k polys I think. MG42 with ragdolled belt. Used 3 bodygroups, 1 for the gun 2 for the ammo. Worked well.

These are the limits in Alien Swarm and Source 2007:

MAXSTUDIOTRIANGLES 65536
MAXSTUDIOVERTS 65536
MAXSTUDIOFLEXVERTS 10000
MAXSTUDIOSKINS 32
MAXSTUDIOBONES 128
MAXSTUDIOFLEXDESC 1024
MAXSTUDIOFLEXCTRL 96
MAXSTUDIOPOSEPARAM 24
MAXSTUDIOBONECTRLS 4
MAXSTUDIOANIMBLOCKS 256
MAX_NUM_BONES_PER_VERT 3

Odd that you should see crashes at roughly 50% of the actual limit.

Nooooo! DAMN! Every single time:

http://www.shrani.si/f/l/S4/3m94lH59/fuccck.png

Tried bodygroups. Damn crash every time, tried multiple configurations. I dont know what to do anymore >.< It only compiled twice, the first time with bodygroups and second time in a single reference, and the model was fucked although it said it has 43000 polys some parts were missing and some were distorted. It compiles even in one single reference perfectly as long as polycount doesnt go over that limit.

Yeah, its damn weird, ahh, shit :(( And the weirdest thing: compiler doesnt give any error o.O

[editline]11th August 2011[/editline]

How many bodygroups did you make and how many smd’s per one? How many polys per reference.smd? Did you also have an ordinary $body inside?

Thats so unfair, you make everything and just before finish compiling fails -.-

[editline]11th August 2011[/editline]

For some reason several materials fuck up when applying it http://www.shrani.si/f/7/6H/14e3HEiG/untitledd.png o.O
Edit: Found why, but still, the quality goes down considerably, bcs that model was already made for a game and therefore should be fairly optimized. To lower polycount to 37k from 43k the difference is quite visible.

Well take all the wheels and make them a bodygroup, take alls the windows and stuff then make them a bodygroup. 1 smd per bodygroup.

Well, I tried dividing it into 3 parts (3 bodygroups) and the result was weird (parts of wheels were missing o.O):
http://www.shrani.si/f/27/bY/43hIIUOh/untitlefd.png
Next time I compiled that very same thing the MV crashed.

I don’t know what happened to it.

Yeah, me too. Id guess sometimes compiler manages to compile it in working order, but it is defect because it has crossed the poly limit.
I wonder how Fakefactory compiled their models to work :\

Edit: I never taught about compiler. Could it be that people are using different compiler to compile high-poly models than GUIStudioMDL?

I cant believe it, look at the polycount, and he managed to compile it o.O
http://www.shrani.si/f/1S/OB/3XKf68qd/untitlerrrd.png
Why does compiler always screw with me :(((

Allright, the newest theory is like this: Porting from games requires tools that usually mess up somethings, therefore first export your car to obj and then reimport, texture and export to smd. (by TDM). Tried it and it worked, though obj fucked up textures http://www.shrani.si/f/1N/r0/2hFiTyz3/untitledd.png (and car also had 1500 less polys o.O). So my question is now, what is the best configuration for importing and exporting obj in 3ds max (for models intended for games)? http://www.shrani.si/f/h/7e/eezYaKe/ddasdd.png Do Faces have to be quads, polys or triangles? Is there any way so that the textures dont fuck up? Thanks!

If you import an OBJ into max and you get missing/messed up textures, some of the material names might be duplicated. OBJ saves materials in a .mtl, I believe, and if two different textures have the same name, only one will be saved and on reimport, be used in both instances it’s called for. Before exporting to obj, make sure your texture references all have unique names.

A polygon = 2 triangles.

That said bone per vert limit is interesting and does explain a couple of crashes I had earlier. Thanks for the list.