Author Topic: Fog Of War Transparency With Software  (Read 783 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #15 on: October 20, 2017, 09:10:21 pm »
I don't think so. As long as it's transparent AND on top of the rest, it should work. What happens if you use a texture in another color? Does it show?

Offline AGP

  • quad
  • ******
  • Posts: 1524
    • View Profile
Re: Fog Of War Transparency With Software
« Reply #16 on: October 20, 2017, 09:42:10 pm »
The solid-color ones are semi-transparent (and where they belong).

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #17 on: October 22, 2017, 12:30:56 am »
Maybe an issue with the texture coordinates somehow? If you are using a proper texture (not just a single colored one), does that look right?

Offline AGP

  • quad
  • ******
  • Posts: 1524
    • View Profile
Re: Fog Of War Transparency With Software
« Reply #18 on: October 23, 2017, 05:32:54 pm »
The planes are created with the Extended Primitives class. So are the ones in my test case.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #19 on: October 24, 2017, 07:30:01 am »
I've no idea what's going on then. And I can't open the video link that you've sent me. All that YouTube does when I try to, is telling me: Oops!?

Offline AGP

  • quad
  • ******
  • Posts: 1524
    • View Profile
Re: Fog Of War Transparency With Software
« Reply #20 on: October 24, 2017, 07:34:53 am »
That's weird. The video is no longer up (I just signed in from a different computer and can't see it). I wonder if Google took it down. Try again in a few hours, please. As soon as I wake up I'll check this out.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #21 on: October 25, 2017, 08:41:02 am »
The new video doesn't work either. I'm getting the same opps-page...!?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #22 on: October 26, 2017, 06:41:52 pm »
The latest video works. But it's almost impossible to tell anything based on it IMHO. All I see are black squares...could you make a similar video based on this texture: http://jpct.de/download/tmp/testtexture.png?

Offline AGP

  • quad
  • ******
  • Posts: 1524
    • View Profile
Re: Fog Of War Transparency With Software
« Reply #23 on: October 27, 2017, 06:07:48 am »

Offline AGP

  • quad
  • ******
  • Posts: 1524
    • View Profile
Re: Fog Of War Transparency With Software
« Reply #24 on: October 27, 2017, 06:50:39 am »
I got it working by calling recreateTextureCoords(). Is that costly? It seems like it would be.

Oh, and how could I come as close as possible to an orthographic view (in order to reduce the displacement between the fog and the gound)? Field-of-view? And would that be by increasing or decreasing it?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #25 on: October 27, 2017, 11:21:42 am »
It's cheap as long as you don't call it every frame, which you shouldn't have to. To come closer to an orthographic view, you have to move the camera far(er) away and decrease the fov to compensate for that. But especially with the software renderer, you might run into accuracy issues if you are moving away too far.

Offline AGP

  • quad
  • ******
  • Posts: 1524
    • View Profile
Re: Fog Of War Transparency With Software
« Reply #26 on: October 27, 2017, 07:13:43 pm »
Is this too big a scale for a Warcraft level, in your opinion?

Quote
************
World bounds:
X: -1133.6974, 318.40582
Y: -279.86633, 0.25386608
Z: -925.57733, 135.38232
************

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: Fog Of War Transparency With Software
« Reply #27 on: October 30, 2017, 01:24:41 am »
No, it should be fine. You might even want to increase it, if you run into some accuracy problems.