fehaar / FFWD

This is the FFWD framework for XNA, that allows you to port Unity3D games to XNA for use on WP7 or XBox360 (XBLIG)
Microsoft Public License
133 stars 36 forks source link

Rendering Issues #70

Open stanleyjoy opened 11 years ago

stanleyjoy commented 11 years ago

I have major and annoying issue. The game in Unity Editor works perfectly. The Game scene has 3 cameras rendering the scene, each with its own layer, culling mask and Depth. This is what happened in XNA, the game has cameras rendering some of the meshes and masking meshes of its own layer. Which is pretty annoying??

These meshes have their MainTexture replaced simultaneously in Update. If thats of any help. Stan

fehaar commented 11 years ago

It could be an issue with the texture replacement. Try disabling that and see what happens.

Otherwise there are two ways of debugging rendering in XNA - both require that you have a Windows version of your game, which should be easy to make in VS.

1) You can get a printout of the rendering queue by setting the static variable Camera.logRenderCalls to true. It will print the names and materials of everything that is rendered in the order that it is rendered. It will automatically be reset at the end of the frame so you can look a the rendering queue. You can use this for finding things that are not being rendered by the camera for some reason - and then proceed to real debugging for finding out why it is not rendered.

2) If the item shows in the render queue but not on the screen. Odds are something is wrong with the mesh or material. I find the easiest way to solve those issues is to install the DirectX toolkit, fire up PIX and run your windows game through it, capturing a full frame where the problem occurs. After that you will be able to see what is going on with everything that is being rendered. I have fixed many bugs that way.

I realize that this is one of the places where using FFWD gets really nasty. There are a lot of possible explanations for why you get this error, so it is very hard to say exactly what to do. It is best just to have patience and dig in.

stanleyjoy commented 11 years ago

Wow patience means time, which I don't have..... But will check it out. Can Shaders cause this issue??? Any likely update for FFWD coming soon???

Stan

stanleyjoy commented 11 years ago

I found the problem to be similar to your first response. Now to get to the solution what would you recommend. Stan UPDATE: We use Blender to make the meshes.....We should not use Image Plane export available in Blender but make the plane and UV it individually. Then it renders. Be aware that I did this with 2 cameras and just half of the assets. I will bring the entire set and let you know.