Pre-Selection Highlighting

Pre-Selection Highlighting

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

Pre-Selection Highlighting

Post by trepan »

Although the tooltip tells you what you are about to select,
there isn't a good visual indication in the viewport. This widget
was written to fix that (it also highlights features).

Image

P.S. It onlys works with SVN code, so I won't post it yet...
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Not bad, looks pretty helpful.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Have you tested it with s3os, too? The current plugins that draw stuff in 3d have inverted normals on s3os.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

http://spring.clan-sy.com/phpbb/viewtop ... ing#176683

That screenshot comes from a version that uses color inversion,
face windings do not apply as culling is not enabled.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

that looks mighty handy. thank you!
User avatar
Ling_Lover
Posts: 100
Joined: 26 Sep 2006, 11:50

Post by Ling_Lover »

is there any reason for the number above the image? because wont the mouse always be showing only 1 unit?

other than that... cool :)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

That's a different widget (SelectionButtions).
The highlighting widget only highlights objects
in the viewport, nothing more.
User avatar
Ling_Lover
Posts: 100
Joined: 26 Sep 2006, 11:50

Post by Ling_Lover »

ah, right... my bad :)

didn't notice that :-P

even cooler now that i get it!...
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Post by AF »

It'd be nice if the model was tinted using team colour, is that possible?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Yes, that's possible. The first version that I posted in #lua in the lobby
actually used red/green/yellow for enemy/ally/feature. I just played with
a different setup using gl.LogicOp(GL.SET) and color masks that seems
to be better for highlighting then plain tinting. Using the following:

red: enemy
green: ally
cyan: my unit
yellow: feature

A silhouette approach might be cooler, but I have others priorities at
the moment. The main thing that I wanted to demo with this widget is
the ability to draw a unit exactly the same way as the engine does for
a given frame.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Always wanted something like this. Nice job.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

trepan wrote:A silhouette approach might be cooler, but I have others priorities at
the moment. The main thing that I wanted to demo with this widget is
the ability to draw a unit exactly the same way as the engine does for
a given frame.
So we can make those move path thingies the templar from SC have? Or the trail from castlevania games?
Post Reply

Return to “Lua Scripts”