Example #1
0
 void ComputeModelVertexLighting(SourceProp prop, VTXModel mdl, Matrix matrix, List<Vector4> lightmem, List<Color3> colors)
 {
     // for each vertex
     //for (int i = 0; i < mdl.Lods[0].Meshes[0].StripGroups; ++i)
     {
         //ComputeVertexLightFromSpericalSamples
         //Vector3 pos = mdl.Meshes[0].
     }
 }
Example #2
0
        public static VTXModel ReadModel(BinaryReader br, int offset, Model currentModel)
        {
            br.BaseStream.Seek(offset, SeekOrigin.Begin);
            VTXModel model = new VTXModel();
            model.num_lods = br.ReadInt32();
            model.lod_offset = br.ReadInt32();

            // Check for multiple LOD-levels
            if (model.num_lods >= 1)
            {
                // TODO
            }

            float distance = 0f;
            float lastDistance = 0f;
            // Process LODS
            model.Lods = new VTXModelLOD[model.num_lods];
            for (int i = 0; i < model.num_lods; i++)
            {
                model.Lods[i] = ReadModelLOD(br, offset + model.lod_offset + (i * 12), currentModel, i); // 12 bytes for VYXModelLOD
            }

            return model;
        }