Any interest in eliminating the binary component?

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

Any interest in eliminating the binary component?

Postby glynnc » Wed Jun 06, 2012 4:12 am

Given that makehuman is almost pure Python, is there any interest in eliminating the small number of C files?
I have a proof of concept, available at https://bitbucket.org/glynnc/makehuman/src
It has been lightly tested with 1.0 alpha 6 and the current subversion trunk, on Linux and Windows, and seems to basically work. It requires PyOpenGL, NumPy and PIL. SDL was replaced with GLUT (mainly because PyOpenGL already includes GLUT bindings and PySDL appears to be orphaned).
glynnc
 
Posts: 6
Joined: Wed Jun 06, 2012 3:49 am

Re: Any interest in eliminating the binary component?

Postby Manuel » Wed Jun 06, 2012 8:27 am

Check your email :)
Manuel
 

Re: Any interest in eliminating the binary component?

Postby duststorm » Wed Jun 06, 2012 10:56 am

Very interesting. I'm trying it out now.
There's only one thing I'm worried about a bit, and that is whether it will still have enough performance.
We were discussing whether we could delegate some more computational tasks to C code to make the GUI more responsive.

Pure python does have a lot of advantages too.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Any interest in eliminating the binary component?

Postby duststorm » Wed Jun 06, 2012 11:06 am

I tried it but received a segmentation fault (on linux).
Have you tested it on linux too, or is it a windows-only demo for now?

To make sure I did it correctly: I first extracted a stable alpha 6 archive in a folder, then I copied the files from your repo in that folder,
so that makehuman.py is in the same folder as the makehuman executable. Then I ran makehuman.py.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Any interest in eliminating the binary component?

Postby mflerackers » Wed Jun 06, 2012 11:28 am

I guess PySDL has been replaced by pygame (www.pygame.org) and pyglet (http://www.pyglet.org).
MakeHuman project Developer
mflerackers
 
Posts: 636
Joined: Thu Feb 05, 2009 11:53 am
Location: Kyoto

Re: Any interest in eliminating the binary component?

Postby robertltux » Wed Jun 06, 2012 1:32 pm

my only concern is situations where folks have multiple versions of Python installed what happens then??

on a side note as part of sorting out why Custom Eye Support seems to be broken how could i get some sort of debug console going?? I have tried to run the makehuman.pyd file but it has some sort of encoding problem.
robertltux
 

Re: Any interest in eliminating the binary component?

Postby glynnc » Wed Jun 06, 2012 3:13 pm

duststorm wrote:I tried it but received a segmentation fault (on linux).
Have you tested it on linux too, or is it a windows-only demo for now?

I tested the subversion trunk on Windows and Linux and 1.0a6 on Windows.
glynnc
 
Posts: 6
Joined: Wed Jun 06, 2012 3:49 am

Re: Any interest in eliminating the binary component?

Postby glynnc » Wed Jun 06, 2012 3:33 pm

duststorm wrote:There's only one thing I'm worried about a bit, and that is whether it will still have enough performance.

That depends upon the number of meshes and the overhead per mesh. The size of each mesh shouldn't affect the C-versus-Python balance; glVertexPointer() etc doesn't care about the size of the array (unless it's being converted, but that would also affect C performance).
The per-mesh overhead can be reduced somewhat (at the expense of compatibility) by using features of later OpenGL versions, e.g. VAOs and uniform buffer blocks, or by pushing more of the work onto the shader.
glynnc
 
Posts: 6
Joined: Wed Jun 06, 2012 3:49 am

Re: Any interest in eliminating the binary component?

Postby glynnc » Thu Jun 07, 2012 2:29 am

robertltux wrote:my only concern is situations where folks have multiple versions of Python installed what happens then??

Multiple installations shouldn't interfere with each other. A batch file could be used to select a specific Python installation.
robertltux wrote:on a side note as part of sorting out why Custom Eye Support seems to be broken how could i get some sort of debug console going?? I have tried to run the makehuman.pyd file but it has some sort of encoding problem.

Running it from IDLE works for me (Python 2.7.2, 32-bit, on Windows 7, 64-bit).
makehuman.py is a trivial script; it just appends the "lib" subdirectory to sys.path, redirects stdout/stderr to files, then execfile()s main.py. If you add sys.path.append("./lib") to main.py (or move the files from lib to core), you should be able to run main.py directly.
glynnc
 
Posts: 6
Joined: Wed Jun 06, 2012 3:49 am


Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest