This project is read-only.

using a custom model

Nov 6, 2011 at 7:36 PM

hi Ohan I am doing a project similar to tutorial 8 where i have several different markers and a ground array. Whenever i apply a custom model to the toolbar Marker if the object is close to the camera it looks fine but as i move it farther away it begins to have the background bleed through. if i set ignore depth to true the texture seems to get overwritten (it stops the bleeding through though). any help is appreciated

Nov 7, 2011 at 3:17 AM
Edited Nov 7, 2011 at 3:18 AM

What exactly do you mean with "the background bleeds through"? Can you perhaps capture a screenshot and post it online so we can see the problem?

One thing that might cause problems when the virtual objects are distant to your camera is your camera's far clipping plane. I think it's called Camera.ZFarPlane and by default it is set to 1000 units. Try to increase that value and see if that solves your problem. 

Nov 7, 2011 at 5:44 AM
Edited Nov 7, 2011 at 5:45 AM

Changing Z far plane seems to make everything smaller but it still is kind of happening

this is an image of what i mean by bleading through. on this model it bleeds through black if i use P1_wedge it is sort of transparent. could it be an issue with the model? im kinda new to the whole 3d image thing 

http://img7.imageshack.us/img7/7982/saucerh.jpg

 

*edit 

The flying saucer is what is attached to the toolbar marker not the circle which is attached to the ground node

Nov 7, 2011 at 4:14 PM

That looks like Z-fighting.  You can read about it if you search for that term.  In simple terms, because your Z-buffer has discrete buckets, virtual objects that are 1000 and 1001 units away get put into the same Z-buffer bucket and the graphics card arbitrarily draws either one of them.  This is not specific to GoblinXNA, it's a common issue in 3D graphics.  Changing your units might help (e.g. in my previous example, if your ground marker has size 10000 by 10000 and your camera's far Z plane is 10000, just divide everything by 10 or 100).  Or put a little more distance between your virtual objects and your ground plane so that they are in different depth buckets.