Grenediac's Explanation of Mapfiles on IRC
Posted: Thu Feb 26, 2004 2:07 pm
ok, there are 3 parts to the model
there is the model index, the model meta, and the raw data
the model index is in the tag index and points to the meta
the meta points to the raw data, which contains the verts and indices for all of the model's submodels and
variations
now, when you rebuild a map...
the raw data portion does not work properly
let me get a link to show you how the mapfile works
http://www.halomods.com/projects/MapFor ... _level.htm
ok, you can see that there is the mapfile header, followed by the bsp
then the model raw data, which is followed by the index
after the index is the metadata
now, what happens during a rebuild
is that all of the meta data gets reorganized
but, the raw data doesn't
or something like that, im not exactly sure
so when mono did his library mod
he moved ALL of the raw data to the end of the map
from both source maps
which fixes the problem, but makes the mapfile really big
so you might ask why model injection "sort of" works
well, what happens is the raw data gets replaced by something that is not the same size
if you notice sometimes, model injection corrupts its own object and other nearby objects
and you get the jagged effect
that is because the raw data overwrote some other models raw data partially
which is also the reason the corruption changes when you get farther away
the raw data contains the verts and indices for different LODs
so one Level Of Detail may be corrupt, while others are fine
you have to update the headers if you change meta sizes
if you use the new SparkEdit to generate the offset lists
it includes the raw offsets for models
start and end
if you want to swap models, replace the raw data of one model that is larger than the one you are importing
"gui swaping"...what does that mean?
there is the model index, the model meta, and the raw data
the model index is in the tag index and points to the meta
the meta points to the raw data, which contains the verts and indices for all of the model's submodels and
variations
now, when you rebuild a map...
the raw data portion does not work properly
let me get a link to show you how the mapfile works
http://www.halomods.com/projects/MapFor ... _level.htm
ok, you can see that there is the mapfile header, followed by the bsp
then the model raw data, which is followed by the index
after the index is the metadata
now, what happens during a rebuild
is that all of the meta data gets reorganized
but, the raw data doesn't
or something like that, im not exactly sure
so when mono did his library mod
he moved ALL of the raw data to the end of the map
from both source maps
which fixes the problem, but makes the mapfile really big
so you might ask why model injection "sort of" works
well, what happens is the raw data gets replaced by something that is not the same size
if you notice sometimes, model injection corrupts its own object and other nearby objects
and you get the jagged effect
that is because the raw data overwrote some other models raw data partially
which is also the reason the corruption changes when you get farther away
the raw data contains the verts and indices for different LODs
so one Level Of Detail may be corrupt, while others are fine
you have to update the headers if you change meta sizes
if you use the new SparkEdit to generate the offset lists
it includes the raw offsets for models
start and end
if you want to swap models, replace the raw data of one model that is larger than the one you are importing
"gui swaping"...what does that mean?