Help! Leaking 1 elements

Started by StickyfingazFo20, November 03, 2015, 03:45:12 PM

Previous topic - Next topic

StickyfingazFo20

Im trying to import an animated bridge that explodes to source.
but when i compile it i get this error message.

Building binary model files...
Working on "Bridge_Demo.qc"
SMD MODEL Bridge_Demo.smd
ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1)
ERROR: Aborted Processing on 'myproject/Bridge_Demo.mdl'
WARNING: Leaking 1 elements

This happens whether or not i try to compile it with sequences or not.
also if it makes a difference. i made the bridge in hammer then imported the vmf. made the animation on the vmf model and found out i wasnt able to pick it with the wallworm model tool. i then tried placing another model and adding the bridge as a selection. tried to compile and got the error. i then exported it as 3ds. this allowed me to pick it with the ww model tool but i still get same error when i compile.

https://minbox.com/gi/W0qXHIO/download 3ds scene

Joris Ceoen

#1
Hey, thanks for using the Wall Worm Model Tools!

About your problem, after opening the scene there seem to be a few things that I noticed right away:


  • Your model didn't have any valid textures (like tools/toolsnodra without the w, same for the 'concret' texture). Whether that is related to the fact that the scene is not mine originally, or it's an import from VMF or not, I will put this aside. In any event, you don't want to have LightmappedGeneric textures on your models, let alone Nodraw. Elements of your model that shouldn't be rendered should be removed manually, not by nodraw.
  • The model does not have any bones. You cannot export a model without assigning bones to the blocks moving away. EVEN in that case, it should normally just export as a static mesh without any movement.
  • IF you would assign a bone to each and every single element moving, you would hit the bone limit per model almost twice (I selected all the elements that were moving and there were over 240). The maximum amount of bones per single model is 128. If you get over this limit, the compiler will fail.
  • Lastly, it seems that your WWMT helper had the default 'myproject' folders in the materials and models paths. These should be changed to your liking rather than the default one (is optional, not really key to the problem here).

I cannot give you a clear indication by telling you "THAT is the problem", but I can at least tell you that turning this into a viable dynamic prop is impossible. You'll have to reduce the number of breaking elements to something below 128 (and, if possible, well below that). Alternatively, you could split up the model in 2 and divive the explosion among 2 dynamic props, although that asks a little more time (but not impossible and the only realistic way to go for your current model).

EDIT: Nvm, I found out. The problem is that the bridge has too many triangles. The polycount is around 32.5k and the triangle count is nearing 63k. The maximum amount for the Source Engine is around 32k, and that is considered exceptional by Valve and the Source Engine. The only solution is for you to complete remake the bridge, or optimise it. Generally speaking, the worst possible way of doing modeling would be to do it through Hammer (I assume you're using Propper?).

A few reasons why are listed below:

  • Terribly limited. You can only texture in a planar fashion, you cannot properly do organic models and the tools are just horrible.
  • Hammer has no idea about optimisation. Propper as a result doesn't either, and will create unnecessary extra triangles for no reason.
  • It will corrupt models with stuff like co-planar vertices and incorrect normals.
One example would be the pillars of the bridge. Even underneath the part where the bridge is still intact, the pillars are having tons and tons of 'broken pieces' for no reason. As it doesn't break, it could reduce its polycount by 95%.

I would suggest you to learn modeling and animations (with bones and rigging) before tackling such a difficult task. Please don't forget that the Source Engine is decades old compared to Unreal Engine 4 who is nearly doing everything automatically. Source is user friendly in its tools, but not limits, and you've hit a few limits on the strongest degree  :(

wallworm

Joris has useful information above but has one piece of incorrect info. So I'll clear it up some.

The misinformation is regarding adding bones. In reality, each node in your scene is a bone in the exported file. This scene is actually a perfect example of an animation that you can set up without using skin modifiers or extra bones.

If I were tackling this scene and sequence, I'd do this:

1) Use your original bridge model (before all the fragmentation) as a static prop for the parts of the bridge that do not move. In the graphic I'm posting below, it's the part highlighted with the green outline. That will reduce hundreds of bones (as the static prop will only be one bone). If you use the pre-fragmented model, you'll also lose many thousands of vertices and faces that are never seen. What you can do is place it where the exploded bridge is, move the timeline to the end, and now cut away from the original the empty space that collapsed.

2) Convert all the animated parts into 3 WWMT models (or more as you need) so that each model doesn't hit the bone limit.

3) Be mindful of those parts that fly too far from the model. There is a maximum range the model geometry can go from its origin. I don't know that limit off the top of my head.

Based on those tips, the graphic below should make sense to you.


StickyfingazFo20

Thanks, appreciate the detailed help. i managed to make it work by doing what you said however ive come across some new issues. i textured the non destructible model of the bridge and i got incorrect dimensions on some of the textures which where 4095 but importing them manually seemed to work. my main problem now is that i dont know how i would go about texturing the animated bridge since its all fragmented. i cant really texture it, then fragment it. cuz im unable to get similar or proper results. 

wallworm

I'd personally texture it before fragmenting. If you are using Rayfire for the fragmentation, there are settings to select only the fragmented sides. Just apply random noise textures close to the colors of the rubble. You may find that it will look just fine. But that's going to something you'll have to consider for what works best for you.

4095 is an invalid dimension. Are you sure it's not 4096? In any event, I'm not sure vtex.exe allows 4096. I think that WW Pro will automate exporting at that size, but I'll need to verify.

StickyfingazFo20

#5
Got it working. however im now having trouble with the collision model, ive tried multiple things even tried merging it with parts a previously working collision model but it still wouldnt work, and yes i have ticked concave, aswell as reset xform then turned it into a editable poly.  im now at a point where i cant even compile it anymore, (3ds just stops responding) and have no idea what i can do next. Also i read somewhere that if i fragmented with voronoi which i did. i could use the fractured objectcs themselves as the collision model for the animated fracture, but im not at that stage yet.
not sure exactly how to do that tho, do i just add it to collision like you normally would?.



In this scene i processed it with the hull helper in order to get it back to normal, previous to that i had used mass fx rbody modifiers.

https://minbox.com/gi/W0qXHIO/download

[edit] i fixed lighting issue on the model by collapsing it into a single model, however im not sure if i would need the seperate models of it for the collision to work (bones)

its gotten pretty messy in the selection set so heres the selections u might need to use.
Collisionwhole, the entire collsion model.
btriizz, the entire Ref model
part1animation - part4, all the animated fractured pieces.

SMF spam blocked by CleanTalk