Hard Light Productions Forums

Hosted Projects - FS2 Required => Blue Planet => Topic started by: ultimateloather on January 24, 2013, 03:50:31 pm

Title: Graphical problems with OS X install
Post by: ultimateloather on January 24, 2013, 03:50:31 pm
Hi folks,
   I recently installed BP:AOA and ran into a few problems.

First, the executable didn't decompress properly - the executable permissions didn't carry over nor did any of the symbolic links within the .app directory. That was easy enough to fix but something that should probably be addressed :)

Second, no matter what graphics settings I use there are large, blocky artifacts coming mainly from explosions and the engines of ships, but also occasionally from weapons fire. It looks like missing textures or something but I'm not receiving any error messages stating that. I've gone through the troubleshooting guide as well and nothing seems to help.

Other than that the game is mostly playable, though these artifacts make it difficult to see what I'm shooting at.

When I get home I'll hack the debug executable and make it work, then see if I can get a debug log uploaded and attached to the message. Before I do that though, any thoughts?

ETA: System is an early 2008 Mac Pro 8-core system with 20 GB RAM running OS X 10.8.
Graphics card is a Radeon 5870 with 1GB RAM, so it has enough juice to handle whatever BP throws at it ...

I'll post more details when I get home.
Title: Re: Graphical problems with OS X install
Post by: jg18 on January 24, 2013, 04:06:36 pm
Hi folks,
   I recently installed BP:AOA and ran into a few problems.

First, the executable didn't decompress properly - the executable permissions didn't carry over nor did any of the symbolic links within the .app directory. That was easy enough to fix but something that should probably be addressed :)
You know, now that you mention it, I had that problem, too, although I didn't look that deeply into fixing it, since I ended up making my own builds, with limited success (more here (http://www.hard-light.net/forums/index.php?topic=83506.0)).

Second, no matter what graphics settings I use there are large, blocky artifacts coming mainly from explosions and the engines of ships, but also occasionally from weapons fire. It looks like missing textures or something but I'm not receiving any error messages stating that. I've gone through the troubleshooting guide as well and nothing seems to help.

Other than that the game is mostly playable, though these artifacts make it difficult to see what I'm shooting at.
No idea myself, since that's way outside of my expertise, but other people will know more, and a debug log should help a lot.

When I get home I'll hack the debug executable and make it work, then see if I can get a debug log uploaded and attached to the message. Before I do that though, any thoughts?
Besides the log, a list of system specs never hurts, e.g., which Mac you have and when it's from, OS X version, CPU, graphics card, RAM, etc, although some of those things will be in the debug log. You might want to enable the FPS counter as well -- it's "Show frames per second on HUD" under "Dev Tool" in the launcher's advanced settings.
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on January 24, 2013, 10:30:23 pm
It appears to be an incompatibility with the executable build and MediaVPs. I ran it independent of BP with the standard campaign and the artifacts remained. Without MediaVPs there were no artifacts.

I'll work on getting a debug build up later.

 
Title: Re: Graphical problems with OS X install
Post by: jg18 on January 24, 2013, 10:52:56 pm
I get the same results on my machine (mid-2010 MacBook Pro, OS X 10.6.8, Intel Core i5 2.4 GHz, NVIDIA GeForce GT 330M 256MB) with the debug build I made. Logs attached.

[attachment deleted by a basterd]
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on January 25, 2013, 10:42:52 am
OK - got the fs2_open.log created. I played through one of the missions
Spoiler:
the one in the nebula where you rendezvous with the sleeper ship
.

I've also done a dump of the sexps and attached that (not sure how useful that will be).

I'm willing to test just about anything - i can even compile the build locally if I can figure out where to obtain sources.


[attachment deleted by a basterd]
Title: Re: Graphical problems with OS X install
Post by: The E on January 25, 2013, 02:39:18 pm
Yes, well, the thing is....

Code: [Select]
OpenGL Renderer  : ATI Radeon HD 5870 OpenGL Engine
  OpenGL Version   : 2.1 ATI-1.0.29

Apple's OpenGL support in that version is pretty much ****. You have an OpenGL 4 capable GPU, but the OS is limiting it to run at OpenGL 2. The new shader features in the BP build require capabilities found in OpenGL 3 and higher, so you need to do one of the following:
1. Use Windows.
2. Upgrade MacOS to a version that can do the required things (AKA 10.8)
3. Start the executable with -no_glsl
Title: Re: Graphical problems with OS X install
Post by: swashmebuckle on January 25, 2013, 03:16:34 pm
I'm on 10.6 as well, and the -no_glsl flag doesn't seem to be a working solution on any of the builds I've tried (original mac build provided in the thread as well as patched Antipodes 8 at revisions 9496 and 9509).  All the release builds crash instantly no matter what flags are on, and debug runs at around 4fps with all the same graphical errors. Software rendering mode still works, but it's also <4fps, so not much help there.
Title: Re: Graphical problems with OS X install
Post by: jg18 on January 25, 2013, 07:47:47 pm
2. Upgrade MacOS to a version that can do the required things (AKA 10.8)

