Re: [Algorithms] Keeping an object's label on the screen
Brought to you by:
vexxed72
|
From: Monteleone, N. <nat...@lm...> - 2009-04-29 20:17:31
|
Unfortunately the terrain isn't very flat :-( ________________________________ From: Jeff Russell [mailto:je...@8m...] Sent: Wednesday, April 29, 2009 1:43 PM To: Game Development Algorithms Subject: Re: [Algorithms] Keeping an object's label on the screen The idea I had in mind was to do something in screen space... I'd write out an object ID version of the projected texture, apply it, render the terrain geometry into a low-res buffer, then compute min/max screen coords for each object. Then I could just draw my text label in screen space based on that information. Is this a sane approach? Could be, if your object counts are reasonably small. If this is just sections of the terrain we're talking about, and your terrain is at least sort of flat, you could just project the bounds of these shapes into screen space and center your label accordingly. -- -------------------------------------------- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com -------------------------------------------- |