New unit hilighting effect

New unit hilighting effect

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

New unit hilighting effect

Post by trepan »

New unit highlighting effect for the gui_hilight_unit.lua widget.
It uses the new gl.TexGen() call (it could also be done quite
easily using a shader, but gl.TexGen() allows older machines
to use the effect as well).

7.1MByte video:
http://trepan.bzflag.bz/spring/hilight.avi


Image
Last edited by trepan on 20 Jun 2007, 09:56, edited 1 time in total.
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

ow sweet! How much lag are you talking here ?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

None.

Redrawing a single unit takes very little time (and you can only be
pointing at one unit at a time). The texture generation mode does
not incur any real penalty. When I setup for a 200 FPS, pointing at
a unit that fills the screen makes no measurable difference in the
FPS.

P.S. The video is choppy because I had /shadows 1 4096, /water 3,
and a P2P program dumping something or other on to my HD at
the same time (the last one was a mistake ;-))
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I hope this can be used by default in conjunction with that pretty team coloured circles selection thing you showcased a while ago.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Image

P.S. The white ring (it blinks), shows that the unit is selected.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

What are those cursors you're using, anyway?

Also is this in the SVN yet?
User avatar
Foxomaniac
Posts: 691
Joined: 18 Jan 2006, 16:59

Post by Foxomaniac »

Those are SillyCursors(tm) used in the more recent CA betas.

Hate em? Bite [LCC]quantum[K] on teh lobby LOLS!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

BTW, the pulse should move in the other direction :P.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Na, I tried it both ways and preferred this one.
It's just a script, you can change it for yourself
once it's committed ;-)

Actually, you can edit the gradient texture to add
stripes and features in the moving pattern. The
effect is essentially a 1x64 texture being pasted
on to the unit with the world Y coords being used
for the texture T coord (with some scaling and
shifting for good measure).
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

So this is different to the old highlight and might work for me. :)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

KDR_11k
Oops, I didn't notice your second question. No, it is not in SVN yet.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Foxomaniac wrote:Those are SillyCursors(tm) used in the more recent CA betas.

Hate em? Bite [LCC]quantum[K] on teh lobby LOLS!
Are those awesome buildmenu's part of CA to?
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

LOrDo wrote:Are those awesome buildmenu's part of CA to?
Yep. Check out http://files.caspring.org/snapshots/latest for the most recent CA build.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Hmmm, could this be used to show units getting progressively more charred as they lost health?

Having some noise/clouds with the general colour (which would be greyed for purposes of damage) could look pretty cool...
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

Now thats an interesting idea
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

... especially if we could also gradually alpha-fade the colors out've the base skin at the same time, or do random blotching (so it's not the same every time).

Heck, it might totally get rid of the need for Corpses, except for the ones for pure gibs.
Post Reply

Return to “Lua Scripts”