The OP said he was running 10.8, although I thought OpenGL 3 support was added in 10.7.

E9 said a while back that getting OpenGL 3 support working on OS X required some FSO-side configuration:

Take a look at the thread immediately below this one in the sub-forum (http://www.hard-light.net/forums/index.php?topic=77268.0).

In short:
- Yes, Lion includes an OpenGL 3.2 profile, as well as the older OpenGL 2.1
- Programs must explicitly call, and setup, an OpenGL 3.2 profile in order to receive one. It's not like Windows where the drivers provide the best the hardware can support.
- At present, we have not modified the FS2 Open engine to call the OpenGL 3.2 profile.

Could that also be a factor here?
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on January 26, 2013, 02:07:00 am
Using windows isn't an option. I don't own a license for it and I tend not to run operating systems that cause me to rage. :)

I'm running 10.8, so it has the necessary OpenGL 3 libraries.

I'll try the -nogl_sl flag but I don't think my luck will be any better than swashmebuckle's - though, worth trying!

If that's not working at all then I'll look into modifying the engine so it calls the 3.2 profile. I'm no stranger to programming (that degree in computer science should come in handy here) but I've never worked with OpenGL before, so that should be interesting. Not being familiar with the sources nor 3D graphics in general may be biting off more than I can chew, however. That combined with limited free time it may not be feasible.

At least now I know what the problem is, and that's extremely helpful. Guess I should go look for sources and patches!

Title: Re: Graphical problems with OS X install
Post by: ultimateloather on January 26, 2013, 11:53:02 am
Adding -no_glsl to the command line fixes the problem at the first glance - the artifacts are gone and some beautiful effects are in their place.

As GL support is kind of important I'm still going to work on modifying the engine to call the 3.2 profile, but at least now things look as they're supposed to.

I put a couple minutes into looking for the sourcecode, but it seems to be in a non-obvious location. Or I might be blind. Any pointers? I was able to find the Blue Planet patch file, though.

