Author Topic: External stores vanish  (Read 3633 times)

0 Members and 1 Guest are viewing this topic.

External stores vanish
Hey all,

I'm still early into the troubleshooting of this as I spend most of my time IN the cockpit and not outside so it's not that game breaking.  Here's what I'm running:

The latest patch but with the newest as of 2/12/15 SSE2 build of 3.7.1 exe (the one that fixed the HUD stores display)

I have a custom mission that I wrote and this is where I've encountered the bug or whatever it is.  I have not tested it in other missions or campaign yet.

When I launch all of the stores are initially visible.  It seems to be related to the distance from the battlestar.  Once I reach that distance the external stores just vanish from the model.  They still work, they still show on the HUD, they are just not rendered. 

If I halt my viper immediately after launch and stay close to the battlestar they stay present.  That sounds like a mission type variable?  When distance of my Viper from the Battlestar = X it does something that causes this?

Just guessing.  I wrote that mission based heavily off of one of the test missions that came with the original release.  If you have any ideas to point me in the right direction that would be great.  Thanks!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: External stores vanish
Could be a bug introduced when external weapon model view distance was changed to actually do something; could be incorrectly calculating the distance, for example.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: External stores vanish
Is that hard coded into the exe or is that a variable that can be changed someplace?  Thanks!

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: External stores vanish
External weaponry is a flag. Table based right?
Combat landing reloads are mission code. Written into the .fs2 sooooooooOOOOOO. ... how much of the original file remains and how many events did you tweak?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: External stores vanish
It's not a flag, it's a value; one which can't be disabled outright (although you can set it so high as to be irrelevant).

However, upon double-checking the code, it's highly unlikely that the distance calculation is wrong, since it's exactly identical to the value for checking which LOD level should be used.

Are you sure you're viewing your external ordinance from exactly the same camera distance each time?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: External stores vanish
The distance is as close to the Viper as the camera will zoom.  It now seems more time based than anything.  Does the engine have a setting where if too many, or a certain number of objects need to be rendered that it would turn those off?  I can literally be watching the missiles on the ship and *poof* they vanish without my changing a thing.

I'll need to test in one of the campaign missions to see if its just something with my custom mission.  I'll post my findings.  Thanks!

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: External stores vanish
Does the engine have a setting where if too many, or a certain number of objects need to be rendered that it would turn those off?
No. If there were, your secondaries wouldn't be showing up on the HUD's hardpoint gauge; they use identical logic to decide whether or not to render.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: External stores vanish
Hmm ok.  Well they do render on the HUD.  They do everything they should except show up on the Viper after they vanish.

 
Re: External stores vanish
Well, from the testing I just did.  It's most certainly something in the new exe files.  I couldn't tell you what though.  If I used the 3.7.1 Diaspora R1 exe the stores do not vanish.  There's no stores hud display and the wireframe issue would still be present I would imagine but the stores stay and work as expected.

If I use 3.7.1 r11251 or r11257 the stores display on the hud is fixed but the stores vanish either after a short distance from the battlestar or after a period of time even if I stay close to battlestar.  I don't know if that will help track it down.  If I launch and stay at full throttle they will vanish in just a few seconds.

If I cut throttle and match speed with the battle star and stay close to the ship they last considerably longer but still vanish.  I am not doing anything else other than looking at the external view zoomed in as close as possible to the viper.

