Game Development Community

Showing Interiors on Minimap

by Jay Barnson · in RTS Starter Kit · 08/02/2005 (10:39 pm) · 10 replies

I'm using the mini-map in a mission that does include static interiors. I wanted to add the interiors to the render mask in the call to gClientSceneGraph->renderScene. My initial attempt was really straightforward:

void GuiMapHud::renderWorld(const RectI &updateRect)
{
   setupRender();

   gClientSceneGraph->renderScene( TerrainObjectType | WaterObjectType | InteriorObjectType);

   cleanupRender();
}

When I do this, only the top half of the mini-map renders. Something is causing renderScene to bail out early (I think), but I'm not familiar enough with the code there to figure it out yet.

( I observed similar behavior if I disabled the calls to setupRender() and cleanupRender() - forcing it to render with all the fog and environmental details, etc - I only got the upper-left quarter of the map. But that was just me screwing around with ideas, it's not my real issue)

Anyone have any ideas?

About the author

Jay has been a mainstream and indie game developer for a... uh, long time. His professional start came in 1994 developing titles for the then-unknown and upcoming Sony Playstation. He runs Rampant Games and blogs at Tales of the Rampant Coyote.


#1
08/03/2005 (5:12 pm)
Is it always the same quarter/section, or does it vary based on perspective?
#2
08/03/2005 (7:12 pm)
It's always the same quarter section, though I need to test it based on placement of the interior. It happens in the initial render to the bitmap.

here we go - we're in the middle of changing our DNS over, so you might not see these, but here they are:

Without Interiors:
www.rampantgames.com/mapa.jpg
With interiors:
www.rampantgames.com/mapb.jpg
The interior in question is around where the two green dots are (in the lower left quadrant)
#3
08/03/2005 (8:00 pm)
Further Info:

I placed another structure in the northern part of the area that the minimap covers, and sure enough, the whole thing went black. I tried two different interiors, with the same results. Then I moved it in the mission editor down to the southern part of the map (east of the original), the the top half of the map returned.

It definitely seems like the structures are screwing up the map rendering in GuiMapHud::renderWorld - though they work just FINE in normal gameplay.

Could it be something that hasn't been initialized with interiors prior to the first frame of the actual game? Maybe lighting hasn't been initialized yet when the map is rendered? I can try and force a re-rendering later on in the game, and see if that works as a work-around.

Edit:

Tried it, no dice. It just copied into the two quadrants whatever was in the lower-left corner of the screen when the snapshot was taken. It seems to be aborting the draw (as you can see, Fluffy was standing around when the map was regenerated).

www.rampantgames.com/mapd.jpg
#4
08/03/2005 (8:51 pm)
Have you checked to see if the interiors are setting the viewport incorrectly when they reset it?
#5
08/03/2005 (8:59 pm)
Nope. In fact, I'm not even sure where the interior-rendering code is found, but I'll start rooting about in the "interior" directory and see what I can see.

So the suspicion is it's not saving out the actual copy of the current states before running the Interior Render, so when it backs out again it pretty much fubars the scene?

I'm afraid I'm not enough of a guru on Torque Rendering to know much of what is going on there - the Interiors are pretty much stock 1.3 + Synapse Lighting Pack.
#6
08/11/2005 (10:06 am)
I never was able to find & resolve this issue. I need to check to see if this happens with the stock RTS kit too with that one change. I had to move on to some other things for a while --- but if anyone more familiar with how Interiors are rendered has experience in this area, please let me know.
#7
08/10/2006 (12:36 pm)
Has anyone had any sucess to this? I'm playing around with the settings, although my interiors are spread out throughout the map so I get a big black box.
However I played with some of the height values for the camera, and I got it to render 'islands' of terrain and the rest black. The islands are teh high parts of the terrain that seem to stick out above the interiors... but no luck getting interiors to show at all.
#8
08/11/2006 (1:32 pm)
Ok, so I fixed it. The interior code was using setFrustum without setting a specific ortho value. Which was turning hte maps explicitely set ortho = true, to ortho = false. Other code uses dglIsOrtho() to make sure that the 'correct' one is used. So I added that to all the setFrustrum functions and now my interiors show up on the map.

Theres a bunch of spots to 'fix' for this, and I dont see any adverse effects rendering interiors.
#9
06/13/2009 (4:59 am)
can you please tell me how to show the Interior Objects in the MiniMap?? plzzz i need it..
#10
01/19/2010 (12:52 am)
How would I get the RTS Kit buildings to show up as well ? They are manually placed during place -- so I don't think the count as interior objects.

I tried adding this code, but it makes no difference on the rendering for me.

Any ideas ??