Discussion in 'Tools programming' started by decapod, 21/10/08.
A MDL file viewer for FSX models
Still early days. The different colours indicate drawcalls.
That looks interesting. Will it also do scenery models?
That does look very good. Are you using DirectX to render?
Any MDL generated by XtoMDL will work.
It reads the 141000 poly Beaufighter correctly.
BGL Object Library files may be supported at a later date
I'm using the SlimDX DirectX9 library with .NET so I may be able to load the FSX included shaders at some point in the future.
Interesting. I wrote a utility called LOV (library object viewer) for FS9 using DX9 directly to read scenery mdl files but never got around to updating it to FSX. Not seen the SlimDX library but sounds like it might have made the job easier!
SlimDX is just a thin wrapper around DX9/10 for .NET developers. It just saves having to use C++.
Speed is not essential for model viewers, but reliability and maintainability are more useful if you distribute code around the world.
I wrote something similar for Train Sim 1 using VB6 and DX8 back in 2003.
Yes, I think this is certainly interesting.
My ModelConverterX tool can also load (and thus visualise) MDL objects. I have had some users already who only used it as a viewer and not as a converter.
But I think there will certainly be people interested in such a viewer. Did you already get to LODs and animations? I got them working basically, but I am wondering if you might have found some more details about them already.
LOD's work well, I now have a combo box so you can just select the LOD and the display changes.
I'm just updating the user interface then I'll put out a beta version.
Along with finishing off my first freeware aircraft and writing a tutorial for 3D canvas modellers, as well as a full time job - there are not enough hours in the day.
Sounds familiar . Looking forward to the beta version.
Animation streams and visibility tags next...
That is looking very good Paul
Let me know if you need help with the animations. I have figured out a big part already, but didn't have the time yet to update the Wiki. Would be a waste if you have to re-invent the wheel on that.
Thanks for the offer Arno, the animations are a direct conversion from the xanim file so they shouldn't present a problem.
I'll split them into "streams" so they can be run independantly.
Here's the latest - I had the ambient lighting turned off in the last pic.
This one shows a 141k poly model which took a few seconds to load.
This will be a repainter's wet dream!
Excuse my ignorance on this- The number of draw calls directly relates to performance doesn't it?
The reason I ask is I use a slightly different method of modelling my aiports (using Sketchup which doesn't work with 'solids'- only faces) and am wondering what effect it has on performance. Ive only really tackled small airports and using the in game FPS drop isnt really accurate enough...Id like to be able to say compare the drawcalls/performance between a cube created and textured in Gmax to one created and textured in Sketchup (then then exported to 3ds, imported to Gmax and material definitions reapplied using the existing mapping)
Looks like a great tool
Arno already wrote a small program the DrawCallMonitor which will show the number of draw calls and polys in an FSX MDL file.
You should be able to find it under the ModelConverterX forum.
I think you'll find the results are identical. Exporting from sketchup creates the faces as triangles (polygons) which is what 3DS and Gmax use to build the mesh.
I have some experience of sketchup, having written an exporter for models to MS Train sim 1, at some point I may do a similar export direct to FSX (and TS2)
Ok ill check it out- An exporter straight from SU would be great for simple scenery models.
There are a couple of FSX features which (to my knowledge) can only be added via Gmax: FSX materials (night maps, reflection maps etc) and self shadowing.
I haven't been able to get self shadowing working (objects not manifold....presumably because they are faces not solids?) and have to re create the textures in GMax to get FSX materials. I still find texturing and modelling in SU far far easier than gmax for most things.
I've not had much time to work on this due to modeling commitments but I thought others may like to have a play with the current beta version.
Most true FSX models load OK although a few still reference BMP files as textures.
I've written an FS-BMP reading function so some of the old texture formats do load.
Arno - you're welcome to host it on the FS Developer site too.
I presume there are no plans for a FS9 version?
Separate names with a comma.