armature bone rotation

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

Re: armature bone rotation

Postby Aranuvir » Sat Apr 28, 2018 9:46 pm

Can you try to add:
Code: Select all
#version 120
to all *.glsl files as the first line and see if it helps?
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: armature bone rotation

Postby RobBaer » Sat Apr 28, 2018 11:32 pm

With respect to gl-test-cases which may be terribly OT to your original post but still useful to your journey ...

jujube wrote:Update: I installed pycharm, and I'm trying to use it to run the openGL test cases scripts. They don't produce error messages*, but they don't launch any canvases either.
*or I think they don't... I'm not sure what the exit codes mean.
They all print this:
Code: Select all
EFFECTIVE QT VERSION : 5.10.1
REQUESTED GL VERSION : (2, 0)

... snip
I am using Windows 7.
...snip

I'm guessing your exit code is something like:
Code: Select all
Process finished with exit code -1073741819 (0xC0000005)

At least this is what I'm getting on Windows 10. Google implies that 0xC0000005 is illegal access. So, on Windows the code is crashing. The same gl-test-case code is working on MacOS for me (except test 4 & 5 render) and on Ubuntu for Joel, so this is the bleeding edge of multi-platform development :roll: .

I think something is going wrong about line 46 of testapplication.py that is crashing python. Don't know what yet.
http://doc.qt.io/qt-5/qopenglcontext.html#details
User avatar
RobBaer
 
Posts: 1209
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: armature bone rotation

Postby joepal » Sun Apr 29, 2018 7:48 am

The one error message I get is when running the genericgl init
Code: Select all
Traceback (most recent call last):
  File "C:/gl-test-cases-master/genericgl/__init__.py", line 5, in <module>
    from .testapplication import TestApplication
SystemError: Parent module '' not loaded, cannot perform relative import


You need to add the root of the gl_test_cases to PYTHONPATH in order for these things to work. In linux you'd do:

Code: Select all
cd gl_test_cases
export PYTHONPATH=`pwd`


In pycharm, I guess there's a setting in the UI somewhere. Or you could set an environment variable in windows.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4474
Joined: Wed Jun 04, 2008 11:20 am

Re: armature bone rotation

Postby jujube » Sun Apr 29, 2018 10:43 pm

Aranuvir wrote:Can you try to add:
Code: Select all
#version 120
to all *.glsl files as the first line and see if it helps?


I tried doing this in test case 03, the result is still this:
Code: Select all
EFFECTIVE QT VERSION : 5.10.1
REQUESTED GL VERSION : (2, 0)

Process finished with exit code -1073741819 (0xC0000005)

