Note that there are some explanatory texts on larger screens.

plurals
  1. POConvert 3D model to SceneJS JSON, including texture
    primarykey
    data
    text
    <p><strong>Motive</strong><br> I'm trying to create a small demo application using WebGL. I chose to use SceneJS, because it seemed an easy framework and would more than suffice for this purpose.</p> <p>I have downloaded a couple of .blend models (<a href="http://e2-productions.com/repository/modules/PDdownloads/singlefile.php?cid=2&amp;lid=391" rel="noreferrer">Amy Rose</a>, amongst others) and exported them as a Collada (.dae) file using Blender. Then I used scenejs-pycollada to convert them to a json model. </p> <p>I just spent a couple of hours getting the <a href="http://scenejs.wikispaces.com/scenejs-pycollada" rel="noreferrer">scenejs-pycollada</a> convertor to work. Apparently getting those Python dependencies to work in Windows isn't that easy if you've never used Python before. ;)</p> <p><strong>Problem</strong><br> But now I'm stuck (again). My problem is that the models don't have any textures or materials. </p> <p>I used the <a href="http://scenejs.org/dist/curr/extr/examples/seymour-plane/index.html" rel="noreferrer">Seymour Plane Example</a> of SceneJS. The model I converted is hardly visible. It is black and doesn't seem to respond to the lighting in the scene. If I load the plane and the model together, I can see the model is loaded, because its arms and legs are sticking out of the plane.</p> <p>Now I followed a couple of tutorials that would let me export the texture as a PNG image. I then modified the texture file name in the JSON model to match the file name, but it doesn't help.</p> <p>So I hope someone can help me to find a way to export Blender models (or other common 3D models) to the JSON format used by SceneJS, including the textures.</p> <p>Any other method of loading models in SceneJS will do too, as long as it works.</p> <p>If one 's got a link to free downloads of body/figure JSON models, that would help for now, but I rather learn how this works. :)</p> <p><strong>I'm using</strong></p> <ul> <li>Windows 7 Home Premium 64bit</li> <li>Python 2.7 (Windows 32bit) <br><em>I chose the 32 bit version, because of seemingly better support for libraries, and more available installers. At first I mixed up 32 and 64 bit and it caused me trouble, but now everything seems to work (except for the textures, that is).</em></li> <li>Blender 2.59</li> <li>SceneJS 0.8.0</li> </ul> <p><strong>My workflow</strong><br> In Blender I export the models to Collada (*.dae) files, and then convert them to Raw JSON using scenejs-pycollada. This gives me a JSON file with two objects in it. The first seems to be the scene, the second the model. I keep the second and put it in a Javascript variable that is used in the code of the SceneJS example. The model ends with the properties <code>, "type": "library", "parent": "Scene"</code> which I need to remove from the code to make it load at all. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload