Author Topic: [Fixed] Strange / unexpected coloring of units and buildings  (Read 1863 times)

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
I've ad two occasions where, at once (I cannot really tell how to reproduce this), my entire units and buildings became tinted in an unexpected color.

I assume this is not intended?

 
« Last Edit: 22 April 2011, 15:57:20 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Zoythrus

  • Guest
Re: Strange / unexpected coloring of units and buildings
« Reply #1 on: 16 April 2011, 02:06:53 »
happens to me too, i hate this bug....(actually, more often than not the shown color is usually teamcolor)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Strange / unexpected coloring of units and buildings
« Reply #2 on: 16 April 2011, 05:15:22 »
That is odd.

Offtopic: It would be interesting if whatever causing the tints could be activated with a button press, coloring all units and buildings with a team color tint, making it easier to see who's units are who's at all times, even when the modeler did not include team color or when it's too hard to see in a heated battle.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Psychedelic_hands

  • Guest
Re: Strange / unexpected coloring of units and buildings
« Reply #3 on: 16 April 2011, 05:46:29 »
It would be interesting if whatever causing the tints could be activated with a button press, coloring all units and buildings with a team color tint, making it easier to see who's units are who's at all times, even when the modeler did not include team color or when it's too hard to see in a heated battle.



hehe.

Edit: is it just me, or does the shadow in the second picture look strange?
« Last Edit: 16 April 2011, 06:44:35 by Psychedelic_hands »

Gabbe

  • Guest
Re: Strange / unexpected coloring of units and buildings
« Reply #4 on: 16 April 2011, 09:59:56 »
Looks like a fail attempt at cloaking everything?

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Strange / unexpected coloring of units and buildings
« Reply #5 on: 16 April 2011, 15:52:54 »
Looks like the draw code is not calling glcolor(1,1,1,1) (or setting the uniform equiv if your using shaders) before drawing?

(Or maybe code that changes these values should be responsible for restoring them?  It saves a few calls)

(I would like a feature to draw trees at 50% alpha, buildings 60% alpha and the sides colour-coded like this, toggled with a hotkey.  I keep losing my soldiers on treelines, especially when they pursue an enemy without me noticing, and they take some finding)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Strange / unexpected coloring of units and buildings
« Reply #6 on: 17 April 2011, 03:12:07 »
I reckon it looks awesome ;), and the suggestions to use it as a hotkey 'team-highlight' is cool.  Not sure exactly what is happening of course, but I think I can deliberately reproduce that effect easily enough.

@tomreyn: you haven't by any chance set RenderUseVBOs=true in your ini have you??
Glest Advanced Engine - Code Monkey

Timeline | Downloads

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Strange / unexpected coloring of units and buildings
« Reply #7 on: 18 April 2011, 00:20:28 »
I have and had RenderUseVBOs=false in my ~/.glestae/glestadv.ini so that's not a valid excuse. ;)
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Strange / unexpected coloring of units and buildings
« Reply #8 on: 18 April 2011, 05:05:42 »
Starting a game with --lastgame makes the model shader all black. Cycling the shader to fixed function adds the colour back. I don't think it's the shader itself because it works when going through new game menu.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Strange / unexpected coloring of units and buildings
« Reply #9 on: 18 April 2011, 08:00:55 »
I have and had RenderUseVBOs=false in my ~/.glestae/glestadv.ini so that's not a valid excuse. ;)

Can't blame a man for trying ;)

Starting a game with --lastgame makes the model shader all black. Cycling the shader to fixed function adds the colour back. I don't think it's the shader itself because it works when going through new game menu.

Sweet... got it. It's the fog, the shaders are always expecting and using the GL inbuilt fog params, even if the tileset doesn't use fog.  Going through the menus seems to leave the menu's fog settings for myself and you, but for tomreyn, zoy and possibly others the colour was being overwritten by the team colour somehow.

Fixed now ?

« Last Edit: 18 April 2011, 08:25:59 by silnarm »
Glest Advanced Engine - Code Monkey

Timeline | Downloads

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Strange / unexpected coloring of units and buildings
« Reply #10 on: 18 April 2011, 16:39:50 »
It seems to be. It did only happen sometimes, and often only several minutes into the game, so I can't tell for sure, but I tested a bit today and it didn't occur again since.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Strange / unexpected coloring of units and buildings
« Reply #11 on: 19 April 2011, 00:19:34 »
Happens for me on git-master with both of the tutorials at least...very weird.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Strange / unexpected coloring of units and buildings
« Reply #12 on: 19 April 2011, 00:24:39 »
I saw this stuff a while ago, but not recently...
Egypt Remastered!

Proof: Owner of glest@mail.com

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Strange / unexpected coloring of units and buildings
« Reply #13 on: 19 April 2011, 00:27:27 »
Nevermind, this happens to regular games too with magitech.

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Strange / unexpected coloring of units and buildings
« Reply #14 on: 19 April 2011, 00:40:40 »
Nevermind, this happens to regular games too with magitech.

Yes, this happens with Constellus as well, it's definitely a code-based bug.  :|
Egypt Remastered!

Proof: Owner of glest@mail.com

 

anything