Title: Re: Graphical problems with OS X install
Post by: jg18 on January 26, 2013, 03:13:53 pm
The instructions here (http://www.hard-light.net/forums/index.php?topic=83225.msg1665734#msg1665734) are approximately correct for OS X, with a few changes:

For Step 1, the OS X terminal is in /Applications/Utilities/Terminal.app

Instead of Steps 2 and 3, get Xcode 4. I think you can get it from the Mac App Store.

For Step 10, apply the patch from the command line with the Unix patch command:
Code: [Select]
patch -p0 < ~/path/to/BP.patch

For Step 11, open the project file (FS2_Open.xcodeproj) in antipodes/projects/Xcode4/. You'll need to extract the Frameworks.tgz tarball that's in that folder first. From the command line, it's
Code: [Select]
tar -xf Frameworks.tgz

I'm not familiar with Xcode 4, so I can't help you beyond that, but it's probably straightforward from there.

Hope that helps.
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on January 26, 2013, 08:09:03 pm
You rule - thanks for the hints on where to find the sources. I have xcode 4 installed already as I need it for all the macports stuff. As far as using it as an IDE that's something I've never done either. We'll see how it goes.

Once I have something going i'll post a link to the build.

cheers!
Title: Re: Graphical problems with OS X install
Post by: crazy_dave on January 27, 2013, 04:44:53 am
I am running OS X 10.6.8 on 2010 Macbook Pro with 330M Nvidia graphics and i7 chip. I have interesting variation on this bug (set of bugs?):

1. If I run release BP executable I crash immediately upon entering the program. If I run the Debug BP I can run AoA and WiH parts 1 & 2 (with the aforementioned black boxes typically/always trailing ships). Frame rate is great. However, WiH part 3 crashes when I tried to start the campaign.

2. I removed the advanced graphical packages. I can now start the WiH part 3 campaign as well as parts 1 and 2. Frame rate is great.

3. If I try to use the no_glsl flag to get rid of the black boxes, I crash to desktop either immediately or when I try to go into a mission (can't remember) for all 3 campaigns.

4. I got as far as the mission "Everything is permitted" which lets me into the mission most of the time, but sometimes crashes to desktop (I think if I click through the log and briefing screens too fast it has a higher chance of crashing). However, whenever I
Spoiler:
attack the shuttle I am supposed to be targeting
, I always crash to desktop.

------------

If any of the debug logs for these bugs would be helpful, I can try to recreate the bugs and post the ensuing debug logs - unless you think this has been covered by the other debug logs.

For the first mission "Nothing is true" I think I found a small, unimportant bug. I failed the mission
Spoiler:
by letting the UEF fighters escape
, but got the successful mission debrief. I was correctly not allowed to continue. If I fail the mission
Spoiler:
by letting the Vasudans escape
, I get the failed mission debriefing, as I should.

Anyway part 3 looks great from what I've gotten to play! Kudos!  :)

EDIT: Managed to get past the mission by
Spoiler:
using the Tev defense turrets to assassinate the target
which doesn't trigger the crash, but the next mission "One Future" crashes about 10 secs after I hit alt-J to begin the mission.
Title: Re: Graphical problems with OS X install
Post by: Echelon9 on January 28, 2013, 01:15:09 am
Essentially these known issues with Mac builds of BP are going to require the changes noted above to allow the FS2Open engine to call an OpenGL 3.2 compatible context on OS X. At present we only call a legacy OpenGL 2.1 context.

Until that happens, there is going to be some degree of 'black box' textures and the like. You'll also note that at present the z-buffering isn't working properly.

This is present even with the latest 27 January 2013 BP.patch builds.

This is something that coding efforts here will greatly improve the experience for all FS2Open engine based games.
Title: Re: Graphical problems with OS X install
Post by: crazy_dave on January 28, 2013, 05:34:52 am
Essentially these known issues with Mac builds of BP are going to require the changes noted above to allow the FS2Open engine to call an OpenGL 3.2 compatible context on OS X. At present we only call a legacy OpenGL 2.1 context.

Until that happens, there is going to be some degree of 'black box' textures and the like. You'll also note that at present the z-buffering isn't working properly.

This is present even with the latest 27 January 2013 BP.patch builds.

This is something that coding efforts here will greatly improve the experience for all FS2Open engine based games.

Interesting! Even once the situation is remedied for OS X 10.8 with OpenGL 3.2, is there a way to make the game stably fall back on older graphics assets for those of us without OpenGL 3.2 (10.6) or high-end cards? Or is it just time for some of us to let go of our aging OSes/machines? :) I mean my laptop I think is capable enough, but the OpenGL I'm running is clearly not. I get good frame rates, but sadly -no_glsl simply causes crashes for me with the standard 3.6.17 Debug build and Blue Planet.
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on January 28, 2013, 04:05:50 pm
I should be able to code it in such a way as to make it fall back gracefully to older OpenGL ICDs if a 3.2 profile isn't available. Should be a simple comparison to see if what I requested is what I got. In any case I haven't been able to put much time into it so far - just enough to check the sources out from subversion and patch them with the BP patch and do a cursory look for what file(s) I'd have to make my changes in. It's not immediately obvious but goes with the territory when modifying a large, complex project such as this.
Title: Re: Graphical problems with OS X install
Post by: crazy_dave on January 28, 2013, 04:16:59 pm
I should be able to code it in such a way as to make it fall back gracefully to older OpenGL ICDs if a 3.2 profile isn't available.

Ah cool. :)

Should be a simple comparison to see if what I requested is what I got. In any case I haven't been able to put much time into it so far - just enough to check the sources out from subversion and patch them with the BP patch and do a cursory look for what file(s) I'd have to make my changes in. It's not immediately obvious but goes with the territory when modifying a large, complex project such as this.

I'm getting use the fruits of other people's hard work for free - so no demands on your time coming from here. :)
Title: Re: Graphical problems with OS X install
Post by: General Battuta on January 28, 2013, 04:20:05 pm
Whatever we can do to allow more people to play is really good in my book.
Title: Re: Graphical problems with OS X install
Post by: jg18 on January 28, 2013, 08:48:23 pm
Whatever we can do to allow more people to play is really good in my book.

Releasing alternate builds that don't include the new graphics code would be a great move towards that goal IMO. That would allow people having graphics-related problems with the current builds to play now using the tried and true standard rendering pipelines. They'd only be a short term solution, but since deferred rendering and shadows may not be in trunk for at least a little while, they'd do for now.

