Game Development Community

TX 3D Minimap

by SteveRap · in Torque X 2D · 05/27/2008 (7:28 pm) · 4 replies

Hopefully somebody will be able to shed some light on a problem Im having.
I've created a minimap in the top corner of the screen, that simply shows an area of the terrain.
The problem I'm having is that the scene behind the minimap seems to affect the rendering of the minimap.
I cant figure out how to include an image in the forum to show this.

I thought it may have something to do with GUISceneview IsOpaque but that seems to have no affect.
Could this be something to do with Rendermask and NoRenderMask?

GUIStyle MinisceneViewStyle = new GUIStyle();
GUISceneview MiniSceneView = new GUISceneview();
MinisceneViewStyle.HasBorder = true;
MinisceneViewStyle.IsOpaque = true;
MiniSceneView.Style = MinisceneViewStyle;

minicam = TorqueObjectDatabase.Instance.FindObject("MiniCameraComponent");
MiniSceneView.Camera = minicam;
MiniSceneView.Visible = true;
MiniSceneView.Size = new Vector2(200.0f, 200.0f);
MiniSceneView.Position = new Vector2(824.0f, 0.0f);
MiniSceneView.Folder = ViewContainer;


Any help would be greatly appreciated, this is driving me insane.

#1
05/30/2008 (8:54 pm)
Its hard to say unless you can provide more details about how it is being affected. If you want to display a minimap on top of a scene I think you need a render mask. At least that is how it was handled in the old airplane tutorial. I am going to be doing something similar next week so I will let you know how it goes. Please post the solution here if you find one before then.

Thanks
#2
05/31/2008 (6:31 am)
Havent figured it out yet, played with the render masks, but havent had any luck.
Heres a picture of what I am seeing, bit small but hopefully it can be made out. I've cirled the area being affected at this point, and put a dotted line in of the mountain behind. As far as I can see it happens when two parts of the same scene overlap, basically cancelling each other out.

i291.photobucket.com/albums/ll290/stevenrap/screengrab/screengrab.png
#3
05/31/2008 (8:09 am)
I think it is a render mask issue. Have a look at my post entitled "minimap". someone posted a link to a fix for a norendermask bug. It turns out I won't be doing the same thing as you in the near future so I may not be of much help. For now my sceneviews don't overlap. Good luck.
#4
05/31/2008 (10:37 am)
The rendermask needs to be set to a particular object type, and your objects have to have that type. If thats not the issue, you might also try using the "bringObjectToFront" mechanism of the minisceneview GUI.