Posts Tagged ‘3dsmax’

XNA Cruiser? One “Bump” or Two?

2010/11/28 Leave a comment

I just love pipelines and Lumonix Shader FX makes no exception.  Yesterday I started off with a rather humble shader but today let’s beef it up a bit with a bump map to give it more of a 3-D look.  Here is the shader as seen in 3DS Max and Shader FX:


…and here it is in my space simulator:


That’s looking a bit better, though I must admit it needs a bit of colour and perhaps some glass effects – something for a future project. We noobies have to start somewhere.

Categories: SpaceSim Tags: , , , ,

Be Gone Wireframe – Hello Space Cruiser!

2010/11/27 2 comments

Vanquish 2010-11-27 15-44-45-87Today I spent time on my scene mechanics and imported a new space ship model to replace the test ring place-holder that I was using for the autonomous steering behaviour programming.  It served it’s purpose by indicating the steering, velocity and normal vectors but I know those around me were wanting to see a spiffy model. Anyway I found a rather nice free 3DS model by Mace24de (thanks buddy) on TurboSquid. Loading this into Max it was just a case of giving it a good paint job via Lumonix Shader FX via an interactive pipeline building process. Gotta love Shader FX. 


As you recall in a previous post, Shader FX is a must have for the generation of HLSL GPU shaders in the form of .FX files for use in the likes of XNA.  I’ll just do something fairly simple for now though – a diffuse texture map with a touch of glossiness should be a good start.  Later I’ll plonk in a normal map to make it more interesting.  Here’s a shot of Shader FX in 3DS Max.


…now let’s apply that to our model via Tools/Apply to Selection in Shader FX:


That’s more like it. Now let’s export the shader for XNA. In Shader FX choose File/Export FX…


Select XNA from the appearing dialog.  Make sure you pick Y-Up too – that is a requirement for XNA.


Remember that the XNA shader must be a different filename to the one being used in 3DSMax.  I like to merely give the XNA files a “XNA” suffix.  A no brainer Winking smile


…export your model. Make sure just your model is selected, no lights/cameras/etc. please unless your pipeline can handle that. Choose File/Export/Export Selected in 3DSMax:


Export as a FBX using Autodesk’s FBX export tool (its a free download from their site). My settings is pretty much the defaults except I’ve deselected cameras, animations etc. for now as I can’t handle them anyway). We don’t want cameras or lights because we’ll be doing that in game.


Eventually this gets into my game using my custom content importer pipeline for FBX that reattaches textures, FX etc. to achieve the following result. I only have to include the .FBX file in my Visual Studio project – there is no need to directly specify the FX, textures or other files because my custom pipeline finds them by reading the info in the original FBX file.  This is handy because I can leave shared art on a different drive and use it in other projects.  Yippee!

Here we are just to the side:

Vanquish 2010-11-27 15-31-53-11


Coming in for the kill!

Vanquish 2010-11-27 15-44-45-87


From above:

Vanquish 2010-11-27 15-47-24-01

Categories: SpaceSim Tags: , , , ,

XNA Sanity Check

2009/08/22 Leave a comment

Over the past few years I’ve had an on-again off-again affair with the now defunct Microsoft Managed DirectX (MDX) then XNA (no there is no acronym).  My interest has generally been making a modeller for editing all things 3D but usually resulted in me getting stuck on something or other or leaving in a huff to play an equally frustrating pastime – WoW.

Recently I’ve come back to XNA, XNA 3.1 to be exact and have found it to be rather good with lots of useful features to allow novices such as myself to create something pretty darn good. That’s the theory anyway.  After one gets tired of creating spinning teapots, you discover how ridiculously hard it is to say:

  • Create a model in either XSI Mod Tool or 3DS Max (my preference)
  • Create model materials such as plastics, metals, enviro maps and so on
  • Export it in a format that XNA supports
  • Find out why the imported model in XNA has lost all materials!
  • Find the best model file format

Case in point – importing a model with custom HLSL effects usually results in surface-challenged blank model.  One idea is to make a custom model processor pipeline component that can read all the effect and material metadata.  If you are keen on the X file format (no I don’t mean Mulder and Scully), well stiff bickies because X apparently does not include string names for materials.  FBX does!  At this stage of my feeble knowledge, I can not fathom why many people keep pushing X over FBX in XNA (maybe it’s because X is Microsoft?).  Then again, many of the tutorials from the XNA website use FBX anyway. Hmm.  Maybe I’ll learn later.  I would have thought materials to be pretty important though.

So, as I write this down, I have discovered after many frustrating weekends, how mind-bogglingly difficult it has been to start with something in say 3DS Max and end up with a wonderful looking model in my XNA application.

Now there are many so called XNA tutorials out there, but in my opinion they are so basic as to offer no use in a realistic game, or far too complicated that during the explanation of solving a problem they mention far too many other things that just leaves you even more confused.

Stay tuned.

Categories: Development Tags: , , ,