MH Problems

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

Re: MH Problems

Postby RobBaer » Sun Sep 27, 2020 3:35 pm

VapeLord wrote:OpenGL works, otherwise Blender would not start. My graphics card (Radeon HD 7690m xt) supports up to OpenGL 4.1.


Faulty logic. See Aranuvir's step 3 to be sure the required dependencies are really installed.
User avatar
RobBaer
 
Posts: 1046
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: MH Problems

Postby VapeLord » Sun Sep 27, 2020 4:14 pm

@Aranuvir

This is now a comprehensible instruction. It should go into the Wiki.

Unfortunately that did not help either. See file.

Crash.txt
(4.34 KiB) Downloaded 87 times
User avatar
VapeLord
 
Posts: 61
Joined: Mon Mar 23, 2020 7:09 am
Location: Germany

Re: MH Problems

Postby Aranuvir » Sun Sep 27, 2020 5:27 pm

This is now a comprehensible instruction. It should go into the Wiki.

Feel free to change the wiki to your needs. It's a community project ...

OK the issue is looking different now. Unfortunately there is no version info for OpenGL. To check if Python and OpenGL is working at all you can try this:

1) Run pip again to install glfw.
2) create a file and call it WhatEverYouWant.py with the following code in it:
Code: Select all
import glfw
from OpenGL.GL import *
import numpy as np
import ctypes
import sys


shaderPath = 'basic.shaders'

def readShaders(path:str):

    shaders = {'vertex': '',
               'fragment': ''}
    mode = None

    with open(path, 'r', encoding='utf-8') as f:

        for line in f:
            if 'VertexShader' in line:
                mode = 'vertex'
                continue
            elif 'FragmentShader' in line:
                mode = 'fragment'
                continue
            if mode:
                shaders[mode] += line

    return shaders['vertex'], shaders['fragment']


def compileShader(t:int, source:str)->int:
    id = glCreateShader(t)
    glShaderSource(id, source)
    glCompileShader(id)

    result = glGetShaderiv(id, GL_OBJECT_COMPILE_STATUS)
    if result == GL_FALSE:
        log = glGetShaderInfoLog(id)
        _t = 'vertex' if t == GL_VERTEX_SHADER else 'fragment'
        print('Failed to compile {} shader!\n{}'.format(_t, log))
        glDeleteShader(id)
        return 0
    return id

def createShader(vertexShader: str, fragmentShader: str) -> int:
    program = glCreateProgram()
    vs = compileShader(GL_VERTEX_SHADER, vertexShader)
    fs = compileShader(GL_FRAGMENT_SHADER, fragmentShader)

    glAttachShader(program, vs)
    glAttachShader(program, fs)

    glLinkProgram(program)
    glValidateProgram(program)
    validation = glGetProgramiv(program, GL_VALIDATE_STATUS)
    if validation == GL_FALSE:
        print('ERROR')

    glDeleteShader(vs)
    glDeleteShader(fs)

    return program


def main():

    if not glfw.init():
        return

    window = glfw.create_window(640, 480, 'Hello World', None, None)

    if not window:
        glfw.terminate()
        return

    glfw.make_context_current(window)

    print(f'Python : {sys.version}')
    print(f'Numpy : {np.version.version}')
    gl_version = glGetString(GL_VERSION)
    print(f'GL Version : {str(gl_version, encoding="utf-8")}')

    positions = np.array([-0.5, -0.5, 0.0,
                           0.5, -0.5, 0.0,
                           0.0,  0.5, 0.0], dtype=np.float32)

    colors = np.array([1.0, 0.0, 0.0, 1.0,
                       0.0, 1.0, 0.0, 1.0,
                       0.0, 0.0, 1.0, 1.0], dtype=np.float32)

    v_source, f_source = readShaders(shaderPath)
    shader = createShader(v_source, f_source)

    v_buffer = glGenBuffers(1)
    glBindBuffer(GL_ARRAY_BUFFER, v_buffer)
    glBufferData(GL_ARRAY_BUFFER, positions.nbytes, positions, GL_STATIC_DRAW)

    attr_pos = glGetAttribLocation(shader, 'a_position')
    glEnableVertexAttribArray(attr_pos)
    glVertexAttribPointer(attr_pos, 3, GL_FLOAT, GL_FALSE, 0, ctypes.c_void_p(0))

    c_buffer = glGenBuffers(1)
    glBindBuffer(GL_ARRAY_BUFFER, c_buffer)
    glBufferData(GL_ARRAY_BUFFER, colors.nbytes, colors, GL_STATIC_DRAW)

    attr_col = glGetAttribLocation(shader, 'a_color')
    glEnableVertexAttribArray(attr_col)
    glVertexAttribPointer(attr_col, 4, GL_FLOAT, GL_FALSE, 0, ctypes.c_void_p(0))

    glUseProgram(shader)

    while not glfw.window_should_close(window):

        glClear(GL_COLOR_BUFFER_BIT)

        glDrawArrays(GL_TRIANGLES, 0, 3)

        glfw.poll_events()

        glfw.swap_buffers(window)

    glDeleteProgram(shader)

    glfw.terminate()