EDIT: [selfpromotion]I have posted unofficial OS X builds here (http://www.hard-light.net/forums/index.php?topic=83318.msg1669065#msg1669065) that attempt to do just that.[/selfpromotion]
Title: Re: Graphical problems with OS X install
Post by: General Battuta on January 28, 2013, 08:52:15 pm
I am 100% with you on that but I know nothing about the technical feasibility thereof.
Title: Re: Graphical problems with OS X install
Post by: jg18 on January 28, 2013, 08:56:12 pm
I am 100% with you on that but I know nothing about the technical feasibility thereof.

I'd say the feasibility is looking pretty good. I just edited my previous post (http://www.hard-light.net/forums/index.php?topic=83509.msg1669187#msg1669187). :)
Title: Re: Graphical problems with OS X install
Post by: General Battuta on January 28, 2013, 08:58:04 pm
If we could get Windows and Linux builds that do that that'd be amazing.
Title: Re: Graphical problems with OS X install
Post by: jg18 on January 28, 2013, 11:24:16 pm
Well, here's (http://pastebin.com/vEwYs4qJ) the modified patch I applied to antipodes revision 9507. It'd be nice if someone could make an official alternate BP.patch, since I made this by taking the official BP.patch and tearing stuff out until the result looked satisfactory. What was left were some SEXP changes and a bump in the ship class limits, which I bet was done without talking to daveb, despite the code comment saying you should. :nono:

The other tricky part is the ship tables, which contain some glowpoints data that's only supported by the new graphics code. I just made a copy of the table, commented out the glowpoints lines, and put it in data\tables\ for each of blueplanet and blueplanet2. Another option would be to post alternate core VPs that have the modified ship tables.
Title: Re: Graphical problems with OS X install
Post by: crazy_dave on January 29, 2013, 01:21:04 am
Whatever we can do to allow more people to play is really good in my book.

Releasing alternate builds that don't include the new graphics code would be a great move towards that goal IMO. That would allow people having graphics-related problems with the current builds to play now using the tried and true standard rendering pipelines. They'd only be a short term solution, but since deferred rendering and shadows may not be in trunk for at least a little while, they'd do for now.

EDIT: [selfpromotion]I have posted unofficial OS X builds here (http://www.hard-light.net/forums/index.php?topic=83318.msg1669065#msg1669065) that attempt to do just that.[/selfpromotion]

It worked for me! I get the right visuals and, more importantly, no crashes! :) At least not yet ... But I am no longer crashing in the "One Future" mission where I was before. I didn't get very far to test much out, because I died rather quickly :) ... I had stopped playing FS and BP for so long I had forgotten how hard they were. Need to remember how to dodge missiles - though I guess for this mission and ship in particular there is no "dodging" of missiles. I'm also trying the Diaspora game right now where, again, I really need to remember how to dodge missiles. :P

EDIT: Tried the unofficial release build from jg18 a little more: 1 full mission + 1 full dreamscape and it is working perfectly. Thanks!
Title: Re: Graphical problems with OS X install
Post by: Echelon9 on January 29, 2013, 05:29:29 pm
Here's the compilation instructions for Mac (http://www.hard-light.net/wiki/index.php/Mac_Development_Guide), using Xcode (free via Mac App Store).

I've actually already had a go at inserting the code to setup an OpenGL 3.2 context (http://www.hard-light.net/forums/index.php?topic=78694.msg1572155#msg1572155). Didn't work though, in part because I was taking a harder route and not using a more recent trunk version of SDL -- which I believe should make calling the OpenGL 3.2 context and gracefully falling back to OpenGL 2.x on older hardware or OS X releases easier.

The patch should at least provide a guide to a plausible location. Literally this code change should be no more than 10 lines.
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on February 01, 2013, 03:13:26 pm
Literally this code change should be no more than 10 lines.

This is precisely what I was speculating. Enough code to see whether we're running on/compiled for OS X, call the context, check to see if the context is valid, then fall back if not. The rest of the code should remain unchanged.

Thanks for the hints about where to look, what to change, and that SDL should probably be upgraded :) I might have some time on Sunday to work on this - I'll post whatever I come up with.
Title: Re: Graphical problems with OS X install
Post by: crazy_dave on February 01, 2013, 06:56:34 pm
Literally this code change should be no more than 10 lines.

This is precisely what I was speculating. Enough code to see whether we're running on/compiled for OS X, call the context, check to see if the context is valid, then fall back if not. The rest of the code should remain unchanged.

Thanks for the hints about where to look, what to change, and that SDL should probably be upgraded :) I might have some time on Sunday to work on this - I'll post whatever I come up with.

