Author Topic: Re: alternative ways to show teamcolor  (Read 4160 times)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: alternative ways to show teamcolor
« on: 13 July 2011, 13:28:31 »
I personally thought the outline idea seemed best, how does that circle look with selection circles as well?

I did outlines (could use some tweaking yet),
(click to show/hide)

A 'tint' (suggested after a bug in a shader that was doing basically this to some people randomly),
(click to show/hide)

and will allow both as an option,
(click to show/hide)

Commit:a05e3904
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Re: alternative ways to show teamcolor
« Reply #1 on: 13 July 2011, 18:24:42 »
I must say Silnarm, I think that looks the best, hands down. I'm assuming they will be toggleable, what hotkey will be used by default (keymap.ini will have an entry, I assume)? At either rate, they look fantastic.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Re: alternative ways to show teamcolor
« Reply #2 on: 13 July 2011, 19:44:37 »
Hmm...After some tweaking the outlines could be also good, but I think the other way is more clean. Still, nice.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Re: alternative ways to show teamcolor
« Reply #3 on: 13 July 2011, 20:53:31 »
Could the outline be just around the silhouette of the unit?  It looks a little cluttered being around all of its edges.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Re: alternative ways to show teamcolor
« Reply #4 on: 14 July 2011, 03:32:45 »
Apologies MG ppl... someone with the power to do so may want to shift the last few posts to the GAE board, I initially posted here to show what I had done and provide a link to the changeset if it was of interest.

I'm assuming they will be toggleable, what hotkey will be used by default (keymap.ini will have an entry, I assume)? At either rate, they look fantastic.

