"That's essentially what I was asking how to do, any pointers on where to look 
for drawing to a texture instead of the hud?"
Thanks,

Rich


Garry Newman wrote:
> 40 fonts! Yikes!
> I'd just move the camera, or render the text to a texture and scale that.
>
> garry
>
> On Tue, May 5, 2009 at 9:48 PM, Richard Slaughter 
> <slau...@vault13.co.uk>wrote:
>
>   
>> That's essentially what I was asking how to do, any pointers on where to
>> look for drawing to a texture instead of the hud?
>>
>> For now I've created an array of 40 fonts that descend in size which is
>> reasonably smooth, but I'm still open to ideas.
>> Thanks,
>>
>> Rich
>>
>> Paul Peloski wrote:
>>     
>>> @Steve: I would not use the camera solution because it's doing the same
>>> thing (rendering to a texture and scaling it) but in an indirect and map
>>> dependent way.
>>>
>>> @Jonas: I would not use the vgui text drawing functions because every
>>>       
>> font
>>     
>>> size/style combination you get a handle for caches a lot of bitmaps for
>>>       
>> the
>>     
>>> glyphs in the font from what I can tell.
>>>
>>> I would just render your HUD element (fonts and all) at a higher
>>>       
>> resolution
>>     
>>> than you need, to some texture, then render the texture on the HUD at
>>> whatever scaled size you want. It won't look perfect because of the
>>> anti-aliasing on the fonts, but it might look okay. Worth a shot.
>>>
>>> Paul
>>>
>>> On Sun, May 3, 2009 at 2:19 PM, Jonas 'Sortie' Termansen
>>> <hlcod...@maxsi.dk>wrote:
>>>
>>>
>>>       
>>>> That's pretty hacky and expensive, avoid that solution. You should use
>>>>         
>> text
>>     
>>>> drawing functions. Try changing the size of the font (and color?) very
>>>> fast,
>>>> then it will seem rather smooth.
>>>>
>>>> ----- Original Message -----
>>>> From: "Steve Henderson" <steven.j.hender...@gmail.com>
>>>> To: "Discussion of Half-Life Programming" <
>>>>         
>> hlcoders@list.valvesoftware.com
>>     
>>>> Sent: Sunday, May 03, 2009 10:06 PM
>>>> Subject: Re: [hlcoders] Smoothly shrinking text on the HUD
>>>>
>>>>
>>>>
>>>>         
>>>>> Another idea is to use a point camera and a monitor.  I've used these
>>>>> before.  Set up a studio room in your map and make a brush with the
>>>>>           
>> stuff
>>     
>>>>> you want to zoom.  Then make a point camera that is set to capture this
>>>>> content.  Then you need to make a vgui material that will be painted
>>>>>           
>> with
>>     
>>>>> what the point camera sees.  This material would be part of your hud.
>>>>> Once
>>>>> you get the material showing the point camera, you can dolly the camera
>>>>>
>>>>>           
>>>> in
>>>>
>>>>         
>>>>> and out for your effect.
>>>>>
>>>>> There is a pretty good point camera tutorial on the wiki.
>>>>> I can send you the link later
>>>>>
>>>>> On May 3, 2009 3:52 PM, "Richard Slaughter" <slau...@vault13.co.uk>
>>>>>
>>>>>           
>>>> wrote:
>>>>
>>>>         
>>>>> Hi List,
>>>>>
>>>>> I'm looking to make a hud element where the text being displayed
>>>>>           
>> shrinks
>>     
>>>>> down in size smoothly over time.
>>>>>
>>>>> So far I've discovered that DrawSetTextScale only works for Bitmap
>>>>> fonts, which would be nice to avoid so that it will work with the
>>>>> existing ttf fonts that we're using.
>>>>>
>>>>> I'm assuming that changing the font won't yield a smooth enough result,
>>>>> as I'm aiming for a 'zooming out' type effect, so I was thinking that
>>>>>           
>> it
>>     
>>>>> would be easiest to draw the text on to a surface of some sort, then
>>>>> scale that down over time.
>>>>>
>>>>> Is it possible to do that with a procedural material, and if so can
>>>>> someone point me in the right direction as I can't see how to use any
>>>>>           
>> of
>>     
>>>>> the text drawing functions in that context.
>>>>>
>>>>> Any other ideas for where I should be looking?
>>>>> Thanks,
>>>>>
>>>>> Rich
>>>>>
>>>>> _______________________________________________
>>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>>> please visit:
>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>>> _______________________________________________
>>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>>> please visit:
>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>>>
>>>>>
>>>>>           
>>>> _______________________________________________
>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>> please visit:
>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>>
>>>>
>>>>
>>>>         
>>> _______________________________________________
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>       
>> please visit:
>>     
>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>
>>>
>>>       
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>     
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>   


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to