https://github.com/mwttg/java-wavefront-reader
file reader for wavefronts (.obj & .mtl)
https://github.com/mwttg/java-wavefront-reader
java wavefront wavefront-obj
Last synced: about 1 month ago
JSON representation
file reader for wavefronts (.obj & .mtl)
- Host: GitHub
- URL: https://github.com/mwttg/java-wavefront-reader
- Owner: mwttg
- License: bsd-2-clause
- Created: 2021-08-13T15:00:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-22T14:52:40.000Z (over 4 years ago)
- Last Synced: 2025-08-15T14:59:28.030Z (6 months ago)
- Topics: java, wavefront, wavefront-obj
- Language: Java
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/mwttg/java-wavefront-reader/actions/workflows/build.yml)
[](https://codecov.io/gh/mwttg/wavefront-reader)
[](https://sonarcloud.io/dashboard?id=mwttg_java-wavefront-reader)
# Java Wavefront Reader
A library for reading wavefront files (.obj) and transforming them to Java Arrays of float.
These arrays can then be used by OpenGL (for VertexBufferObjects).
The arrays are collected inside a data structure called `Wavefront`.
## Requirements
* Java 16
* Maven 3.8.1 (only if you want to build/extend it)
## How to use
Import this library to your project
call the following function:
```
WavefrontReader.fromResource(filename)
```
* `filename` is the path and filename to the `.obj` file in your resource folder.
This returns a `Wavefront` data structure with filled float arrays for:
* vertices
* texture coordinates (only if information in .obj file is available)
* normals (only if information in .obj file is available)
## The Process
![Process Overview][process-overview]
## Release Notes
### 2021-08-22
Release Version 1.0.0
Read an .obj file and create a `Wavefront` data structure supported is:
* vertices
* uv (texture coordinates)
* normals (for light)
[comment]: <> (collection of links sorted alphabetically ascending)
[process-overview]: documentation/images/Process.png