(The first three, which don't even have glsl files, also give that exit code.)
On adding to pythonpath, hmm.. the top answer on stack exchange says to press a button that my pycharm doesn't have... another answer suggested that marking folders as source root should do it, but it doesn't change anything.

I found where the refactor branch has a function that loads the test cube. I changed a line to have it load the base.obj, which results in a blue, unshaded, upside down human with helpers. It turns out this function was in one of the files that was added to the refactor branch. I figured out which master branch files were removed (guicommon.py, object3d.py) and what they have been replaced with/renamed to (screenobject.py, drawableobject.py). Obviously there's something else in the display code that has been changed, although whatever it is, it allows MH to run from source on windows.
(Is it the big chunk of commented out code in canvas.py? But that was one of the newly added files, wonder where the original code was taken from.)

I also found two errors:
In plugins\0_modeling_a_measurement.py, guicomon.Object still needs to be replaced with the screenobject.py ScreenObject.
Same for gui3d.py, although oddly, the replacement has already been made, but one of the updated import statements has been commented out for some reason.
(I still have yet to install git or make a github account)

I really want to use the skeleton debug plugin... I guess I should go find wherever the nightly builds are hosted, if I want to try it.

(all of this is still related to my OP because I need to get the basics working before I can tinker with advanced topics like skeletons)
jujube
 
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: armature bone rotation

Postby joepal » Mon Apr 30, 2018 8:27 am

I think possibly it's time to write a more verbose post about what we're trying to do with these things. It'll be near impossible to figure that out from just looking at the source code of the refactor branch.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4474
Joined: Wed Jun 04, 2008 11:20 am

Re: armature bone rotation

Postby RobBaer » Mon Apr 30, 2018 6:49 pm

joepal wrote:I think possibly it's time to write a more verbose post about what we're trying to do with these things. It'll be near impossible to figure that out from just looking at the source code of the refactor branch.


@Jujube

At the risk of being the one who is confused, I would suggest using the master branch of the repository at https://github.com/makehumancommunity/makehuman (which is essentially a working, python 3-based version of MakeHuman) for you skeleton testing work.

The _feature_refactor_opengl of the same repository and the gl-test-cases repository (https://github.com/makehumancommunity/gl-test-cases) are code snippets representing work on opengl refactoring. They are not, and not intended to be, working versions of MakeHuman. These will eventually replace parts of the master branch when all is working, and we have unraveled the code some. You are welcome/encouraged to play with these latter things as well, but they may be an unnecessary diversion from working on skeletons if that is your main focus.
User avatar
RobBaer
 
Posts: 1209
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: armature bone rotation

Postby jujube » Tue May 01, 2018 2:08 am

RobBaer wrote:
joepal wrote:I think possibly it's time to write a more verbose post about what we're trying to do with these things. It'll be near impossible to figure that out from just looking at the source code of the refactor branch.


@Jujube

At the risk of being the one who is confused, I would suggest using the master branch of the repository at https://github.com/makehumancommunity/makehuman (which is essentially a working, python 3-based version of MakeHuman) for you skeleton testing work.

The _feature_refactor_opengl of the same repository and the gl-test-cases repository (https://github.com/makehumancommunity/gl-test-cases) are code snippets representing work on opengl refactoring. They are not, and not intended to be, working versions of MakeHuman. These will eventually replace parts of the master branch when all is working, and we have unraveled the code some. You are welcome/encouraged to play with these latter things as well, but they may be an unnecessary diversion from working on skeletons if that is your main focus.


I would, except on my PC the refactor branch has at least a blue human, and the master branch has no human :?
...I would like some help in getting the master branch working, though.
(I was trying to run the test cases to see if it would show why openGL wasn't working for me. The compiled exe still works fine btw.)

Running the master branch from source, the human 3d panel (?) is blank white. Some errors:
Code: Select all
unable to save file C:/Users/[name]/Documents/makehuman/v1py3/settings.ini
Traceback (most recent call last):
  File "./core\mhmain.py", line 74, in outFile
    os.rename(tmppath, path)
PermissionError: [WinError 5] Access is denied: 'C:/Users/[name]/Documents/makehuman/v1py3/settings.ini.tmp' -> 'C:/Users/[name]/Documents/makehuman/v1py3/settings.ini'

Code: Select all
unable to save file C:/Users/[name]/Documents/makehuman/v1py3/mouse.ini
Traceback (most recent call last):
  File "./core\mhmain.py", line 73, in outFile
    os.remove(path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:/Users/[name]/Documents/makehuman/v1py3/mouse.ini'


Code: Select all
gl.draw
Traceback (most recent call last):
  File "./lib\glmodule.py", line 1038, in draw
    _draw(productionRender)
  File "./lib\glmodule.py", line 1030, in _draw
    drawMeshes(False, productionRender)
  File "./lib\glmodule.py", line 1026, in drawMeshes
    drawOrPick(pickMode, obj)
  File "./lib\glmodule.py", line 671, in drawOrPick
    obj.draw()
  File "./lib\object3d.py", line 286, in draw
    return glmodule.drawMesh(self, *args, **kwargs)
  File "./lib\glmodule.py", line 452, in drawMesh
    glDisable(GL_TEXTURE_2D)
  File "C:\Users\[name]\PycharmProjects\untitled\venv\lib\site-packages\OpenGL\error.py", line 232, in glCheckError
    baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
   err = 1281,
   description = b'invalid value',
   baseOperation = glDisable,
   cArguments = (GL_TEXTURE_2D,)
)
jujube
 
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: armature bone rotation

Postby joepal » Tue May 01, 2018 9:39 am

jujube wrote:The compiled exe still works fine btw.


This is exceptionally strange. To my knowledge, not a whole lot changed in the master branch between the build of that exe and now.

Maybe there is something strange in the dependencies installed on your machine?

The exe is simply a bundle of python embedded (from python's home page) and numpy/pyopengl/pyqt (from pip). Running it should be equivalent of downloading python, installing these dependencies and running from source.

Clunky workaround, if the exe works while a manual source run does not: the install directory contains a source checkout. Simply overwriting this with current master should give you an up to date build that should work.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4474
Joined: Wed Jun 04, 2008 11:20 am

Re: armature bone rotation

Postby jujube » Tue May 01, 2018 7:13 pm

joepal wrote:
jujube wrote:The compiled exe still works fine btw.


This is exceptionally strange. To my knowledge, not a whole lot changed in the master branch between the build of that exe and now.

Maybe there is something strange in the dependencies installed on your machine?

The exe is simply a bundle of python embedded (from python's home page) and numpy/pyopengl/pyqt (from pip). Running it should be equivalent of downloading python, installing these dependencies and running from source.

Clunky workaround, if the exe works while a manual source run does not: the install directory contains a source checkout. Simply overwriting this with current master should give you an up to date build that should work.


Wait, I actually don't remember if I downloaded the py3 exe. I couldn't find it but then I considered that maybe it doesn't exist, and that the thing I remembered running was actually the save targts plugin, written for py3, running in my py2? The python 2 exe files always work, but its possible that enough has changed in python 3 to break GL. Can you give me the link to the py3 exe if it exists?

(I tried running the py3 master first by normally pip installing numpy, pyqt5, and pyopengl, in that order, which didn't work. Then I uninstalled them and tried a pycharm virtual enviroment containing just those things, which also didn't work.)

I'm not sure if I understand the rest of your post... But normally I run portable makehuman exes, instead of installing them.

edit: also, is "python embedded" another thing I have to download/install/import/include? Because I haven't done that.
jujube
 
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: armature bone rotation

Postby Aranuvir » Tue May 01, 2018 7:41 pm

To run from source, you need to download Python3 from python.org. Then install PyQt5, numpy and OpenGL, by either using Python3's pip or with the package manager from PyCharm.
Use this code to check your dependencies:
Code: Select all
import importlib.util
import sys

spec = importlib.util.find_spec('PyQt5')
if not spec:
    print('PyQt5 missing')
else:
    print('PyQt5 found')

spec = importlib.util.find_spec('numpy')
if not spec:
    print('Numpy missing')
else:
    print('Numpy found')

spec = importlib.util.find_spec('OpenGL')
if not spec:
    print('OpenGL missing')
else:
    print('OpenGL found')

print('Python version :', sys.version)
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

PreviousNext

Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 1 guest