linkus

Mesh with baked lightmap (Blender Cycles)

Recommended Posts

Hello everyone! I've been lingering these forums for a few days, just reading, seems like people here are really nice and helpful to each other.

 

Anyway, I've been using three.js for the past month for my project, exporting blender models with lightmap textures baked in using cycles and the node editor (pretty much the most basic lightmap baking workflow, probably).

 

Now, I'm on the verge of a decision on switching to babylon.js, because after looking through the code, seems to me, even though it's younger than three.js it's a lot more complete.

 

Anyway, from what I've read in various places about the babylon.js exporter for blender, I cannot use cycles or nodes to export my models (only blender renderer, whoever uses that nowadays...).

 

Is there a quicker way of exporting my models using cycles baked in lightmaps/textures (via the node editor) into babylon, without doing the long manual labor (bake->export->edit texture externally (merge lightmap with the texture itself)->add a blender render texture in blender, find the texture->export to babylon) for each seperate model? My scenes have from 20 to 80 different objects with textures, so this cumbersome workflow is very ineffective.

 

I hope you understand my question and I really hope it's not a stupid one (or an answered one, because I've searched the whole forum for answers). :)

Share this post


Link to post
Share on other sites

I think the issue is that babylon exporter needs the materials to be formatted in a specific manner to convert to a json file properly.  There might be a script out there that allows you to convert cycles materials to blender render -- which might be a good approach...

Share this post


Link to post
Share on other sites

 

That's exactly the same workflow I'm using. It's kind of the default one for when it comes to lightmap/texture baking.

 

I think the issue is that babylon exporter needs the materials to be formatted in a specific manner to convert to a json file properly.  There might be a script out there that allows you to convert cycles materials to blender render -- which might be a good approach...

 

 

I've seen cycles somehow working with the exporter being mentioned all over the place, for example on a pinned thread (http://www.html5gamedevs.com/topic/3203-9222015-announcements/). The first few lines of that thread:

 

 

2.2 is out: https://github.com/B...ases/tag/v2.2.0

 

 

And the link to see the documentation goes to github, which does not include any documentation whatsoever, just a feature list...

 

I'm ripping my hair out :/

Share this post


Link to post
Share on other sites

Both Blender exporters support Baking of Cycles & procedural textures. Here is a test scene:

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

 

You may want to look at what you can do in the documentation:

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

 

When baking is done a smart project UV map is made, even if another UV is already present.  A future release will use a pre-existing UV, if it exists.

 

I do not know what a light map is, so I have no idea if it works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.