I recently started integrating the RenderPipeline in my project, downloader from:
because it looks awesome!
However I have a problem when trying to display shapes that I am generating procedurally using the GeomVertexFormat, GeomVertexData and GeomTriangles(Geom.UHStatic) from panda3d.core.
The problem is that all these shapes appear pitch black regardless of the lights that I put in the scene.
I’m using a GeomVertexFormat with V3n3c4t2, so I have rows with: vertex, color, normal and texcoord.I couldn’t find any documentation on how to procedurally apply textures when using the RenderPipeline, and all the examples provided with the library use pre-created textured assets. So for the moment, I am only applying colors to my vertuces, no textures or materials (texcoord is always 0.0).
To fix my problem I tried:
- flipping the normals of my shapes
- adding more and stronger lights from rpcore and panda.core in my scene
but my models remain black.
My code after the creation of the GeomTriangles(Geom.UHStatic) looks like this:
geom.addPrimitive(triangle) node = GeomNode("my_test") node.addGeom(geom) nodePath = NodePath(node) nodePath .reparent_to(self.render) self.render_pipeline.prepare_scene(nodePath)
Any ideas about what I might be missing here?
Thanks a lot!