I would think so yes. I would only be worried about the maximum model count
(if there is such a thing). Otherwise, that makes a bit more sense actually
:)

- Aditya

On Sun, Mar 8, 2009 at 9:11 PM, Minh <[email protected]> wrote:

> I sometimes use models that are more than 20 convex pieces. Would it be
> more efficient if I broke those models up into smaller models? So if a
> traceline hits one of the submodels, it only has to check that model's
> group of convex pieces.
>
> Jay Stelly wrote:
> > It's compiling each face as a separate convex because the normals aren't
> smooth.  Set a single smoothing group for each piece that you want to be
> separate and it should work fine.
> >
> > Note that you can also configure studiomdl to output the 76-hull model
> it's computing (which would work too) but that would be really slow for
> physics and traces, that's why it detects and prints out an error.
> >
> >
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]] On Behalf Of
> >> Aditya Gaddam
> >> Sent: Saturday, March 07, 2009 7:18 AM
> >> To: Discussion of Half-Life Programming
> >> Subject: Re: [hlcoders] Compiling a "complex" static prop -
> >> Weird collision boxes
> >>
> >> Hi,
> >>
> >> Sorry it took me so long to get back to this. I tried out
> >> what people said - making edges hard. I checked the normals
> >> and they seem to pointing the right direction (they all point
> >> where the polys face. My output for studiomdl is:
> >>
> >> ===============================================================
> >> ===============================================================
> >>
> >> "C:\Program
> >> files\steam\steamapps\[email protected]\sourcesdk\bin\orangebox\
> >>
> > bin\studiomdl.exe"
> >
> >> -game "C:\Program Files\Steam\steamapps\SourceMods\Tactics"
> >> "E:\Documents\Work\Programming\C++\Tactics\modelsrc\map\walls\
> >>
> > floor_stairs.qc"
> >
> >> Process started >>>
> >> WARNING: AppFramework : Unable to load module p4lib.dll!
> >> qdir:
> >> "e:\documents\work\programming\c++\tactics\modelsrc\map\walls\"
> >> gamedir: "C:\Program Files\Steam\steamapps\SourceMods\Tactics\"
> >> g_path:
> >> "E:\Documents\Work\Programming\C++\Tactics\modelsrc\map\walls\
> >>
> > floor_stairs.qc"
> >
> >> Building binary model files...
> >> Working on "floor_stairs.qc"
> >> SMD MODEL floor_stairs_ref.smd
> >> SMD MODEL floor_stairs_idle.smd
> >> SMD MODEL floor_stairs_phys.smd
> >> WARNING: Model has 2-dimensional geometry (less than 0.500
> >> inches thick on any axis)!!!
> >> ...
> >> exactly 76 of these
> >> ....
> >> WARNING: Model has 2-dimensional geometry (less than 0.500
> >> inches thick on any axis)!!!
> >> WARNING: COSTLY COLLISION MODEL!!!! (76 parts - 20 allowed)
> >> WARNING: Error with convex elements of floor_stairs_phys.smd,
> >> building single convex!!!!
> >> Model has 1 convex sub-parts
> >> Collision model completed.
> >> ---------------------
> >> writing C:\Program
> >> Files\Steam\steamapps\SourceMods\Tactics\models/map/walls/floo
> >>
> > r_stairs.mdl:
> >
> >> bones          964 bytes (1)
> >> animations     112 bytes (1 anims) (1 frames) [0:00]
> >> sequences      220 bytes (1 seq)
> >> ik/pose        164 bytes
> >> eyeballs         0 bytes (0 eyeballs)
> >> flexes           0 bytes (0 flexes)
> >> textures       136 bytes
> >> keyvalues        0 bytes
> >> bone transforms        0 bytes
> >> Collision model volume 4907876.50 in^3
> >> collision        0 bytes
> >> total         1916
> >> ---------------------
> >> writing C:\Program
> >> Files\Steam\steamapps\SourceMods\Tactics\models/map/walls/floo
> >>
> > r_stairs.vvd:
> >
> >> vertices     20400 bytes (425 vertices)
> >> tangents      6800 bytes (425 vertices)
> >> total        27264 bytes
> >> ---------------------
> >> Generating optimized mesh "C:\Program
> >> Files\Steam\steamapps\SourceMods\Tactics\models/map/walls/floo
> >>
> > r_stairs.sw.vtx":
> >
> >> body parts:         8 bytes
> >> models:            20 bytes
> >> model LODs:        12 bytes
> >> meshes:            18 bytes
> >> strip groups:      50 bytes
> >> strips:            54 bytes
> >> verts:           3825 bytes
> >> indices:         1488 bytes
> >> bone changes:      24 bytes
> >> everything:      5523 bytes
> >> ---------------------
> >> Generating optimized mesh "C:\Program
> >> Files\Steam\steamapps\SourceMods\Tactics\models/map/walls/floo
> >>
> > r_stairs.dx80.vtx":
> >
> >> body parts:         8 bytes
> >> models:            20 bytes
> >> model LODs:        12 bytes
> >> meshes:            18 bytes
> >> strip groups:      50 bytes
> >> strips:            54 bytes
> >> verts:           3825 bytes
> >> indices:         1488 bytes
> >> bone changes:      24 bytes
> >> everything:      5523 bytes
> >> ---------------------
> >> Generating optimized mesh "C:\Program
> >> Files\Steam\steamapps\SourceMods\Tactics\models/map/walls/floo
> >>
> > r_stairs.dx90.vtx":
> >
> >> body parts:         8 bytes
> >> models:            20 bytes
> >> model LODs:        12 bytes
> >> meshes:            18 bytes
> >> strip groups:      50 bytes
> >> strips:            54 bytes
> >> verts:           3825 bytes
> >> indices:         1488 bytes
> >> bone changes:      24 bytes
> >> everything:      5523 bytes
> >>
> >> Completed "floor_stairs.qc"
> >> <<< Process finished.
> >> ================ READY ================
> >>
> >> The following two screenshots show what the collision mesh looks like:
> >>
> >> from the top:
> >> http://screenshot.xfire.com/screenshot/large/4bd205d2698d681f8
> >> 73d2238c2de6ee806ef4a49.jpg
> >> from the bottom:
> >> http://screenshot.xfire.com/screenshot/large/55a0bbc2167dfbb3e
> >> 771dc78b16bb7c038b2be9b.jpg
> >>
> >> (ignore the broken material)
> >>
> >> The following screenshots show normals:
> >>
> >> http://upload.pixelfaction.com/files/49b28ff8_Capture.PNG
> >> http://upload.pixelfaction.com/files/49b28fe5_Capture1.PNG
> >>
> >>
> >> Does anyone have any idea why studiomdl thinks all my parts
> >> are 2 dimensional? Does the collision model depend at all on
> >> the ref model?
> >>
> >> Thanks,
> >> Aditya
> >>
> >>
> >> On Wed, Mar 4, 2009 at 5:03 PM, Jay Stelly
> >> <[email protected]> wrote:
> >>
> >>
> >>> You should only have one $collisionmodel statement.  Studiomdl does
> >>> not support aggregating those.
> >>>
> >>> You didn't post any output.  studiomdl must be reporting an
> >>>
> >> error if
> >>
> >>> it's falling back to a single convex hull.  What is the
> >>>
> >> error?  Post the output.
> >>
> >>> There are two likely cases:
> >>>
> >>> 1) The smoothing group suggestion.  There's a simple vertex welding
> >>> algorithm in the collision model code that requires you to share
> >>> normals at vertices to have those faces belong to a single convex.
> >>> This is why you have to set smoothing groups.
> >>>
> >>> 2) Too many convex pieces.  The default is 20 (I think 40
> >>>
> >> in l4d on).
> >>
> >>> This is a budget, the physics system can support large numbers but
> >>> performance may be a problem.  Anyway, you can set this in
> >>>
> >> your script
> >>
> >>> with
> >>> $maxconvexpieces:
> >>>
> >>> $collisionmodel    "floor_stairs_floor_phys.smd"
> >>> {
> >>>    $concave
> >>>     $maxconvexpieces 100
> >>> }
> >>>
> >>> Jay
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: [email protected]
> >>>> [mailto:[email protected]] On
> >>>>
> >> Behalf Of Aditya
> >>
> >>>> Gaddam
> >>>> Sent: Wednesday, March 04, 2009 5:15 AM
> >>>> To: Discussion of Half-Life Programming
> >>>> Subject: [hlcoders] Compiling a "complex" static prop - Weird
> >>>> collision boxes
> >>>>
> >>>> Hi,
> >>>>
> >>>> I am currently trying to compile a "complex" static prop. I say
> >>>> "complex"
> >>>> because it is basically the little stairway prop shown in this
> >>>> screenie:
> >>>>
> >>>> http://upload.pixelfaction.com/files/49ae7dad_stairs.jpg
> >>>>
> >>>> It is however being a PITA to export.
> >>>>
> >>>> Just exporting the same merged mesh as the ref, idle and
> >>>>
> >> phys smds
> >>
> >>>> didn't work out. I get a "shrinkwrapped" (as the wiki called it)
> >>>> collision model out of studiomdl.
> >>>>
> >>>> I then tried exporting the phys smd as several phys smds, each
> >>>> containing a piece of the model positioned from the origin in the
> >>>> right place. So I exported a stairs_floor_phys.smd,
> >>>> stairs_toprail_phys.smd etc and then changed the qc file to this:
> >>>>
> >>>> $modelname "map/walls/floor_stairs.mdl"
> >>>> $body "floor_stairs" "floor_stairs_ref.smd"
> >>>> $surfaceprop concrete
> >>>> $cdmaterials "models/map/walls/1/"
> >>>> $sequence idle "floor_stairs_idle.smd" loop fps 15 $scale 1.0
> >>>> $collisionmodel    "floor_stairs_floor_phys.smd"
> >>>> {
> >>>>     $concave
> >>>> }
> >>>> $collisionmodel    "floor_stairs_toprail_phys.smd"
> >>>> {
> >>>>     $concave
> >>>> }
> >>>> $collisionmodel    "floor_stairs_bottomrail_phys.smd"
> >>>> {
> >>>>     $concave
> >>>> }
> >>>> $collisionmodel    "floor_stairs_stairs_phys.smd"
> >>>> {
> >>>>     $concave
> >>>> }
> >>>> $staticprop
> >>>>
> >>>> This didn't work out well either. Only the stairs seemed to get a
> >>>> collision mesh and it was funky (some of the stairs worked like
> >>>> stairs, others had holes in the mesh at random places (my
> >>>>
> >> grenades
> >>
> >>>> would go through to the
> >>>> floor) and others were just covered by a flat plane type
> >>>>
> >> collision
> >>
> >>>> mesh.
> >>>>
> >>>> What is the right way to go about these kinds of meshes? Any
> >>>> pointers would be appreciated. Tutorials I have seen
> >>>>
> >> online always
> >>
> >>>> work with very simple props like a barrel etc.
> >>>>
> >>>> Thanks,
> >>>> Aditya
> >>>>
> >>>> --
> >>>> http://www.pixelfaction.com
> >>>> AIM:ApeWithABrain
> >>>> _______________________________________________
> >>>> To unsubscribe, edit your list preferences, or view the list
> >>>> archives, please visit:
> >>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>>>
> >>>>
> >>>>
> >>> _______________________________________________
> >>> To unsubscribe, edit your list preferences, or view the
> >>>
> >> list archives,
> >>
> >>> please visit:
> >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>>
> >>>
> >>>
> >> --
> >> http://www.pixelfaction.com
> >> AIM:ApeWithABrain
> >> _______________________________________________
> >> To unsubscribe, edit your list preferences, or view the list
> >> archives, please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >>
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
http://www.pixelfaction.com
AIM:ApeWithABrain
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to