Issues.00541 - lordmundi/wikidoctest GitHub Wiki
00541: add capability to load obj wavefront models
Summary: add capability to load obj wavefront models
Created: 2015–05–19 16:45
Status: Released
Category: Request
From: frankie
Version: 2.3
Released_In: 2.4
Description:
It would be nice if EDGE natively supported loading of wavefront (.obj) model files.
Comments
krink August 10, 2015, at 01:32 PM: Wavefront (.obj) loader plugin created for EDGE. It supports color and texture given in a separate material (.mtl) file, and it supports smoothing groups.
Notes:
- .mtl file must be in same directory as .obj file.
- Texture images must be in a directory within the TEXTURE_MAP_PATH (typically $USERDATA/textures).
- Loader does not build faces with less than 3 vertices.
- Loader does not build individual points and lines.
- Loader does not calculate vertex normals (VNs) if they are not already given (TODO: implement calc_vertex_normals function).
- If VNs not included, object defaults to flat. If VNs included, object defaults to smooth unless smoothing flag turned off in .obj file.
- Default appearance for no .mtl file is white, flat, and fully opaque.
- Transparency (represented by 'd' or 'Tr') value of 0 is fully opaque and 1 is fully transparent.
- Does not support 'illum' settings. (TODO: add illum handling capability).
- Blender export of obj files frequently creates opaque materials in an .mtl file with illum 2 and d 1. Without illum settings, this material is transparent (see previous two bullets). If loader finds a material with illum 2, transparency will be set to 0 and a warning will be printed.
- Loader only supports rgb color values.
- Loader only uses diffuse texture indicated by 'map_Kd'. (TODO: implement ambient texture and bump map).
Possible reasons for seg fault:
- Empty line before the first 'newmtl' declaration in .mtl file
- A material without a name (e.g. using 'newmtl' and 'usemtl' with no text after)
(TODO: Fix these issues to output warning instead of seg fault)
Associated Commits
| commit | 7e928eb65071f7c277b4f01542b203b82ef14cce
link6 |
||
| Author: | Frank Graffagnino
|
| Date: | Thu Oct 15 17:02:56 2015 -0500
|
| Message: | [@Issue 00541: Added objloader to default loads
@] |
Affected Files:
blank.cfg | 1 +
cev.cfg | 1 +
2 files changed, 2 insertions(+)
| commit | 7b147e534222561cf7abc74a499d81fde8238998
link7 |
||
| Author: | Frank Graffagnino
|
| Date: | Tue Aug 11 13:14:09 2015 -0500
|
| Message: | [@Issue 00541: Added in new wavefront / obj model loader plugin with source
@] |
Affected Files:
plugin_Darwin/dsp_objloader.so | Bin 0 -> 43476 bytes
plugin_Linux_FC3/dsp_objloader.so | Bin 0 -> 47331 bytes
plugin_Win32/dsp_objloader.dll | Bin 0 -> 458566 bytes
src.dist/includes/dsp_objloader.h | 91 ++
src.dist/plugins/examples/dsp_objloader.c | 1449 +++++++++++++++++++++++++++++
5 files changed, 1540 insertions(+)
| commit | a06c066a6b7daa17d7232d880560d429725ec3f0
link8 |
||
| Author: | Frank Graffagnino
|
| Date: | Tue Aug 11 13:07:48 2015 -0500
|
| Message: | [@Issue 00541: Added in first version of new wavefront / obj loader plugin
@] |
Affected Files:
src/includes/dsp_objloader.h | 91 +++
src/plugins/dsp_objloader.c | 1449 ++++++++++++++++++++++++++++++++++++++++++
src/plugins/linux | 8 +
src/plugins/mac | 8 +
src/plugins/win32 | 8 +
5 files changed, 1564 insertions(+)