makehumancommunity / makehuman

This is the main repository for the MakeHuman application as such.
http://www.makehumancommunity.org
Other
1.18k stars 244 forks source link

Bug eyes on Render > viewer tab #225

Open rwbaer opened 1 year ago

rwbaer commented 1 year ago

When doing a render the Viewer tab shows "bug eyes" as if they are out of position? image

/Interestingly, The Rendering > Scene tab looks fine: image

Finally, where as the coldlights and Warmlights used to work during rendering, they do not seem to affect the rendered image.

Source code: 1.2.1 alpha (master:d89a93d5) Windows 22H2 OS Build 25330.1000 Windows 11 Pro Insider Preview

rwbaer commented 1 year ago

Although it may not be directly related, Ricardo2020 reports multiple problems related to render shadows and back face culling on this forum thread http://www.makehumancommunity.org/forum/viewtopic.php?f=3&t=21017. The report is spread over several posts (and a week of time following upgrade from focal to jammy in Linux Mint). This issue may be intertwined with issue #206 as well.

Aranuvir commented 1 week ago

The problem is still existing and not windows specific (I will change the topic). It affects also the preview image for file saving. Interestingly the bug vanishes in the render tab after an advanced render with sss light map.

black-punkduck commented 1 week ago

@Aranuvir : phew ...

Technically it uses a second render buffer, a color buffer and a depth buffer. Then it binds the stuff together, resizes the view to the selected size, set classical parameters light clear-Color etc. and does what it does, when it renders to screen ... it uses the same draw() function with a different destination. When one print the number to screen one can see the new buffer numbers.

It is in lib/glmodule.py starting from approx. line 824

The render buffer 0 must be the one supplied from QT (at least in pyside6 it works that way) and when ready it is restored to that buffer, so that standard QT works as before. PySide6 also adds own buffer support and I fear QT5 is not different. In other words, I am not sure, where QT ends and openGL starts or if QT and native openGL always fit properly :(

The image in preview is of course the same, it is simply a copy to standard screen. The saved file is of course as bad as the render itself.

Eyes in front of sth ? I would think the depth buffer is not working correctly. Eyes are rendered after the body afaik. My recent Makehuman version does work ... just an idea: in the new version I use GL_DEPTH_COMPONENT instead of GL_DEPTH_COMPONENT16, maybe the resolution is too low? Of course I also found the code somewhere and I have other problems still.

BufferStorage

And for the rest, well try to find the GL-Light commands in "modern" openGL. Lights I had to add completely different, when I work with 3.3 or higher versions. As long as we have this ancient openGL version, future changes may be a big problem.

Furthermore is multisample active? If so try to set have_multisample to False e.g in line 858. Whatever that was for. My version works without that multisample.

The whole code looks a bit odd, it would have been better to demand a minimum version of openGL, but as I said .. that is sth I cannot change.