OBJ File Import
Reported by lindsay.kay (at xeolabs) | April 29th, 2010 @ 12:26 AM
Description
.OBJ is a simple file format for description of geometry. SceneJS needs to import geometry, material and texture from these into a scene graph.
Proposed Solution
Create a SceneJS.LoadOBJ node that generates its subgraph when first visited by loading and parsing an OBJ file, in a similar manner to the existing SceneJS.loadCollada node:
var graph = new SceneJS.LoadOBJ({
uri: "http://foo.com/files/myobj.obj"
})
Limitations
- Early versions would provide limited OBJ support, where there would be documented guidelines for what drawing programs may export to OBJ files that are desired to work with SceneJS.
SL Avatar Import
Aiming to import Second Life avatar files: http://secondlife.com/community/avatar.php
Vertex normals per face
OBJ files are optimized for doing immediate mode processing - they provides vertex normals per face instead of per vertex, which needs to be adapted to to provide a per-vertex normal array for loading into GLSL as a VBO. You must either duplicate vertices or calculate normals by averaging the surrounding vertex normals in a face.
- http://stackoverflow.com/questions/922952/mapping-wavefront-objs-vt...
- http://bill.dudney.net/roller/objc/entry/wavefront_obj_files_and_le...
- Calculating vertex normals: http://iphonedevelopment.blogspot.com/2008/12/more-on-opengl-and-no...
- Denny Koch seems to have worked out the vertex normal problem in EnergizeGL - will take a look at that
Holes in mesh when animating groups
Faces may be organised in named groups, which can map to BVH nodes that specify transforms. How are these groups to be transformed without showing holes in the mesh? Eg. if an "arm" group was rotated away from a "torso" group, then what prevents a hole from appearing under the armpit?
Import Options
Support configuration of options in import
* Okino OBJ importer for reference: http://www.okino.com/conv/imp_wave.htm
Resources
Comments and changes to this ticket
-
lindsay.kay (at xeolabs) May 2nd, 2010 @ 08:26 AM
- Milestone set to V0.7.4
-
lindsay.kay (at xeolabs) May 5th, 2010 @ 04:04 AM
- Milestone changed from V0.7.4 to V0.7.5
-
lindsay.kay (at xeolabs) May 11th, 2010 @ 06:59 AM
- Milestone changed from V0.7.5 to V0.7.6
-
lindsay.kay (at xeolabs) August 3rd, 2010 @ 11:33 PM
- Milestone cleared.
- Milestone order changed from 0 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.