In his version, jg18 also had to remove some information from the ship data tables to get it to work on the older graphics. I can confirm that, unless the code knows not to look for those data when the graphics can't support them, the game won't work as I tried it without the modified data tables at first (only jg18's build) and the game simply crashed.
Title: Re: Graphical problems with OS X install
Post by: jg18 on February 01, 2013, 07:19:56 pm
The issue there was caused by some new glowpoints code that was added just for the BP builds, although it'll get into trunk eventually. There were some additional table features enabled by that code ($Glowpoint overrides:), and that's what I commented out. The crash/freeze occurred because the regular ship table parser couldn't process those table lines.
Title: Re: Graphical problems with OS X install
Post by: crazy_dave on February 01, 2013, 08:40:27 pm
The issue there was caused by some new glowpoints code that was added just for the BP builds, although it'll get into trunk eventually. There were some additional table features enabled by that code ($Glowpoint overrides:), and that's what I commented out. The crash/freeze occurred because the regular ship table parser couldn't process those table lines.

Ah I see, so a version which falls back on earlier graphics shouldn't suffer from the same problems as the code to parse those glow points will be intact.
Title: Re: Graphical problems with OS X install
Post by: jg18 on February 01, 2013, 09:26:56 pm
Well, graphics stuff is way outside of my expertise, but if I were to guess, the glowpoints code probably uses OpenGL 3-compatible shaders and thus presumably won't work with older graphics cards.

However, by the time the glowpoints code is ready to be committed to trunk, the rendering pipelines will probably already be divided between the OpenGL 3 pipeline and the pre-OpenGL 3 fixed render pipeline (i.e., no shaders aka -no_glsl). Machines with older graphics cards will already be using the second pipeline and will thus be unaffected by changes in the first.
Title: Re: Graphical problems with OS X install
Post by: GrahamO on February 02, 2013, 07:23:56 am
Thanks for the no_glsl suggestion - it removed all my 'black squares' from A of A campaign and made it actually playable.

the only minor glitch left for me is in ship/weapon selection where I get strange thin, green down lines (hard to describe) rotating in sync with the model in the left hand side of the screen - like part of a wireframe model, but shifted half a screen to the left of the actual model. It doesn't affect anything though.

Thanks again for the suggestion - much appreciated !
Title: Re: Graphical problems with OS X install
Post by: Echelon9 on February 02, 2013, 09:17:52 pm
the only minor glitch left for me is in ship/weapon selection where I get strange thin, green down lines (hard to describe) rotating in sync with the model in the left hand side of the screen - like part of a wireframe model, but shifted half a screen to the left of the actual model. It doesn't affect anything though.

Thanks again for the suggestion - much appreciated !

Known issue.
Title: Re: Graphical problems with OS X install
Post by: GrahamO on February 03, 2013, 12:42:45 pm
Thank you Echelon9.

Is the presence of a Borg Cube instead of a sun in 'The Plunder' similarly known ?

It makes no difference to the game obviously but the big square in the sky looks a little funny ;)
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on February 04, 2013, 09:39:47 pm
I might have some time on Sunday to work on this

... And I didn't. Ended up getting called to work. :(
Title: Re: Graphical problems with OS X install
Post by: Echelon9 on March 03, 2013, 09:37:21 pm
I might have some time on Sunday to work on this

... And I didn't. Ended up getting called to work. :(

Anymore updates ultimateloather on this? Would be happy to take a look at any patches you might create to get this working.
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on March 04, 2013, 03:30:30 pm
I unfortunately even haven't had time to play since I posted that. Things at work have been ... relentless and when i get home the last thing I want to do is spend more time in front of a computer. I suppose that's what 10-12 hour days for four weeks will do to you :\

Once things settle down at the office I'll have some time to put into it but it probably won't be for another couple weeks yet.

Title: Re: Graphical problems with OS X install
Post by: Hoot on April 04, 2013, 02:53:03 am
Just a quick note, the Sidhe just show white rectangles instead of texture or glows at WiH. I think it is the same with the Kayser in FS2.

Running Mac OS X 10.6, no_glsl, glowmaps disabled etc. (so no black thingies show up anymore).

EDIT Found the problem for BP2, it seems. Was due to old command options saved with wx_launcher while playing via FS2_Launcher.
Title: Re: Graphical problems with OS X install
Post by: ultimateloather on June 25, 2013, 10:35:12 am
Unfortunately due to real-life constraints I'm just not going to be able to take on this project :(

I thought I'd have time, but with additional responsibilities and roles being placed on me at work I'm doing 10-12 hour days pretty constantly now, and the last thing I want to do when I get home is spend more time sitting in front of a computer.

I'm happy to help do some quick testing if someone else wants to pick up the mantle and run with it, but unfortunately doing any of the work is probably going to be out.

Sorry ...