This Python module allows you to read Wavefront 3D object files (`something.obj` and `something.mtl`) and use them as Python objects. Currently Pyglet is required to render and display these objects.
Questions tagged [pywavefront]
7 questions
3
votes
0 answers
How to load Textures in Pyglet and Ratcave
I am making a simple OpenGL 3.3 OBJ viewer in Python using the modules Pyglet and Ratcave. I want to load a textured sphere I made in Blender. While my Pyglet/Ratcave OBJ viewer loads untextured OBJ files, when I add textures to my project, I get…

Jeffrey Thrash
- 31
- 3
2
votes
0 answers
How do I find the material that each face belongs to in PyWavefront?
I'm making a ray tracer in python 3, using PyWavefront to handle the .obj files. How can I get the material associations for each face? Wavefront.mesh_list[0].faces has the faces, but it's as a list of vertices without material data.…

imagelesskink
- 21
- 3
2
votes
1 answer
Unimplemented OBJ format statement 's' on line 's 1' ERROR
hi i am going to import an OBJ 3d File using Pywavefront library and Display this 3d Model on another 3d scene finally. I studied about this library and 3d Models much.
import pywavefront
import pywavefront.visualization
from pywavefront import…

hosein
- 129
- 1
- 1
- 6
2
votes
1 answer
light on rendering obj file in python
I have an obj file, I want to render it with light however I have zero knowledge about graphics
please see the output
and the following is the obj file ex.obj
this the code I found in the net
what I want is light (diffuse light I think) ,…

user3029270
- 59
- 2
- 10
1
vote
0 answers
I have successfully created obj, mtl and texture image file but not able to generate 3D image using them
I have successfully created .obj, .mtl and .png texture file for 3D face reconstruction using this repository. In this obj file, I have v, vt, and f, and I have successfully plotted the obj file, but it doesn't work when it comes to using all these…

Asadullah Naeem
- 347
- 2
- 11
0
votes
1 answer
Set orientation of object in python using quaternions with pyglet, pywavefront and OpenGL
I want to set the orientation of an object in python using quaternions. I get my quaternions periodically via a serial port (this part works). My goal is to create a program similar to the following javascript project :…

elechris
- 128
- 9
0
votes
1 answer
pywavefront - How to extract the colors of each vertex?
I am trying to extract the colors for each vertex of the object file that I downloaded from https://www.turbosquid.com/3d-models/3d-s-chef-knife-model-1387505. However, the code below only saves the coordinates of each vertex and their faces in a…

Kong
- 2,202
- 8
- 28
- 56