Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X Lion && Intel GPU: Lighting on surface faces goes completely black [$5] #71

Closed
iamwilhelm opened this issue Jan 17, 2012 · 24 comments

Comments

@iamwilhelm
Copy link
Contributor

iamwilhelm commented Jan 17, 2012

It seems like there are some faces on the sphere that should be shaded instead of being completely black.

https://skitch.com/iamwilhelm/g3k8i/openscad-sphere.scad

This doesn't seem like it's the right behavior, since it seems like there's two light sources, one above and to the left, and one below to the right. Both light sources should be able to cover the currently black square faces.


Did you fix this issue? Go claim the $5 bounty on Bountysource.

@kintel
Copy link
Member

kintel commented Jan 17, 2012

I've seen this as well, but only on Mac OS X Lion on an Intel GPU (Macbook Air).
This does not look related to OpenCSG in any way - the hard part is to get hold of something to develop&test on.

@iamwilhelm
Copy link
Contributor Author

I'd be willing to go digging around to find a fix, though I'd need help in suggestions about where to start to look. Where in the code base should I start looking to get familiar with it, and also which parts would you suspect to be related to this problem?

@koenkooi
Copy link

FWIW the same issue exist when using thingiview on thingiverse with lion + intel GPU

@donbright
Copy link
Sponsor Member

if you would be able to try compiling and running the regression tests, it can help narrow down things quite a bit. (see doc/testing.txt) . you need to install cmake, imagemagick, and python

@kintel
Copy link
Member

kintel commented Jan 18, 2012

Hm, sounds like a deeper issue.
Perhaps the Thingiview developer has some insights on this?
FYI: That's the same guy who did CloudSCAD a while back.

I don't have a machine to test on, so if anyone wants to pursue this, it would be awesome.

@josefprusa
Copy link

It's not issue of only MacBook Air but every lion machine with Intel HD3000 :-(

@josefprusa
Copy link

Thanks god my macbook air is nvidia based and I was able to put ATI 6800 to my desktop :-) Now its fixed

@lordnynex
Copy link

Is there any word on a fix for this? It's not a show stopper but it's definitely annoying when designing new things that require frequent rendering. Not sure if it's of interest, but my macbook air dual boots between lion and win 7. I do not see this issue in win 7 (however in windows certain projects render things incorrectly. For example, a hollow cube comprised of 6 extruded squares rotates one of the sides to give a view into the cube for some reason).

@donbright
Copy link
Sponsor Member

Well, i guess in theory, some sort of fundraising crowdsource thing could bring some money into the project to buy some hardware ???

I mean everyone is crowd sourcing these days, Louis CK, indie rock bands, game developers, writers, etc etc etc. Is there some way to hook up OpenSCAD to this crowdsource funding thing? Unfortuantely i tend to be terrible at this sort of thing.

@kintel
Copy link
Member

kintel commented Apr 22, 2012

Flattr could work as a crowdsourced fundraising platform - it's possible to donate over flattr in addition to just pushing the button. I've also been asked if I could set up an OpenSCAD PayPal donation solution, but I'm not sure what kind of paperwork is necessary for such things to work out.

I was hoping for some other projects having similar issues to sort them out, e.g. thingiview. I would guess there are multiple other pieces of software with similar issues. It would be beneficial to have those identified as it makes it easier to search for solutions.

@gega
Copy link

gega commented May 27, 2012

I noticed the same thing and additionally the F5 rendering doesn't work ( http://bastya.net/openscad-rendering.png ).

Mac OS X 10.7.4 MBA 13-inch, Mid 2011

OpenSCAD 2011.12

I tried to compile the latest version from git and finally I managed to compile it using the macosx-build-dependencies.sh script and it compiled fine but the compiled app is crashed on any complex operation. It could render a cube or a sphere for instance but it crashed when I tried a union on these. The crash log is here: http://bastya.net/openscad-crash.txt

I tried to compile it to add a small feature I wanted to use and not because of this rendering issue, btw.

Do you have any idea what I did wrong during the build process?

@kintel
Copy link
Member

kintel commented May 27, 2012

The F5 rendering issue can sometimes be improved by enabling "Force Goldfeather" in Preferences->Advanced. It's an experimental feature which may help pinpoint what is going wrong under Lion.

Not being able to build a stable binary under Lion is another issue. I've made some progress there, and I think I might have a working version soon. If you'd be willing to test a build for me it would be cool.

@gega
Copy link

gega commented May 27, 2012

Sure, just let me know and I'll test the build! The rendering issue is something what I can live with but I really want to add the scaling during linear_extrude() and this is the main reason I want to compile the package myself.

@kintel
Copy link
Member

kintel commented Jun 4, 2012

A note on the Lion build issue: Optimized builds fail to work due to a likely bug in CGAL.
For more info see http://cgal-discuss.949826.n4.nabble.com/Crash-with-Nef-polyhedron-3-tc4655099.html

Debug builds should work though.

@paulo-raca
Copy link

Same problem here.
Has it ever been fixed?

@kintel
Copy link
Member

kintel commented Jan 9, 2013

The Lion build issues has since been fixed, but this still hinges on finding a developer with a computer exhibiting these problems, alternatively, find other software (e.g. thingiview) with the same problems and look how they fix it.

@ttennebkram
Copy link

Same problem here on Mountain Lion, Macbook Air 13" 2012

@ttennebkram
Copy link

"Goldfeathering" didn't fix the problem. Oddly, F5 and F6 both having shading problems, but they differ as to which surfaces are completely black. I also tried unchecking the OpenGL 1.0 box.

@kintel
Copy link
Member

kintel commented Jun 22, 2013

Still, none of the developers have a computer which reproduces this bug - hardware donation or developer time to fix this would be very welcome!

@Vroumdev
Copy link

I think I found a solution to this problem
In GLView.cc add in function void GLView::initializeGL() these two lines
GLfloat shininess = 64;// Issue #71 patch
glMaterialfv (GL_FRONT_AND_BACK, GL_SHININESS, &shininess);// Issue #71 patch
before
glEnable(GL_COLOR_MATERIAL);
Thanks to Alex (http://forum.jogamp.org/JOGL-problems-with-OSX-10-8-2-and-HD3000-td4026518.html)
I works for me on my PowerBook 13 with Intel HD 3000.
Hope it helps.

@kintel
Copy link
Member

kintel commented Aug 22, 2014

Thanks for the input!
One question: If the cause of this is really that the default shininess value for these GPU drivers is 0, it should be possible to reproduce this issue on other systems by forcing the shininess value to 0. However, that doesn't work for me - have you tried that?

Nevertheless, if this actually improves things, let's include the fix.

@Vroumdev
Copy link

Yes, I tried this and the problem appears again with shininess=0, but I only tried on my system. I think that this is a bug in Apple's OpenGL drivers for this hardware. So, maybe the problem doesn't appear on other hardwares even with shininess=0. Unfortunately, I have only a mac with Intel HD 3000...

@kintel kintel closed this as completed in 574fbf9 Aug 22, 2014
@kintel kintel added the Bounty label Aug 22, 2014
@kintel
Copy link
Member

kintel commented Aug 22, 2014

The latest development snapshot has this fix included. All of you having this issue: please give it a spin!

@Vroumdev Have you also experienced #65 ? Not sure if that's related to this at all..

@Vroumdev
Copy link

@kintel Yes I experienced #65 and goldfeather option corrects it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants