Black .egg model

I converted a fully rigged model from .blend to .egg, and when i try to use it in my code its all black, also i converted the body only not the skeleton, another question, is there is any way for me to control the skeleton using python media pip, in real time, im trying to make a simple mocap and im not allowed to use the blender mocap features, any suggestions?

import sys
from direct.showbase.ShowBase import ShowBase
from panda3d.core import AmbientLight, DirectionalLight, Vec4
from math import pi, sin, cos
from direct.task import Task
class ShowScene(ShowBase):
    def __init__(self):
        super().__init__()

        # Load the 3D model
        self.env = self.loader.loadModel("vincent5.egg")
        self.env.reparentTo(self.render)
        
        # Print the FPS for performance monitoring
        self.setFrameRateMeter(True)
        
        # Apply scale and position transforms on the model
        self.env.setScale(7, 7, 7)
        self.env.setPos(0, 42, -5)  # Center the model
        self.env.setShaderAuto()

        # Create Ambient Light
        ambientLight = AmbientLight('ambientLight')
        ambientLight.setColor((0.3, 0.3, 0.3, 1))
        ambientLightNP = self.render.attachNewNode(ambientLight)
        self.render.setLight(ambientLightNP)

# Run the application
if __name__ == "__main__":
    app = ShowScene()
    app.run()

this is the .blend model
vincentV1

Greetings, and welcome to the forum! I hope that you find your time here to be positive! :slight_smile:

Well, you do have only an ambient light, and quite a dim one at that. What happens if you point a bright directional light towards the object? Something like this:

        directionalLight = DirectionalLight("mew")
        directionalLight.setColor((1, 1, 1, 1))
        directionalLightNP = self.render.attachNewNode(directionalLight)
        self.render.setLight(directionalLightNP)

(The light should be default be pointing along the positive Y-axis, I believe. Thus, since your object is offset from the origin primarily along the positive Y-axis and the camera should likewise by default be pointed along the positive Y-axis the camera should see the illuminated side of the object.)

Well, if you didn’t export the skeleton, then it presumably won’t be present for you to control.

(Unless you create a whole new skeleton, of course, which can be somewhat involved.)

But speaking more generally:

There is!

If you load your model (exported with its skeleton) as an Actor, then you can gain control of the skeleton’s bones–in Panda referred to as “joints”–via the “exposeJoint” method of the Actor class.

You can see a simple version of this in the “Looking and Gripping” sample-program, I believe.
https://docs.panda3d.org/1.10/python/more-resources/samples/looking-and-gripping

There is not enough information. With the help of which exporter you did it (the name of the exporter) and the place (URL) where you received it.

1 Like

well, the glasses and the hair are brighter but with no color still, and the body is still black

also I’m using PRPEE by kergalym maybe there is something that i can do while exporting?
this is the PRPEE exporting menu

also this are my selections to export

I’m using PRPEE by kergalym maybe there is something that i can do while exporting?
this is the PRPEE exporting menu

Oh wow, please stop using PRPEE. As a first step.

(We’ve had a number of people come here with trouble using PRPEE, as I recall. While things may have changed, last I heard it was somewhat specific to its authors intentions, and not reliable for general use.)

If you’re using a new version of Blender, I’d suggest trying either blend2bam, or perhaps try Maxwell175’s port of YABEE, or maybe LifeLand’s omUlete.

(With blend2bam being my primary recommendation.)

See here for a bit more:
https://docs.panda3d.org/1.10/python/tools/model-export/converting-from-blender

2 Likes

I convert it with blend2bam and still the same thing

What type of shader do you have? You need to make sure that you are using Principled BSDF.