Jump to content

Exporting Blender scene with texture


srt
 Share

Recommended Posts

Hi everyone,

 

I'm just a newbie exploring the possibilities with babylon.js. I have gone through simple tutorials and managed to create some shapes, explored the light and camera options. Then I wanted to insert more complicated things in my scene and downloaded blender for creating those scenes. As it turns out blender was a little bit complicated for me to create something sophisticated so I searched for models created by other users. I found this soccer stadium model: http://www.blendswap.com/blends/view/62667 , and thought it would be great playground for my little shapes to move around. I tried to export the scene as it is to .babylon file using the babylon exporter for blender but there was some problems with the windows of the stadium. 

 

 

processing begun of mesh:  Windows_Inner

processing begun of baked material:  Windows_Inner
========= An error was encountered =========
  File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_export_babylon.py", line 288, in execute
    mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self)
  File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_export_babylon.py", line 694, in __init__
    bakedMat = BakedMaterial(exporter, object, recipe)
  File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_export_babylon.py", line 1870, in __init__
    bpy.ops.mesh.select_all(action='SELECT')
  File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
ERROR:  Operator bpy.ops.mesh.select_all.poll() failed, context is incorrect

 

I couldn't find a way around to make it work with windows, so I removed the window layers from the scene and exported .babylon file this time.

 

But the scene on babylon didn't look like the images that are rendered in the blender. This might be a stupid expectation since I don't know too much about this stuff. But I think there should be a way to accomplish this. Then I found out that I'm getting the openGL rendered version of the scene rather than full render.

 

Difference is as follows:

 

OpenGL:

 

BdZdhlz.png

 

full render:

 

dmTZ2HT.png

 

Is there any possible way to export the scene as it looks like the full render option?

 

Thanks.

Link to comment
Share on other sites

Hey,

I downloaded this.  I looked at it, but would not get to this for a while.  Noticed some things on the description page that even if the export worked,  it might cause to never run right as this was designed:

  • Said there is a low poly version on layer 3 that is only 77,000 tris.  That is a lot of resources just for a background.  You would definitely want to use the low poly version, the high poly looks over 400k tris.  You should make layer 3 the only one active, & check 'Export only Selected Layers' in Exporter Settings (On scene properties tab).  Doing nothing would have resulted in 2 stadiums, had it worked.
  • Built for Blender version 2.68.  The baking section, where this errored, is very version sensitive.  You are running 2.76 which has not been tested as well, but this old .blends from Blendswap are not working out too well.

Wish I could say it looks possible, but most people making these .blends did not have exporting into a gaming engine in mind.  You might try deleting the Windows_inner mesh.  Problem will probably just happen on a different mesh.

Link to comment
Share on other sites

Well, I selected layer 3 only, and tried exporting with 'Export only Selected Layers' checked for the hell of it using 2.75.  It exported.  Noticed a number of problems.

  • There are 3 cameras, but none on layer 3, so they all ignored
  • There is only light, & is not on layer 3.

You would need to move a camera & light at bare minimum.

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...