I'm working on a new feature for SAMM2. What I'm trying to do is create a shadow for the static models using the lowest LOD (normally LOD5 for aircraft) so as to avoid the overhead of the sim computing the shadow based on the rendered model. Things aren't going so well!
For FSX, I presume this is what the SHAM section of the model file is for. (I'll worry about FS9 later.) According to the FSX .mdl format described in the Wiki, the SHAM section is to contain the same sections as the MDLD section. So, other than textures and materials which I presume are not needed for a shadow, I have copied the following sections from the rendered model into the SHAM section:
So, it seems the simple presence of a SHAM section with these contents is not enough.
Any help appreciated.
Don
For FSX, I presume this is what the SHAM section of the model file is for. (I'll worry about FS9 later.) According to the FSX .mdl format described in the Wiki, the SHAM section is to contain the same sections as the MDLD section. So, other than textures and materials which I presume are not needed for a shadow, I have copied the following sections from the rendered model into the SHAM section:
- INDE (unmodified),
- TRAN with transforms modifed to reflect the "pose" specified by the user,
- a VERB section header followed by the VERT buffer of interest, with empty buffers for the others to preserve indexing,
- AMAP (unmodified)
- SCEN (unmodified)
- SGAL (all -1s)
- SGVL (all -1s)
- SGJC (unmodified)
- SGBR (unmodifed)
- ANIB (empty save for the header)
- LODT containing only the LODE section for the lowest LOD
So, it seems the simple presence of a SHAM section with these contents is not enough.
Any help appreciated.
Don