Hi,
I have written an addon to Blender that allows baking all sorts of maps using xNormal as the external renderer directly from within Blender.
Maybe it is just me being workflow fanatic, but I found for myself that switching between the two applications was somewhat interrupting, time consuming and quite annoying when processing a lot of maps for little pieces.
Well, this addons gives me all I need directly inside Blender and removes using yet another Gui.
I must mention that this addon is a
far cry from stable or production-ready, since there are at the moment 16 different maps you can bake (all that xNormal offers minus base-texture-bake for now) with each of them having their options again. I haven't invested the time to actually test all of them yet, since I don't know if there is even a single person interested in using such a tool and I can always fix bugs for myself when they cross my way.
So yes, if there is someone interested, then hands up please. Testing would also be much appreciated.
And a word for those who cannot be bothered re-learning: I made sure to keep the Blender integrated Gui layout close to xNormal's layout (at least for the map specific settings)
Initial version of the tool is hosted on my website, at
http://felixschlitter.com/tool/blender-xnormal
Thanks
Replies
Although I use Blender for modeling and UVs, I've not tried baking yet. Have you found issues with bringing in highpoly zbrush meshes? (a few hundred thousand triangles after decimation).
If you find any bug in the batch mode or you need to change anything just tell me !
Jogshy, that sounds awesome!
Kat, yes the tool is using xNormal for all processing and is doing exactly what you think it is. All heavy lifting is done by xNormal. This addon just exposes the xNormal settings and gives quick access to baking directly from within Blender.
Key differences in initial version:
1) Only single low-poly / high-poly mesh
2) Only bake one map at a time
3) No base-texture baking
4) No blocker files
5) No cage files
I am interested in adding cage- and maybe blocker files but I am somewhat reluctant to add the multiple high- and low poly mesh feature, since I do want to keep it focused around what is actually happening in the Blender viewport (instead of abstract obj files). Not sure about base-texture baking at the moment, have not used that feature yet myself tbh.
Maybe I need to elaborate: xNormal can be launched from the command line and you can provide it with an xml file that holds the settings. What my addon does is expose the available xNormal settings, then write them to a xml file and then start xNormal with that xml file. Then you get the images out the other end, completely without manually starting or fiddeling with xNormal itself.
The idea of integrating it into Blender was to get access to all these settings more quickly and more easily and therefore streamlining the process of straightforward map baking. I am interested in taking it further and making it more efficient if people are interested in it. Else I will probably keep it around and update it once in a while when I feel like it.
I also changed a little thing: You now set the xnormal.exe in the addon preferences in the user-preferences->addons->xnormal. This means the path to the exe is maintained across all files, thanks to finally having separate user prefs and startup scene.
One rather significant problem. The first session with 2.68 I played around with baking out maps, everything worked fine. I rebooted, did the sleep thing, and the next day re-opened Blender and it freaked out about not finding Xnormal's path, which I had determined after peeking at the code. It seemed that Blender wasn't saving the executable's path. Anyway, I set that up and was able to get the Xnormal prompt to start up from after pressing the 'Bake' button, but now after both the high and low poly are loaded up, Xnormal's window vanishes into thin air. I'm going to uninstall both Blender and Xnormal, and re-setup it all, but I thought this should be brought to your attention since it may be an odd code thing.
sadly you have to use some magic and the shell modifier, because blender doesnt use cages
yep, one of the few points where blender is behind
Yeah so, maybe you could make a copy of the mesh, and then the script could have a button for "use as cage" or whatever.
Even better yet would be something automatic in the cage that makes a copy, adds the displacement function with a slider for strength or something, and automatically exports that with the lowpoly.... Dunno how much of this is possible in blender but that would mimic the cage features of max/maya, a bit better.
Should not be too much problem to add to the script, but I'll let FelixSchl answer that part.
Thanks for you work on the script though!