Page 1 of 1

crashes if going over 37k polys

PostPosted: Sat Aug 13, 2011 2:57 pm
by Terraviper-5
Hi!

Im trying to make a vehicle for garrysmod. Everything went well, but at compiling it stopped. If I compile my model with more than 37k polys, the game and model viewer crash. I have tried every possible thing I remembered to try to make it work but its no use. I saw this thread http://www.interlopers.net/forum/viewtopic.php?f=47&t=34666 but it doesnt help me much since I dont get any errors, only crash. People obviously already compiled cars with more than 43k polys (which is my cars polycount). For example: http://www.shrani.si/f/1S/OB/3XKf68qd/untitlerrrd.png I tried that bodygroup trick too, where you split the model and have one part as main reference and other as bodygroup. Sometimes the model compiles and works, but is very distorted with missing parts (though MV says polycount is still 43k) http://www.shrani.si/f/27/bY/43hIIUOh/untitlefd.png I really dont know what to do anymore, please, help! :cry:
QC:
Code: Select all
/*
----------------
Audi RS4 QC
----------------
*/

$modelname "vehicles/cars/nfss_rs4.mdl"
$cdmaterials "models\cars\shift_audi_rs4\"
$origin 0 0 0 90
$scale 1.0
$opaque
$body "Body" "Reference.smd"
$bodygroup Body2
{
   studio "reference2.smd"
}
$surfaceprop "metal"
$noforcedfade

$include "rs4_shared.qci"

Re: crashes if going over 37k polys

PostPosted: Sat Aug 13, 2011 3:48 pm
by TheDanishMaster
First export your car to obj and then reimport, texture and export to smd

Porting from games requires tools coded by russians and they usually mess up somethings.

Re: crashes if going over 37k polys

PostPosted: Sat Aug 13, 2011 5:52 pm
by Terraviper-5
That worked actually :D It has roughly 1500 polys less after this, but it compiles. Materials got completely screwed though http://www.shrani.si/f/1N/r0/2hFiTyz3/untitledd.png (I could texture again but it would be very hard since it has 30 materials, would it be better to separate parts with different materials before exporting? If so Ill port it again and do this while it isnt merged yet). Is there any special setting on import or export? http://www.shrani.si/f/h/7e/eezYaKe/ddasdd.png
But thanks a bunch, you gave me hope back :3

Re: crashes if going over 37k polys

PostPosted: Sat Aug 13, 2011 9:55 pm
by TheDanishMaster
You should probably just export it in multiple parts if you find that easier. And don't mess with import/export options (bad idea)

Re: crashes if going over 37k polys

PostPosted: Sun Aug 14, 2011 10:20 am
by kraid
Polycount doesn't matter that much, the important thing is the vertex count.
There can be a huge difference of the vertex count even on simple objects.
Example a cube has 12 polygons, if it has a single smoothing group, there are only 8 vertics, but if every polygon is in it's own smoothing group, it's 12x3 so 36 vertics.
From what i see in your pics, you got a very detailed car which has more or less correct smoothing, so there shouldn't be to much space to optimize it any other way then reducing the overall polycount.

Ofc. you can try and split up the model into seperate pieces and combine them with bodygroups, this should allow you to bypass the max. vertex count.

But optimizing your model should be the first step.
e.g. is it really necessary to have 30 materials? You should combine them into as few as possible.
One for the car body, one for the windows, one for the tire and maybe one for the interior.
This could also be your bodygroups setup.