Thread: [Algorithms] RTS simple circle shadows
Brought to you by:
vexxed72
From: Ryan De B. <RD...@im...> - 2005-01-31 00:40:54
|
In an RTS game where you could have many units on the screen at once, many games use a simple circle shadow. Is projective texturing generally used to get the shadow on the ground? You can only project so many textures in a single pass, and doing a large number of them should affect framerate. Maybe they project all the shadows onto a large quad, and then project that texture onto the ground. Or perhaps they have small quads underneath each character just above the ground textured with the circle shadow, but then it would only work on relatively flat ground. Which technique is generally used? -Ryan De Boer Disclaimer Message: This message contains confidential information and is intended only for t= he individual(s) named. If you are not the named addressee you should no= t disseminate, distribute or copy this e-mail. Please immediately delete = it and all copies of it from your system, destroy any hard copies of it, = and notify the sender. E-mail transmission cannot be guaranteed to be sec= ure or error-free as information could be intercepted, corrupted, lost, d= estroyed, arrive late or incomplete, or contain viruses. To the maximum e= xtent permitted by law, Immersive Technologies Pty. Ltd. does not accept = liability for any errors or omissions in the contents of this message whi= ch arise as a result of e-mail transmission. |
From: Greg S. <gr...@st...> - 2005-01-31 02:58:23
|
You really wouldn't need projective texturing in this case. If you = think about it, your "projection" here would be a simple top-down orthographic one. You could simply render these blobs into a texture, and then map = that texture to your ground surface using a simple scale and offset to = compute the appropriate UV coordinates. So, a bit simpler, cleaner, and less = work than full-on projective texturing. Actually, you could even get real* shadows using this method -- you'd = render the object as normal, but use the top-down orthographic projection and a model transform which flattened and skewed the object according to the = light direction. * "Real" as in a directional shadow. Obviously no self shadowing here, = but does the trick in most cases. > -----Original Message----- > From: gda...@li... = [mailto:gdalgorithms- > lis...@li...] On Behalf Of Ryan De Boer > Sent: Sunday, January 30, 2005 7:40 PM > To: gda...@li... > Subject: [Algorithms] RTS simple circle shadows >=20 > In an RTS game where you could have many units on the screen at once, > many games use a simple circle shadow. Is projective texturing = generally > used to get the shadow on the ground? You can only project so many > textures in a single pass, and doing a large number of them should > affect framerate. Maybe they project all the shadows onto a large = quad, > and then project that texture onto the ground. Or perhaps they have > small quads underneath each character just above the ground textured > with the circle shadow, but then it would only work on relatively flat > ground. Which technique is generally used? >=20 > -Ryan De Boer >=20 >=20 >=20 > Disclaimer Message: >=20 > This message contains confidential information and is intended only = for > the individual(s) named. If you are not the named addressee you = should > not disseminate, distribute or copy this e-mail. Please immediately = delete > it and all copies of it from your system, destroy any hard copies of = it, > and notify the sender. E-mail transmission cannot be guaranteed to be > secure or error-free as information could be intercepted, corrupted, = lost, > destroyed, arrive late or incomplete, or contain viruses. To the = maximum > extent permitted by law, Immersive Technologies Pty. Ltd. does not = accept > liability for any errors or omissions in the contents of this message > which arise as a result of e-mail transmission. >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive = Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_ida88 |
From: Martin S. <ms...@he...> - 2005-01-31 04:07:47
|
>Actually, you could even get real* shadows using this method -- you'd render >the object as normal, but use the top-down orthographic projection and a >model transform which flattened and skewed the object according to the light >direction. > > This is exactly what I did in Rome: Total War and the results were perfectly acceptable (well much better than just simple blob shadow anyways). More precisely there are 2 "micro" maps that do this , one going out to about 64 meters from the camera and the other going to 256 meters with cross fading between them then fading to simple blob shadows at the end of the second map. This was done to reduce the texture cost of it all so we could get away with 2x512x512 textures and look acceptable rather than one big 2048x2048 going all the way out to 256 meters. There's some noticable crawling at these resolutions but by keeping them light and subtle its no *too* noticable (i hope;) That said we were really heaving for texture space as we needed to run on 32meg cards and also decided not to use any pixel shaders so we could work on the broadest spectrum of hardware so YMMV. Martin |