Irrlicht graphics glitch? Or am I stupid? :D

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Minnek
Posts: 12
Joined: Sun Jul 06, 2008 3:40 am

Irrlicht graphics glitch? Or am I stupid? :D

Post by Minnek »

I'm not sure what I'm doing wrong, but I'll show the fruits of my labor here:

Image
Image

What's going on is, I'm making a custom scene node that contains within it, a call to draw2DRectangle() with coordinates taken from a point approx 30 units above the model's head. This drawing would normally draw a bar as seen above the test unit, but when I move in front of where the bars are being drawn with the test unit, they seem to decal themselves onto the test unit. The same occurs to the test units near the ground, when I move too far away from them. When I'm closer, the bars appear as normal.

Is my aabbox wrong? Is draw2DRectangle for this sort of thing inappropriate? Is there an alternative to consider? And... why does it even do this? It seems like such strange behavior. I'll post any wanted code on demand, but suffice to say the OnRegisterSceneNode's call to registerNodeForRendering just has the default (ie I just call registerNodeForRendering(this) ) and there's nothing else fancy going on.

I'll be cleaning up the code for posting just in case it's necessary, so if I get any replies soon I'll edit this post. Otherwise, I'll add a reply to the thread.

EDIT: Ignore the GUI, I totally forgot about that. I'm not concerned about the graphical glitching on the label. It's just a side effect of taking a screenshot.

EDIT2:
Image

It doesn't happen when the terrain is not there. I load the terrain from a b3d model, and add it as an oct-tree scene node to the world. I'm not sure how important this is to know, but there you have it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I guess that the material setup is not working properly. Moreover, using draw2d calls inside the draw3d calls might also wreck some render states. Please show the full custom node code you wrote.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

maybe

Post by 3DModelerMan »

Maybe you are creating the custom node to many times and that's just a bunch of them put together with just a slight offset.
Cool character design by the way :D .
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

show your code please if you want the pro up there to help. 8)
Post Reply