Circular Minimap?
Blitz3D Forums/Blitz3D Programming/Circular Minimap?| 
 | ||
| Hi all. Does anyone have a 3D Minimap example that uses a render texture floating around here? Thanks! :) ~GF | 
| 
 | ||
| I remember some demos here with minimap features. Try looking at the default samples or code arcs. | 
| 
 | ||
| I can't seem to find 1 of this stature that's not blitzmax... ~GF | 
| 
 | ||
| Create a second camera. Place above the main camera in height.  Look directly down. Render. Draw render to texture. Place texture on sprite. Show sprite in hud. Thats a start. | 
| 
 | ||
| Some precisions to what Matty suggested : -before rendering, set the cameraviewport to a reduced size which corresponds to the size of the minimap you want (in pixelswidth, pixelsheight) -you don't need to copyrect to a texture (but you can), i would rather copyrect to an image (with the same pixelswidth, pixelsheight) -then draw the image after renderworld (or have a textured sprite/quad positionned in front of the camera, as Matty suggested) -it would be faster to render low details meshes for a minimap (rather than rendering the same scene (with high details meshes) twice...) -for the circular shape of the minimap, you can probably draw a premade circular mask (image or texture) over the rendered image to make some pixels/texels black or alpha 0... note that you can also copyrect the render of your scene to an image to be able to draw it later if you need to... |