The only change is swapping out the exe I start with.  Can anyone else replicate the result?  I suppose I could obtain all of the versions of the exe post release and test each one.  Figure out when the issue was introduced.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: External stores vanish
I can virtually guarantee that the issue would have been introduced with r11178 (but if you'd like to confirm that by trying it with the nightlies made before and after that revision, feel free), since external weapon models were always rendered no matter how far away they were prior to that revision.

It's behaving as if the depth calculation is checking the distance between the ordinance and the center of the mission area (coordinates 0,0,0) instead of the distance between the ordinance and the camera. If that's the case, however, everything should be changing LOD levels based on how far it is from the center of the mission, which doesn't seem to be happening.

I'm continuing to look into the relevant code, but I'm afraid graphics coding may as well be black magic as well as I understand it.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Confirmed.  The bug was introduced in r11178. 

------------------------------------------------------------------------
r11178 | MageKing17 | 2014-11-21 12:42:44 -0600 (Fri, 21 Nov 2014) | 3 lines
Changed paths:
   M /trunk/fs2_open/code/model/model.h
   M /trunk/fs2_open/code/model/modelinterp.cpp
   M /trunk/fs2_open/code/ship/ship.cpp

From The_E, niffiwan, m_m, and myself: Fix Mantis 2404.

Makes "$Weapon Model Draw Distance:" actually stop external weapon models from being drawn beyond that distance (modified by detail level).
------------------------------------------------------------------------


Not present prior to that.

 
I don't suppose you have a copy of the code from R11177 that you could put in the HUD ordinance corrections in R11251?  That would be ideal :)  Unless of course the bug is found an creamed :)

 
Re: External stores vanish
So to recap a few things that are known:

1. The wireframe view / hard point gauge was broken some time prior to r10530.  I don't know when exactly.
2. Diaspora v1.1 was based on that release so its hard point gauges are broken.
3. Diaspora v1.1.1 didn't change the code base version so no change there.
4. In Nightly build r11178 there was change that affected "$Weapon Model Draw Distance:".  This appears to have the affect of causing external stores to vanish once a specific distance from the 0,0,0 coordinates of the game grid are reached.
5. In Nightly build r11251 the wireframe view/ hard point gauges were fixed.

Can the code that affects the "$Weapon Model Draw Distance:" introduced in r11178 be easily corrected?  I can confirm it is still present in the latest build r11278 from (Fri, 06 Mar 2015).

That's the largest bug still in Diaspora that I have encountered.  It would awesome to correct that :)

Thank you!


 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: External stores vanish
Can the code that affects the "$Weapon Model Draw Distance:" introduced in r11178 be easily corrected?
It can be "easily corrected" by just reverting that revision, but then "$Weapon Model Draw Distance:" goes back to doing nothing. It would be preferable to find out why it isn't working correctly, but I haven't had much luck there (and I don't know if anybody else has looked into the problem yet).

Have you made a Mantis ticket for the problem yet?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: External stores vanish
No, I've never used Mantis before.  I clicked the link and it looks like I can sign up for an account.

I'm not a part of any team here or anything, just a fan of the projects and thought I would help out where I could or at least point out the issue to those that do work on it.

I signed up and created report 0003149.

I took a best guess at the parameters to enter it under.
« Last Edit: March 15, 2015, 09:10:03 pm by Nightstorm »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: External stores vanish
No, I've never used Mantis before.  I clicked the link and it looks like I can sign up for an account.

I'm not a part of any team here or anything, just a fan of the projects and thought I would help out where I could or at least point out the issue to those that do work on it.

You don't need to be a member of the team to sign up for mantis. If you've found a bug and you're willing to help us test fixes (especially if you're willing to do the kind of work you've done on here to help us resolve it), that's more than enough.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: External stores vanish
It would be nice to fix that particular bug as it of course affects any version that uses external stores.  I got TBP working with Yarn's wide screen fix build and it works fantastic.  I noted the stores bug there too as expected.

I'm really impressed with the versatility of this engine.  I've got three different installations, Freespace2 with all of it's mods, The Star Wars Trilogy being my current favorite of them, The Babylon Project and Diaspora.

Each one of them feels different, flies different and does a superb job of representing each genera.  I'm really looking forward to the next release of Diaspora.  Can't wait to be able and fly off of a Valkyrie class Battlestar.

And Fate of the Galaxy, that looks to be the best Star Wars sim since X-Wing Alliance :)  Lots of cool stuff coming.