if __name__ == '__main__':
    main()

3) create a second file and call it basic.shaders (lower case) with the following code:
Code: Select all
#VertexShader
#version 330

in vec4 a_position;
in vec4 a_color;

out vec4 v_color;

void main()
{
    gl_Position = a_position;
    v_color = a_color;
}

#FragmentShader
#version 330

in vec4 v_color;

out vec4 out_color;

void main()
{
    out_color = v_color;
}

4) Put these files in the same directory and from cmd.exe go to that directory and run python WhatEverYouWant.py. (BTW, admin is not necessary)

If OpenGL in Python is working this should give you a window with a colored triangle and print some information to the console. You can post that information.
All in all I'm not too positive to get your issues fixed. MakeHuman itself doesn't need that much resources. Perhaps you can try to run a tiny Linux in a virtual machine? But your notebook might be too weak for that...
Aranuvir
 
Posts: 1222
Joined: Sun Oct 12, 2014 2:12 pm

Re: MH Problems

Postby VapeLord » Sun Sep 27, 2020 5:54 pm

I have tried and this is the result:

Crash2.txt
(735 Bytes) Downloaded 75 times
User avatar
VapeLord
 
Posts: 61
Joined: Mon Mar 23, 2020 7:09 am
Location: Germany

Re: MH Problems

Postby RobBaer » Sun Sep 27, 2020 6:17 pm

This thread started with "I upgraded my driver and MH stopped working". A later caveat was that Blender 2.8 and beyond don't work with the old driver. One has to conclude that the key here is getting the graphic card driver right or switching graphics cards.

I assume that the upgraded graphics card driver was the right one for Windows 7 and not a Windows 10 driver? The graphics card is reportedly: Radeon HD 7690m xt: https://www.amd.com/en/support/graphics ... d-7690m-xt I also assume you got the right 32-bit /64-bit for your windows OS? Here is the AMD comment on legacy graphics cards: https://www.amd.com/en/support/kb/faq/gpu-630

I notice that your pip version is out of date. Did you upgrade it as suggested before installing the dependencies?

Also, in working this out, I know you have gone down the road of running MH from source, but if you have not done this before, it may end up causing problems unrelated to your original issue, confounding a solution. [FWIW, I use Anaconda python and MH runs fine on my Windows 10 systems so I'd like to think there is hope]. Unfortunately, Win 7 hit its end-of-life at the beginning of this year.

I don't have Windows 7, but I can assure you that current build version of Windows runs fine with my graphics card on Windows 10. I have a laptop that has Intel graphics as well as Nvidia graphic card. I can change which graphics card to use with MH so it used the Intel graphics card. Can you possible change your computer to use built in Intel graphics rather than you AMD card? Does this get you anywhere?
User avatar
RobBaer
 
Posts: 1046
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: MH Problems

Postby Aranuvir » Sun Sep 27, 2020 6:23 pm

Can you run dir in c:\test> ? I assume it's the Windows problem that the real filename is something like basic.shaders.txt ...
Aranuvir
 
Posts: 1222
Joined: Sun Oct 12, 2014 2:12 pm

Re: MH Problems

Postby VapeLord » Sun Sep 27, 2020 6:40 pm

@RobBear
The driver is the correct and also the latest version for this card.

By the way, I have zero idea about Python and how it works. So it is not easy for me to follow these steps. So I also have no idea how to update pip to the latest version.

Yes, the laptop has two graphics chipsets, Intel and Radeon. But I can't set that MH should run on Intel. If I deactivate the Radeon, I get problems with Blender.

I'm so confused by the whole story now, because nothing works.

@Aranuvir

i have tried the basic.shaders as both .py and .txt Both times the same error.
User avatar
VapeLord
 
Posts: 61
Joined: Mon Mar 23, 2020 7:09 am
Location: Germany

Re: MH Problems

Postby Aranuvir » Sun Sep 27, 2020 6:46 pm

@Rob: It's definitively the driver. I just try to figure out if the driver has changed the supported OpenGL versions, or PyOpenGL refuses to work with the driver. Upgrading pip will not help. Using Anacond could be helpful in the sense, that does not necessarily provide the latest versions of a library and perhaps older versions of PyOpenGL will work...
Aranuvir
 
Posts: 1222
Joined: Sun Oct 12, 2014 2:12 pm

Re: MH Problems

Postby Aranuvir » Sun Sep 27, 2020 6:50 pm

VapeLord wrote:@RobBear
@Aranuvir
i have tried the basic.shaders as both .py and .txt Both times the same error.

Sigh, rename the file to basic.txt and change the line in the other file from
Code: Select all
shaderPath = 'basic.shaders'
to
Code: Select all
shaderPath = 'basic.txt'
Aranuvir
 
Posts: 1222
Joined: Sun Oct 12, 2014 2:12 pm

Re: MH Problems

Postby VapeLord » Sun Sep 27, 2020 7:02 pm

Ahhh, I see a colorful triangle.
User avatar
VapeLord
 
Posts: 61
Joined: Mon Mar 23, 2020 7:09 am
Location: Germany

PreviousNext

Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest