XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

[SOLVED] Skinned XSI Model rendered gray in XNA 3.0

Last post 7/2/2009 9:01 AM by Xia. 2 replies.
  • 6/8/2009 8:29 AM

    [SOLVED] Skinned XSI Model rendered gray in XNA 3.0

    Hi all!

    ...I haven't done any XNA for about a year now. Last time I worked on it, it was XNA 2.0.
    To get quickly back into it, I started out working my way through the Digital Tutors Tutorial (Shader Pipeline with XSI and XNA) (which worked just fine a year ago with XNA 2.0).
    To start out, I installed Crosswalk 3.3 and the XSI Plugin for XNA 3.0.

    The tutorials worked as intended all the way until I was trying to render the skinned model in XNA. The model was correctly loaded (so were all the Textures => which I could tell because it would complain if I rename one of them in the content folder, same thing for the shader and it's include files) and the model was also animating properly.
    However....the model is rendered completely in gray as if the whole lighting information and textures would be missing.

    The shader I'm using is (as shown in the tutorial) the Phong shader that comes with the XSI-XNA-Plugin.
    Code-wise there shouldn't be a mistake either, since I also tried copying the Digital-Tutor-CodeFile across, which lead to the same results.

    Does anyone have a clue which factors could lead to such a shading problem? Are there any XNA3.0 specific changes that might require an additional step now, which was not necessary in XNA2.0?
     
    Thanks a lot for you advices!

    Regards,
    Daniel
  • 6/8/2009 8:02 PM In reply to

    Re: Skinned XSI Model rendered gray in XNA 3.0

    Found the issue.....actually by inspecting the XSI XNA Sample. In case some other Newbie came across, or will come across the same confusing thing doing that tutorial.....here's how to fix it:

    What the mentioned tutorial for XNA2.0 is missing, are the following statements in the Draw Call:

    graphics.GraphicsDevice.RenderState.AlphaBlendEnable = false;
    graphics.GraphicsDevice.RenderState.DepthBufferEnable = true;
    graphics.GraphicsDevice.RenderState.DepthBufferWriteEnable = true;
    graphics.GraphicsDevice.RenderState.CullMode = CullMode.CullCounterClockwiseFace;

    Now it works perfectly fine.

    -Daniel
  • 7/2/2009 9:01 AM In reply to

    Re: Skinned XSI Model rendered gray in XNA 3.0

    Strange.. can you explain why it worked? none of the statements you mentioned should impact the lighting or color information (maybe just Alphablend but that should not cause it to become grey).
Page 1 of 1 (3 items) Previous Next