Jump to content

Get Baked!


JCPalmer
 Share

Recommended Posts

post-8492-0-72948900-1438978723.png

The latest Blender exporters now support both procedural textures and the Cycles Render.  Here are scenes from both:

 

inline .js:

https://googledrive.com/host/0B6-s6ZjHyEwUfkxKTWU2cXZQOGxydC1KS2o0NHUzRzFUTFlNYldDUmIzZ0JxeGVqMlU3c3M/index.html

 

Other improvements:

  • in-line Textures

  • FreezeWorldMatrix & Material.checkOnlyOnce optimizations

  • Documentation https://github.com/BabylonJS/Extensions/tree/master/TowerOfBabel

  • Save-able export options into the .blend file

  • All shadow maps types allowed

  • 32 bit vertex limit for multi-material meshes

  • Quaternions for rotation & animation of meshes & cameras

  • Armatures not required to be the parent of meshes

  • 3D camera rigs

Do to the changes in the Camera Type list, the setting in a .blend may have changed.  Please set again in that case.

 

With adding Cycles Render, there may be a flurry of things people begin to notice that need addressing.  This is to be expected.  Materials should work much as they did before when not baking, however.

Link to comment
Share on other sites

Yes. Going to let it age a little. Already think need more for Cycles. Most people never mix renders in the same scene, since it won't all render at the same time. Works in exporter though. What does not work is multiple renders for the same mesh.

Next edit, I will switch to full path for images. Will simplify things being in multiple spots.

Link to comment
Share on other sites

Jeff, I tried the new version (v3) with the boo.blend file from the No material on model ... thread.

 

No babylon file created and this is the log file:

 

 

   Exporter version: 3.0.0, Blender version: 2.75 (sub 0)
========= Conversion from Blender to Babylon.js =========
    Python World class constructor completed
    processing begun of mesh:  Dientes
        WARNING: No materials have been assigned:
        num positions      :  6656
        num normals        :  6656
        num uvs            :  0
        num uvs2           :  0
        num colors         :  0
        num indices        :  36864
    processing begun of mesh:  Cuerpo
        processing begun of baked material:  Cuerpo
            Cycles baking texture, type: DIFFUSE_COLOR, mapped using: BakingUV
        num positions      :  28385
        num normals        :  28385
        num uvs            :  56770
        num uvs2           :  0
        num colors         :  0
        num indices        :  147456
    WARNING: The following camera not visible in scene thus ignored: Camera
    processing begun of mesh:  Lengua
        processing begun of baked material:  Lengua
========= An error was encountered =========
  File "C:\Users\Peter\AppData\Roaming\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 287, in execute
    mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self)
  File "C:\Users\Peter\AppData\Roaming\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 695, in __init__
    bakedMat = BakedMaterial(exporter, object, recipe)
  File "C:\Users\Peter\AppData\Roaming\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 1801, in __init__
    bpy.ops.object.mode_set(mode='EDIT')
  File "F:\downloads\blender\blender-2.75a-windows64\2.75\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
ERROR:  Operator bpy.ops.object.mode_set.poll() failed, context is incorrect
========= end of processing =========
elapsed time:  0 min, 19.4363 secs

 

 

 

It does bake out the texture.

 

Hope that means something to you.

 

Ohh and by the way, concerning the "Not sure why there are no eyes." comment you make on that thread about your googledrive example - the eyes are there just in the wrong position (see image below)

 

cheers, gryff :)

post-7026-0-42187700-1439058064.png

Link to comment
Share on other sites

Ok. The teeth did not have any material for me too. I got 2 materials when I did it. Yours died at the start of baking 2nd one.

Looking from that log file from other thread, my camera was visible, and I was using 2.74. Ignore the specular bake, I stopped that. I also used the other exporter, TOB,

The eyes was a good find, literally. Will pick with this after I rebuild my systems. Just got 2nd hard drive. 1 for Ubuntu 1 for win 10. See you must have gpu turned on to do this in 19 secs. Will rebuild both. an nvidia error on Ubuntu every boot and node npm issues that I could never fix with this build. If cannot get gpu rendering after that, then probably curtains for Ubuntu.

Link to comment
Share on other sites

Ok Jeff I have an export working now. The issue was with the tongue (Lengua mesh in the blend file).

 

This mesh has 3 modifiers that need to be applied -Mirror, Solidify and Subsurf

 

I applied the Mirror one first, went into Edit mode and remove duplicate verts (5)

Then back to Object mode and applied Solidify and finally Subsurf.

 

I get the same result as you did in a sandbox test (see image below). The eyes are mapped to somewhere over the ear (red box)

 

cheers, gryff :)

 

 

 

 

post-7026-0-16884000-1439076565.png

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