Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Adam Bryant, posted on February 26, 2005




Image Description, by Adam Bryant



GLoadX is a 3DS model viewer that was developed over several months as the core of my CV (my demo). It is comprised of two identical windows that simultaneously render in OpenGL and DirectX. It should give artists a good idea of what their models will look like when rendered in-game without needing to export to and load from an arbitrary format.

You can download GLoadX at http://www.skullbonez.com/gloadx/downloads.htm

Features:
  • Handles many of the intricacies in the 3DS model format resulting in a high success rate loading models.
  • Supports keyframe animation.
  • Supports smoothing groups.
  • Simultaneously displays models in OpenGL and DirectX.
  • Simple uncluttered resizable user interface.
  • Supports multisampling (for cards that support it).
  • Support single pass texturing with BMP, JPEG and TGA images.
  • Menu options to change light mode, primitive, show normal vectors, display model and loading information.
  • Performs many optimisations during load time (removing duplicate vertices, animation nodes and materials, removing superfluous keys from the keyframe hierarchy, splitting complex facelists etc).
  • Can render with or with out keyframes to support 3DS models without animation that contain key frames but do not use them to locate model elements (these models will look wrong in 3D Studio Max but correct in Bryce).
  • I have put a lot of work into trying get GLoadX models to match 3D Studio Max. I've tested 354 models and about 95% of these are correct. Of the 5% of models that don't match, most of the problems are minor^ eg smoothing group errors or material differences. I will be investigating these problems further over the next few weeks.

    Beyond that, I am planning on adding support for bump-mapped models (assuming I can find any) and adding stencil shadow volumes.

    I am keen to hear any feedback, particularly from those that have battled with the insides of the 3ds format before. As this is also my 'demo' I would also welcome any comments regarding its appropriateness for the task (keep in mind I am aiming for an entry level programming position).

    Adam Bryant


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
     
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
     
    Rhinoid

    February 26, 2005, 11:45 AM

    Just to be curious...

    what kinds of differences between opengl and directx rendering do you expect to see? I can't see any differences with the displayed models on the iotd picture.

    I even overloayed both images in photoshop to see the differences but the only ones are some unnoticable things on the edges of the object which could very well have to do with the subpixel mispositioning of them.

    Reinier

     
    dgreen02

    February 26, 2005, 11:58 AM

    Has a Slick interface and loaded all my test models perfectly. I've been looking for a program like this lately...you did a great job on it, looks very clean and professional.

    - Dan

     
    dgreen02

    February 26, 2005, 01:36 PM

    Actually, there is one thing you should do. You should rename the title bar of the window to "GLoadX - c:PathFilename.3ds" once you load a model, that would be kind of helpful.

    Also, some of the models I've loaded appear very dark, while some groups in the model are very bright (almost like there are no lights in the scene and only ambient colors are being used, no highlights or anything...and some groups are set to a low ambient color while others are set the the highest ambient color....or it looks almost like backface culling is disabled and you're drawing the backfaces always, need to reverse the winding order of the dark groups)...hope that's a decent description of the problem...good work.

    - Dan

     
    Jacco Bikker

    February 26, 2005, 01:38 PM

    Rhino: The differences at the edges are probably jpg artifacts. So there's no difference at all, probably.

    I think this would be quite a nice demo for an entry level programmer. Being able to work in both DirectX and OpenGL is nice, and the tool you made shows quite some dedication.

    But it would be nice if you could show differences between the two API's. Perhaps you can show rendering times?

     
    Freds

    February 26, 2005, 06:52 PM

    I thought the loader could really help artists when looking at art work, see how the art well "feel" in a real time enviornment. Great work Adam.

     
    Skirmish

    February 26, 2005, 07:03 PM

    Rhinoid: both windows should be identical at least in terms of vertex placement. There may be a perceivable difference in texture filtering as GLoadX queries the gfx card and selects the best filter mode. I am glad they look the same on your machine as that was one of my goals.

    Dan: good idea about the window title, will add that now. Not sure what the problem is with some models looking too dark/bright. Shouldn't be winding but it could be the smoothing group problem I had with about 4% of the models I tested. Since I sent this demo off to flipcode I have resolved some issues with smoothing groups but I haven't been able to upload the new exe to the website as the host decided migrate their servers this weekend which has locked the GLoadX webspace. I'm glad you liked the interface, it is the 3rd design I've had and doesn't use MFC.

    Jacco: thanks for the feedback. There is a frame stats function in GLoadX (fps, slow and fast frame count) but I disabled it when I changed my render mechanism. Originally GLoadX rendered in a continuous loop but this thrashed the CPU even when the scene hadn't changed. I modified it to only update when the scene changed but the existing frame stats didn't make sense with the new render method. I will just change it so moniters the actual render times, not the total time elapsed.

     
    GiantMilkyTea

    February 26, 2005, 08:01 PM

    I tried to create my own 3ds loader about a year ago, and I had to pull the plug - it was waaaay to hard for me :( Which is why this is VERY impressive indeed.

    I am currently doing some game modelling for a small mod project (team of 6) and I will be showing this to everyone. I just ran some models in that I'm developing, and they rendered perfectly. It was quite handy as I could compare two different models I had created, one of which I had just optimised, and was glad to see looked just as good, even though I had cut out a few hundred polys.

    A very slick, professional job, well done!

     
    skullbonez

    February 26, 2005, 11:14 PM

    This is VERY impressive - I am yet to find a real time 3ds loader that has an almost perfect success rate - you must know the 3ds file format like the back of your hand, which is also damn impressive since as it is an undocumented proprietary format.

    Well done on the keyframe animation too. Is this the only 3ds loader out there that can ACTUALLY do it completely dynamically? (I know DigiBens one was hard coded for instance).

    I can see this tool really helping artists produce higher quality models - you should develop and API out of this - I could imagine programmers getting a huge amount of use out of this - it has the potential to become a very very popular API.

    I see this as a great contribution to game developers everywhere - and not only have you helped artists with this - an API would help the coders too! It is rare people can hit two birds with one stone like that.

    Fantastic job - congratulations - and thank-you for offering this as a free tool - I will get a lot of use out of it!

     
    RickA

    February 27, 2005, 03:34 AM

    Very impressive indeed. I've worked on my own 3DS loader, and I've come across many files that none of the tutorial sites could load correctly. I'm still fiddling with it.

    Good luck with the job hunt.

     
    knackered

    February 27, 2005, 05:20 PM

    Err...I think you're overstating it's importance a little bit, to say the least!
    Most people export to their own formats, y'know...I'm trying to remember the last time I saw any 3ds files in my professional life....more for amateurs who can't/don't want to write exporters for the popular modelling packages.
    But hell, if you'll find it useful, you go girl!

     
    GiantMilkyTea

    March 02, 2005, 08:23 PM

    Well that post was a complete waste of space. Didn't your mummy ever tell you "If you've got nothing nice to say, then don't say anything at all". Hmm?

     
    defiance

    March 03, 2005, 07:30 PM

    I just wanted to say that this is a great piece of work and a very useful application. It has loaded all of the models I have tried so far with no problems.

    I did have some questions though:

    - How are you creating a window with both OpenGL and DirectX rendering?
    - Is there any information on what one needs to consider when doing this?
    - Is it using one window, or a combination of child windows with various border style and positioning "work-a-rounds"?

    - Any considerations out of the norm taken for getting similar renderings under each API?

    - The help file mentions you use multiple threads; do you do any special synchronization between the two?
    - Any things to watch out for when using multithreading with these APIs?

    Thanks.

     
    Skirmish

    March 04, 2005, 06:45 PM

    Hey Defiance, thanks for your post. I'll answer your qs inline:

    > How are you creating a window with both OpenGL and DirectX rendering?
    GL and DX each render to seperate windows.

    > Is there any information on what one needs to consider when doing this?
    Just make sure you keep the windows together and that you move one or both window during a resize.

    > Is it using one window, or a combination of child windows with various border style and positioning "work-a-rounds"?
    You got it.

    > Any considerations out of the norm taken for getting similar renderings under each API?
    Yeah quite a few, but when it boils down to it, OpenGL and DirectX are very similar. The first step is aligning your coordinate systems. You can either account for this on every transformation or you can convert one of the APIs to the opposite of its native coord system so both windows will use the one coord system.

    > The help file mentions you use multiple threads; do you do any special synchronization between the two?
    Critical sections prevent any resource contention.

    > Any things to watch out for when using multithreading with these APIs?
    Yes! Make sure you allocate and deallocate your resources and API in the same thread that it is rendering in. GL will flat out fail if you say, load textures in another thread, but DX may let you get away with it but the DXDebugger will call you nasty names so its best not to.

    Cheers
    -A-

     
    This thread contains 13 messages.
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.