LOS Request - Page 2

LOS Request

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: LOS Request

Post by gajop »

here's the code then
anyhow, not an opengl expert, just googled how to do it;
basically setting a different color (mostly different alpha) for each vertex;
i've also set shading to be SMOOTH, that's about it
Attachments
tp_FogOfWar.lua
(4.71 KiB) Downloaded 110 times
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: LOS Request

Post by gajop »

anyhow, the edges still feel somehow rough, no surprise seeing as rectangles break edges at 90 degree angles, hexagons do it at 60 so it should be somewhat smoother;

i've just no intention on doing that, i hate geometry as it is :p
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: LOS Request

Post by Forboding Angel »

gajop wrote:yeh i think gradients are definitely a good thing to have, even if you're using simple rectangular tiling

without gradient:
Image

with gradient:
Image
SHUT UP AND TAKE MY MONEY!!! <3
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: LOS Request

Post by Forboding Angel »

Seems to have some issues O_o

Image
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: LOS Request

Post by gajop »

yeh, I did a change that i knew would cause a problem with some edges.
Still, even the original is improperly rendering it (although less visible due to all the random changes that were happening offmap - maybe they were intentional so it would hide it? :)

notice the top right corner:
Image

anyway the new upload fixes the missing line (not the above mentioned problem though), i've also removed the randomly generated areas - they're slightly annoying, you can always revert it if you want to, it's only one assignment
Attachments
dbg_tp_FogOfWar.lua
(4.71 KiB) Downloaded 116 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: LOS Request

Post by knorke »

gajop wrote:basically setting a different color (mostly different alpha) for each vertex;
i've also set shading to be SMOOTH, that's about it
ah cool. :-)
my idea would have been to use textures on the rectangles and the textures would have some gradients, shapes etc.

The last line is sometimes missing because grid size is no multiple of map size. (put local res = 64 and it should always fit)
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: LOS Request

Post by Jazcash »

So would changing engine code be the only way to allow this widget to cover everywhere properly instead of having fugly bits showing through?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: LOS Request

Post by knorke »

well, i do not really know a good way how it would work.
but it is not so important now anyway because next spring will have shadows in LOS view and Beherith is making his shader thing etc.
http://springrts.com/phpbb/viewtopic.php?f=12&t=28375
(my ati never draws shadows so no idea if it works)
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: LOS Request

Post by PicassoCT »

thats why ati is not supported, they draw no shadows, thus see everything, thus cheat viat there non-suportedness, thats why ati is not soup ported
Post Reply

Return to “General Discussion”