#39 new
lindsay.kay (at xeolabs)

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.

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

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

People watching this ticket

Tags

Referenced by

Pages