incorrect geometry with scenejs-pycollada json files

28 views
Skip to first unread message

Benjamin Drucker

unread,
Feb 16, 2012, 6:57:23 PM2/16/12
to sce...@googlegroups.com

I'm having trouble with scenejs-pycollada.  This is the plane rendered from the JavaScript data here https://github.com/xeolabs/scenejs/tree/V2.0.0/src/examples/seymour-plane:

Here is the json output of the latest scenejs-pycollada using the dae.zip from the same location as above.



I used the version of scenejs-pycollada at https://github.com/rehno-lindeque/scenejs-pycollada.git.  At first I couldn't get this tool to run.  I made the following change:

index b391505..cd11a89 100644
--- a/translator.py
+++ b/translator.py
@@ -492,10 +492,10 @@ def translate_camera(camera):
             'type': 'camera',
             'optics': {
                  'type': 'perspective', #TODO: type of camera can't be retrieved a.t.m. assuming "perspective" for now
-                 'fovy': float(camera.yfov),
+                 'fovy': float(camera.fov),
                  'aspect': 1.0, # TODO: aspect ratio is not currently available
-                 'near': float(camera.znear),
-                 'far': float(camera.zfar)
+                 'near': float(camera.near),
+                 'far': float(camera.far)
             }
         }]
     }


What is going wrong, you think?

Benjamin Drucker

unread,
Feb 16, 2012, 6:59:05 PM2/16/12
to sce...@googlegroups.com
I see similar odd triangles with several other collada files I pulled and converted from the Sketchup warehouse.  This model is not unique.
Reply all
Reply to author
Forward
0 new messages