Jump to content

Blender.SceneLoader basic file loading ?


webGLmmk
 Share

Recommended Posts

I'm using Github pages to play around with Blender scenes. Following David Catuhe's tutorial (understanding but just pasting his script), I successfully loaded a simple box and plane scene from a .babylon file. 

I have three pages posted here, labelled "Loaded Blender..." http://gson78.github.io/miscWebGLpages/

gh-pages repo here: https://github.com/gson78/miscWebGLpages/tree/gh-pages

The first, Loaded Blender box trial 1, is working. That loads the file simple-box.babylon from the same folder .

The second, Loaded Blender box trial 2 (not working), is not loading the scene. Same file, simple-box.babylon The page loads, black without the scene..it just spins. That page I'm trying to load fa copy of the file from within the folder labeled "blender-scenes"  - one folder down the tree. Maybe I"m not understanding the parameters here.

BABYLON.SceneLoader.Load("blender-scenes", "simple-box.babylon", engine, function 

 

The third link, Loaded Blender Speaker Model Download (not working).  That loads the file Speakers.babylon, from the same folder as index.html.  That page loads, black, spins for a  couple of seconds, then is just black.

Both of these babylon files load into the sandbox. This speaker model i downloaded from blendswap.com, and I really didn't do anything to simplify the scene, i just exported to babylon. My next step would be to simplify the scene to just one light and camera. Any insight on that would be appreciated, but starting with just one question at a time, I'm wondering how I load a babylon file from a secondary folder, for the sake of organization/volume.

Thanks again!

Edited by gson78
clarified language
Link to comment
Share on other sites

23 hours ago, JCPalmer said:

I do not use SceneLoader, but I know SceneLoader.Load is depreciated.  Think you need a directory terminator, '/' or '\', on blender-scenes.

Maybe:


scene = engine.newScene();
BABYLON.SceneLoader.Append('blender-scenes/', 'my.babylon', …)

 

 

17 hours ago, Deltakosh said:

I think JCP is right, the first parameter is a folder so it needs to end with /

Can you publish your pages somewhere so we can test them?

@JCPalmer The slash / after the first parameter worked, thanks!

@Deltakosh thanks, As far as the Speakers.babylon file, I'm going to mess with the Blender file first, then export something simpler and see if that works. There's a bunch of lighting and planes and a lightmap or something I dont know much about and who knows what else. I'll work on using jsfiddle maybe in case I need to post again.

 

I know that the PhysicsEngine is updated but I figured I would try this the first time, then gather what I could from newer examples,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...