Jubber

Hi there chaps - I'm fearful that this question has been asked before but lots of searching could not find it.

In essence - if I export a model in 3D studio Max (version 7) in both x and fbx format, neither displays using the (excellent - thanks guys) 3D sample code. That's not entirely true - the x file displays but completely white, the texture barely visible. The fbx file has the right texturing but many of the polygons are linked incorrectly, or have wandering vertices. The fbx is in some sort of binary format incidentally. Now, my question after all that intro - what exporters do people recommend for 3dsMax - for either FBX or X files Or is there some very stupid option I'm not turning on (eg - X file exporter's hidden Tipp-Ex all the lighting normals option, or the FBX exporter Randomise_The_Corners_For_Fun_And_Profit tickbox)

Any help gratefully received,

Cheers,

Robin Jubber

"Write the front-end menu system first - it is the spine of your game - all interaction flows from these simple choices. The developer who loves the gamer will write the menu system first. Everybody else will write it last, along with the sound system. The developer who hates himself writes the memory card code last." - The Games Guru



Re: XNA Game Studio Express exporting x and fbx files

WilderLand

Robin,

The first question is do you have the latest version of the FBX plug-in You should be using 2006.11. The latest version is available here.

I guess the other possibility is that you are using a 2 year old version of 3DS MAX, the latest version is 9 - there has been some changes with regards to the FBX format, but hopefully the plug-in will work.

 





Re: XNA Game Studio Express exporting x and fbx files

Jubber

With a bit of tinkering the x file exporter from Panda seemed to give me models with lighting and texturing, which was nice. However - the hidden surface removal does not seem to be working - I can see polys through the ones that should be eliminating them. As I'm new to 3D - I'm not sure where I need to look to fix this. Is the rendermode alterable and I need to turn on z-buffering Or is hidden surface removal calculated from vertex normals (er, or surface normals ) and I'm exporting them the wrong way round This could of course just be because my Max is out of date or that I know next to nothing about 3D artwork.

As an adjunct - is lighting calculated from normals too And if so, which ones

Cheers for any help

Robin Jubber

"Remember - APAC. All Producers Are .. well you can guess the rest." - the Games Guru





Re: XNA Game Studio Express exporting x and fbx files

ScaryJack

my exported maya(version 7) models( fbx and x) work fine with the sample code.

I just had a little bit trouble with the face normals because sometimes they are inverted.
Then you see the polygons that normaly should be hidden. You need to check this in your model...but i doní»t know where these settings are made in 3dsmax. an easy way to check this is if you turn backface-culling "on" in your 3dsmax...but doní»t ask me where;)
or try to invert all face normals...
but maybe i just misunderstood you and you have another problem...




Re: XNA Game Studio Express exporting x and fbx files

Jubber

I still have a problem with this. Using the sample code, if I load in p1_rocket.x to the sample code, that too has faces visible through each other. Am I doing something very wrong Is my 6600Gt perhaps to blame

Cheers,

Robin.

P.S. Exports using Blender also have the problem





Re: XNA Game Studio Express exporting x and fbx files

Jubber

Right - after much mucking about with exporters I thought I'd have another look at the code.

If you want to screw up the face normals in a 3D model - simply do the following before your 3D code -

spriteBatch.Begin(SpriteBlendMode.AlphaBlend);

// Draw some 2D stuff here, possibly using the sample code - or draw nothing!

spriteBatch.End;

And try drawing your 3D models here - it all breaks!

What!! !

How can this be If I send some 2D sprites down the pipeline, then render some 3D models, everything goes horribly wrong. Perhaps 2D sprites corrupt the z buffer, though I'm not sure how. I've tried it without SpriteBlendMode.AlphaBlend, but that makes no difference - and anyway, you need alpha for sprites. When I say "goes horribly wrong" - I mean faces appear through each other.

Is there some vital process I've missed My display code is mostly from the various samples, and I've tracked it down to just those two lines anyway. For ages I've been assuming Max and Blender are exporting incorrectly, that face normals are broken but it appears to be something more esoteric.

Cheers for any advice.

Robin.

"And Lo! On the fourth day of Beta the coder did say unto the Games Guru - 'No idea mate - it works on my machine!' - and thus it came to pass - the Games Guru did smite the programmer verily around the head" - the Games Guru Bible, chapter 9, verse 3





Re: XNA Game Studio Express exporting x and fbx files

creasso

Hi Jubber!

I sincerelly can't understand all your problem, if it's related to normals make sure that you uncheck the "Flip Normals" checkbox in the "3ds Max Objects" TAG from Panda export window when exporting (Just make the model look exactly like you need in the DX Viewport before exporting).

Another tip is check the alpha channel from your texture map, it needs to be white if do you plan activate alpha blending.

If you are using HLSL, review your code and test the shader inside MAX, see if you have the same issues.

About Exporters, Panda works fine if you don't need more than one UV Channel.
If you get Max 8 or +, use the KW Exporter from John Watte instead of Panda.
Until now I don't get not even one successful export to FBX.

Regards.





Re: XNA Game Studio Express exporting x and fbx files

Jubber

Thanks for your response - turns out it was not the exporter at all. The problem occurs if I try displaying 2D graphics and 3D graphics at the same time. Something is screwing up the render process. If I turn off 2D sprites, everything works properly.

I have absolutely no idea why.

Cheers,

Robin.





Re: XNA Game Studio Express exporting x and fbx files

Jubber

Finally I have an answer - all the problems occur because drawing 2D then 3D resets the rendering state - found this clip of code in another answer. XNA game examples really really need to include this vital code for the many people who follow the 2D example, then add in the 3D example code.

graphics.GraphicsDevice.RenderState.DepthBufferEnable = true;

graphics.GraphicsDevice.RenderState.AlphaBlendEnable = false;

graphics.GraphicsDevice.RenderState.AlphaTestEnable = false;

graphics.GraphicsDevice.SamplerStates[0].AddressU = TextureAddressMode.Wrap;

graphics.GraphicsDevice.SamplerStates[0].AddressV = TextureAddressMode.Wrap;

Cheers - hopes this helps anybody else this happens to.

Robin.