PDA

View Full Version : Is this of interest to anyone?


decapod
21 Oct 2008, 05:32
A MDL file viewer for FSX models

Still early days. The different colours indicate drawcalls.

http://www.atomic-album.com/showPic.php/22531/dx9test5.jpg

PakMac
21 Oct 2008, 05:38
That looks interesting. Will it also do scenery models?

David

scruffyduck
21 Oct 2008, 05:39
That does look very good. Are you using DirectX to render?

decapod
21 Oct 2008, 05:55
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.

scruffyduck
21 Oct 2008, 06:01
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.

Hi Paul

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!

decapod
21 Oct 2008, 06:09
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.

arno
23 Oct 2008, 10:21
Hi Paul,

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.

decapod
23 Oct 2008, 10:42
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.

arno
24 Oct 2008, 14:29
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.

decapod
30 Oct 2008, 12:16
Getting closer..

http://www.atomic-album.com/showPic.php/22531/dx9test6.jpg

Animation streams and visibility tags next...

scruffyduck
30 Oct 2008, 12:18
That is looking very good Paul

Golf-HotelDelta
30 Oct 2008, 12:21
Superb :wizard:

George

arno
30 Oct 2008, 16:03
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.

decapod
31 Oct 2008, 09:59
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.
http://www.atomic-album.com/showPic.php/22531/dx9test7.jpg/6 (http://www.atomic-album.com/showPic.php/22531/dx9test7.jpg)

n4gix
31 Oct 2008, 13:49
This will be a repainter's wet dream! ;)

Timmo
17 Nov 2008, 18:04
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

decapod
18 Nov 2008, 04:08
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)

Timmo
18 Nov 2008, 15:34
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.

decapod
12 Dec 2008, 05:11
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.

http://cid-06b528339820717e.skydrive.live.com/self.aspx/Downloads/MDLReaderSetup.zip

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.

Southwest
13 Dec 2008, 11:58
I presume there are no plans for a FS9 version?

Cheers

decapod
13 Dec 2008, 14:38
Unfortunately not - the format is just too different.

I'm also new to FSX with a view towards Train Sim 2 next year which is where my main interests lie so my efforts will be for supporting future formats.

arno
14 Dec 2008, 08:27
I do have plans to add FS2004 support to my ModelConverterX tool, so you can use that to preview such MDL files later. But at the moment it is not yet supported.

Timmo
16 Dec 2008, 22:02
Just to come back to my previous comments re- Sketchup

I was able to reduce the number of geometry vertices by over 50% by using a vertice weld- This is because the vertex for each corner of a cube is separate but coincident to the other face (i.e. twice as many vertices).

The UVW vertices are another area where things could be optimised but this is a lot more time consuming.

arno
17 Dec 2008, 12:49
Hi,

In the MDL files not only the vertex coordinates, but also the texture mapping has to be the same to give unique vertices in the MDL.

So if you cube has different texture mapping applied (different UV coordinates at the vertices), they still end up as different vertices in the MDL. Sometimes it can be a bit tricky to view the amount of vertices in an editing tool because of such issues.

decapod
27 Jul 2009, 08:40
A small patch for loading larger models is now available:

http://cid-06b528339820717e.skydrive.live.com/self.aspx/Downloads/MDLReaderSetup.zip

chrisal
01 Aug 2009, 13:19
Hi

Your beta won't run on my pc. Could it be because it's Vista and DX10?

Cheers
Chris

drdavid
02 Sep 2009, 15:26
Works fine with me, Paul - excellent - thanks! :D

BTW, how do you move the eye-point?!? :o

Cheers - Dai (EGFE). :cool:

decapod
03 Sep 2009, 04:19
To rotate, just left drag the mouse over the viewport, move - right drag, zoom - centre drag.