project-navigation
Personal tools

Author Topic: Material System's Flares always drawn behind models or ...  (Read 6161 times)

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Material System's Flares always drawn behind models or ...
« on: February 15, 2011, 01:48:47 pm »
...models always drawn in front of flares, however you want to call this bug.

Bug Tracker item here:
https://sourceforge.net/tracker/index.php?func=detail&aid=3029958&group_id=157793&atid=805242

Attached a screenshot showing the problem:

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #1 on: February 15, 2011, 11:36:10 pm »
it is not a bug, it is only the way we renderer it.

This is a top down game, your screenshot is unrealistic
Soldier position is important,
And finally this soldier is selected.
« Last Edit: February 15, 2011, 11:37:57 pm by bayo »

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #2 on: February 16, 2011, 11:43:41 pm »
I think MCR was referring to the yellow glow of the light in front of the model, not the green selection circle below it.

The green selection circle should show in front of model. The yellow glow should not.

I think.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #3 on: February 17, 2011, 10:51:44 am »
Hooo, yea, your probably right. BTW i reduce the opacity of the circle when something is over it. It should looks better.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #4 on: February 17, 2011, 11:02:32 am »
Yes, H-Hour, that is correct.

Bayo, the selection circles look better now.  :)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Material System's Flares always drawn behind models or ...
« Reply #5 on: February 18, 2011, 07:31:24 am »
i will only accept this as a bug, if it's visible from birds view. i suppose you have modified your cam angle cvars to get that low? and if it's only visible for those cam angles, i would not say this is a bug.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #6 on: February 18, 2011, 11:10:50 am »
Here 2 screenshots showing the same problem visible with the default camera angle (Simulated smoke using flares)

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #7 on: May 08, 2011, 10:48:33 am »
Now flares are always drawn in front of the models, but also now we have graphic errors sometimes (see screenshots).
I think it has to do with transparency not working correctly anymore...

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #8 on: May 10, 2011, 01:23:29 pm »
You can check out the new flares bug on gate or laboratory maps for example.

Or is it just me having this glitch ?

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #9 on: May 10, 2011, 02:56:33 pm »
I can confirm the problem on my end, compiled from latest source today.

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #10 on: May 10, 2011, 05:07:18 pm »
Hmm, those flares on gate map not only rendered incorrectly, but also have broken visibility check (shining through a solid wall). Will investigate what causes that.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #11 on: May 10, 2011, 06:19:20 pm »
Thanks for looking into this. :)

Here the bug-tracker item: http://sourceforge.net/tracker/?func=detail&aid=3299907&group_id=157793&atid=805242

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #12 on: May 10, 2011, 10:42:13 pm »
Looks like I've found where the problem with those flares on gate map lies. They are rendered for the detail brushes, not the world ones, and while changing code to ensure a global rendering order I somehow missed the possibility for detail brushes to have effects.
Will fix that, but not instantly -- should think how to organize code better. Anxious hacking at code is bad :(

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Material System's Flares always drawn behind models or ...
« Reply #13 on: May 11, 2011, 11:22:33 am »
Thanks for fixing the broken flare rendering.
The fix can be found here: http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=commit;h=3ab470b4718b9636994405a8d456facb0ad27a24

You are right. The better occlusion check for flares is not really necessary or should not have high priority, because it won't be visible from birds eye view anyway.

Flares rendering looks much better now & the flares also integrate better...  8)

I am setting priority of the bug tracker item to 2, because I agree that in a top-down game flares are really rare to occur exactly behind models.