linkus Posted November 5, 2015 Share Posted November 5, 2015 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). Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted November 5, 2015 Share Posted November 5, 2015 Wonder if this works (I have not tried it yet): http://blender.stackexchange.com/questions/13508/how-do-i-bake-a-texture-using-cycles-bake Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted November 5, 2015 Share Posted November 5, 2015 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... Quote Link to comment Share on other sites More sharing options...
linkus Posted November 5, 2015 Author Share Posted November 5, 2015 Wonder if this works (I have not tried it yet): http://blender.stackexchange.com/questions/13508/how-do-i-bake-a-texture-using-cycles-bake 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 Major updatesBlender can now bake Procedural textures & Cycles materials. Plus more. See documentation here (Palmer-JC) 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 :/ Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 5, 2015 Share Posted November 5, 2015 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. Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted November 5, 2015 Share Posted November 5, 2015 I think it's a misnomer -- You can bake a OSL material in blender and stick it into babylon. But, you still will need to switch back over to the blender internal to export it though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.