You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,7 @@
7
7
8
8
</div>
9
9
10
-
PyWavefront
11
-
===========
10
+
# PyWavefront
12
11
13
12
PyWavefront reads Wavefront 3D object files (`something.obj`, `something.obj.gz`
14
13
and `something.mtl`) and generates interleaved vertex data for each material ready for rendering.
@@ -28,13 +27,15 @@ been implemented:
28
27
* Normals
29
28
* Vertex Color
30
29
* Material parsing
30
+
* Texture and texture parameters
31
31
32
-
We currently don't support parameter space vertices, line elements or smoothing groups. Create an issue or pull request on github if needed features are missing.
32
+
We currently don't support parameter space vertices, line elements or smoothing groups.
33
+
Create an issue or pull request on github if needed features are missing.
33
34
34
35
The package is on [pypi](https://pypi.org/project/PyWavefront/)
35
36
or can be cloned on [github](https://github.com/pywavefront/PyWavefront).
36
37
37
-
```
38
+
```bash
38
39
pip install pywavefront
39
40
```
40
41
@@ -82,7 +83,7 @@ for name, material in scene.materials.items():
82
83
When ``cache=True`` the interleaved vertex data is written
83
84
as floats to a ``.bin`` file after the file is loaded. A json
84
85
file is also generated describing the contents of the binary file.
85
-
The binary file will be loaded the next time we attept to load
86
+
The binary file will be loaded the next time we attempt to load
86
87
the obj file reducing the loading time significantly.
87
88
88
89
Tests have shown loading time reduction by 10 to 100 times
@@ -91,7 +92,7 @@ depending on the size and structure of the original obj file.
91
92
Loading ``myfile.obj`` will generate the following files in the
92
93
same directory.
93
94
94
-
```
95
+
```txt
95
96
myfile.obj.bin
96
97
myfile.obj.json
97
98
```
@@ -123,12 +124,13 @@ Json file example:
123
124
```
124
125
125
126
These files will **not be recreated until you delete them**.
126
-
The bin file is also compessed with gzip to greatly reduce size.
127
+
The bin file is also compressed with gzip to greatly reduce size.
127
128
128
129
## Visualization
129
130
130
131
[Pyglet](http://www.pyglet.org/) is required to use the visualization module.
The [examples](https://github.com/pywavefront/PyWavefront/tree/master/examples)
165
-
directory contains some basic examples using the `visualization` module and further instructions on how to run them.
167
+
directory contains some basic examples using the `visualization` module and further
168
+
instructions on how to run them.
166
169
167
170
### Generating a Wavefront file with Blender
168
171
169
172
The following presumes you are using [Blender](http://www.blender.org/) to generate your mesh:
170
173
171
-
* Using Blender, create a mesh with a UV-mapped texture. The UV-mapping is important! If it is working properly, you will see the texture applied within Blender's 3d view.
174
+
* Using Blender, create a mesh with a UV-mapped texture. The UV-mapping is important!
175
+
If it is working properly, you will see the texture applied within Blender's 3d view.
172
176
* Export the mesh from Blender using the Wavefront format, including normals.
173
177
* Reference your `*.obj` file as in the pywavefront example above.
0 commit comments