There is currently a keymap entry (default is semi-colon) to toggle 'team colour mode' (but atm it cycles through the different effects), and there will be a config option to select which effect you want to use for it (there is a keymap widget now too, needs a little polish, but you'll be able to change hotkeys in-game soon).

Could the outline be just around the silhouette of the unit?  It looks a little cluttered being around all of its edges.

It's currently outlining edges that have one front facing and one back facing polygon, I agree that it does get a bit cluttered, but fixing it will require disabling writing depth values while drawing the outline, and that will cause other problems as things are done now. The way we draw things (or rather, the order in which we draw things) will need overhauling, which will be good to do for performance reasons, so it will happen, but its a reasonably big job, so we'll have to make do with this for now  :(
Glest Advanced Engine - Code Monkey

Timeline | Downloads

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: alternative ways to show teamcolor
« Reply #5 on: 20 July 2011, 13:28:49 »
I was perusing my bookmarks earlier and discovered this entry,

flipcode - Object Outlining

Uses the stencil buffer (so no need to mess with the depth buffer), too easy,
Glest Advanced Engine - Code Monkey

Timeline | Downloads

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: alternative ways to show teamcolor
« Reply #6 on: 20 July 2011, 14:52:39 »
Thx for the link :)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: alternative ways to show teamcolor
« Reply #7 on: 20 July 2011, 20:28:39 »
Looks excellent silnarm! That was exactly what I was thinking of when I thought of outlines.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Psychedelic_hands

  • Guest
Re: alternative ways to show teamcolor
« Reply #8 on: 21 July 2011, 07:24:57 »
Woah, thats nice!  :thumbup: Thanks man.
So what hot-key will be used to show this?

What about having this as a particle effect? I could see a pretty cool mutant godzilla scenario coming out of this haha.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: alternative ways to show teamcolor
« Reply #9 on: 21 July 2011, 19:51:43 »
What about having this as a particle effect? I could see a pretty cool mutant godzilla scenario coming out of this haha.
That would actually be interesting, provided modders can create it as a "per techtree" thing. Since unit particles have a teamcolor attribute that can be used. Only disadvantage is that there's no way to have the radius be a perfect size for the unit, as well, it may not blend well with existing particles.

Overall, I prefer the outline, though I'm not against the implementation of particles.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: alternative ways to show teamcolor
« Reply #10 on: 21 July 2011, 20:43:51 »
In MG I added "<shape>" attribute so you don't have to have unit particles spawning inside a circle.

That tag could be adopted and used to specify a new shape such as 'outline' where the spawned particles occurred randomly on an edge shared by a forwards and a backwards facing face of a single-sided mesh?  Possibly snapping to nearest such edge if the model rotates?

Other fun shapes to consider would be "flock" ("boid") and such, but that's going off topic...

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: alternative ways to show teamcolor
« Reply #11 on: 22 July 2011, 06:25:49 »
In MG I added "<shape>" attribute so you don't have to have unit particles spawning inside a circle.
Totally off topic, but could you PM me the syntax or a link to where the syntax would be, as I'm nearly certain that tag isn't documented on the wiki, as I must have missed it.

[/b]
That tag could be adopted and used to specify a new shape such as 'outline' where the spawned particles occurred randomly on an edge shared by a forwards and a backwards facing face of a single-sided mesh?  Possibly snapping to nearest such edge if the model rotates?
That actually sounds really cool. So basically a shape that will be the same shape as the model's base?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Psychedelic_hands

  • Guest
Re: alternative ways to show teamcolor
« Reply #12 on: 22 July 2011, 14:25:22 »
What about having this as a particle effect? I could see a pretty cool mutant godzilla scenario coming out of this haha.
That would actually be interesting, provided modders can create it as a "per techtree" thing. Since unit particles have a teamcolor attribute that can be used. Only disadvantage is that there's no way to have the radius be a perfect size for the unit, as well, it may not blend well with existing particles.

Overall, I prefer the outline, though I'm not against the implementation of particles.

Wait, so this effect isn't particles.... Sorry, maybe I was too busy looking at dem purrdy pictures instead of reading the thread  :-[.
Sooooo, what sort of effects are these? Is it the same sorta thing as the move target arrow and such?  :confused:

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: alternative ways to show teamcolor
« Reply #13 on: 22 July 2011, 19:59:02 »
What about having this as a particle effect? I could see a pretty cool mutant godzilla scenario coming out of this haha.
That would actually be interesting, provided modders can create it as a "per techtree" thing. Since unit particles have a teamcolor attribute that can be used. Only disadvantage is that there's no way to have the radius be a perfect size for the unit, as well, it may not blend well with existing particles.

Overall, I prefer the outline, though I'm not against the implementation of particles.

Wait, so this effect isn't particles.... Sorry, maybe I was too busy looking at dem purrdy pictures instead of reading the thread  :-[.
Sooooo, what sort of effects are these? Is it the same sorta thing as the move target arrow and such?  :confused:
If I understand correctly, it's particles in a certain shape. Normally, particles are a circle, but suppose you could have them in a shape that specifically fits the unit? Though, it is kind of offtopic, and GAE does not yet support some of MG's new particle features (Feature Request).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: alternative ways to show teamcolor
« Reply #14 on: 23 July 2011, 15:56:19 »
Are you talking about the outline effect? That's just a special way to render the unit, no particles. The first ones are shaders.

The second picture in the first post reminds me about a feature in other RTS-games. When units are hidden behind buildings or trees, they are drawn just in full team color. That way they don't get lost.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: alternative ways to show teamcolor
« Reply #15 on: 24 July 2011, 05:01:09 »
Are you talking about the outline effect? That's just a special way to render the unit, no particles. The first ones are shaders.
No, we're talking about the possibility of yet another way to display team color: with particle systems. The shape concept is a way to make the particle systems be restrained to a shape, such as the shape of the unit.

The second picture in the first post reminds me about a feature in other RTS-games. When units are hidden behind buildings or trees, they are drawn just in full team color. That way they don't get lost.
Yeah, AoE2 had that, and it was very helpful.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Psychedelic_hands

  • Guest
Re: alternative ways to show teamcolor
« Reply #16 on: 24 July 2011, 08:17:54 »
The second picture in the first post reminds me about a feature in other RTS-games. When units are hidden behind buildings or trees, they are drawn just in full team color. That way they don't get lost.
Yeah, AoE2 had that, and it was very helpful.

I think Wildfire added that feature to 0A.D in alpha 5. Maybe we can ask Phillip how they did it?
https://www.youtube.com/watch?v=zbKKlW7PYyk

Philip

  • Guest
Re: alternative ways to show teamcolor
« Reply #17 on: 24 July 2011, 19:58:58 »
Maybe we can ask Phillip how they did it?
See code - draw the world as normal, then clear the depth buffer, then draw occluders (terrain, buildings) to depth buffer, then flip the depth test (so only things behind those occluders will get drawn), then draw the units with a solid colour (and if the silhouettes should be partially transparent then enable blending and use the stencil buffer so each pixel only gets drawn once). As an optimisation (which we don't do yet), use some quick ray-casting to only bother drawing units whose bounding box is behind an occluder.

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: alternative ways to show teamcolor
« Reply #18 on: 29 July 2011, 07:52:15 »
Thank you very much for this insightful post. Sorry for the late reply. Looks like we all are very busy at the moment. Let's see when we get around to add this.

 

anything