View Single Post
Old 09-18-2008, 06:18 PM   #1
Rao Dao Zao
www.raodaozao.net
 
Rao Dao Zao's Avatar


MDL & Resource Moderator
 
Join Date: Aug 2003
Posts: 2,511

Submissions (27)

Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)Rao Dao Zao has a brilliant future (822)

Approved Map: When the Freedom Slips Away

Send a message via MSN to Rao Dao Zao
Default Essentials: Things In Models That Make the Game Crash

1. GeosetAnims With No Geoset
This problem most commonly occurs when you're removing geosets from an existing model using Magos' Model Editor. Upon deleting a geoset, the program will automatically null values in other model objects relating to the deleted object -- it removes any reference to the dead object. While we frequently love this behaviour, in the case of a GeosetAnim it can be fatal.

GeosetAnims that refer to non-existant Geosets (eg GeosetId 5 when you have only 3 Geosets) should also be avoided.

The MDL code of a "broken" geoset looks something like this:
Code:
GeosetAnim {
	Alpha 8 {
		DontInterp,
		25000: 1,
		85000: 0,
		159967: 0,
	}
}
Note the lack of a "GeosetId X," line -- without this, the model will cause a crash. The solution is to delete the GeosetAnim entirely or re-assign it to an existing geoset.

In Magos', a dodgy GeosetAnim's "Geoset" drop-down will be marked "None".

2. RibbonEmitters With No Material
A problem similar to the above, this is rather more likely to go unawares and ruin everything because nobody pays much attention to ribbon emitters. It's going to occur again when you delete "unnecessary" objects; removing the material that a ribbon refers to will see the value held in the Ribbon Emitter nulled.

RibbonEmitters that refer to materials that don't exist (eg MaterialId 6 when you have only 2 Materials) should also be avoided.

A broken RibbonEmitter will look like any other, except that it will be missing a "MaterialId X," line. The solution is to delete the RibbonEmitter or assign it to a new material.

In Magos', a broken RibbonEmitter's "Material" drop-down will be marked "None".

3. Negative Maxes and Positive Mins
This is a more ephemeral issue that doesn't always occur; it happened to me when working with the Marine and the Tauren Chieftain.

The problem here is with the "Extents" sections that appear throughout any model -- in the Model section, in every Sequence, and in Geosets. These extent values allow the game to work out when the model is off screen, and can be safely "culled". You might have noticed that when you over-scale some units they disappear before they are completely off the edge of the screen -- this is them being culled.

Code:
	Anim "Birth" {
		Interval { 41, 833 },
		NonLooping,
		MinimumExtent { -24.5901, -40.2246, 34.4112 },
		MaximumExtent { 30.8934, -47.7023, 167.684 },
		BoundsRadius 98.65,
	}

The problem above lies in the fact that there is a positive "min" value and a negative "max" value. The simple solution is just to swap the signs as necessary, though you can also use the "Recalculate Extents" option in Magos' Model Editor.

4. Team-Coloured Particle Emitters
By "team-coloured particles", I mean particles that use ReplaceableId 2 (team-colour glow texture) instead of a specific texture.

This is another ephemeral one, and I've never done any extensive testing in order to narrow down the problem -- so any information you might have on the subject would be appreciated. The problem with team-coloured particles is that in some cases they do work perfectly well -- for example, the Priestess of the Moon's Owl Scout has team-coloured particles on its wings.

5. Extreme Polycount
This isn't necessarily a model editing issue, but it's worth noting that a single model with a number of triangles in excess of several hundred thousand will cause the game to crash.

6. Billboards and No Sequences
This is an odd one. I've long held that having no sequences section (at all, not just one stand sequence like all doodads) was a bit iffy, and some recent testing proves it is squiffy... in some circumstances. If you want to have a bone Billboarded, the model requires at least one sequence or it will crash the game!

7. Anything Else?
Have you discovered anything else that might cause a model to make the game crash? Let us know!
__________________
Rao Dao Zao is offline   Reply With Quote
Sponsored Links - Login to hide this ad!