- Home /
Blender Node Editor Texturing to Image for Unity?
For those of you familiar with Blender 3d, you should also be familiar with the Node Editor in which you can generate amazing texturing onto 3d objects. The Textures/Materials made with the Node Editor make the objects look so stunning! But is it possible to export those generated textures to an image(s) for mapping onto an object in Unity?
I realize Blender is mainly for rendering HQ scenes and movies but to obtain those amazing textures you can create in the Node Editor would make my day. Is anyone familiar with this? Can this be done?
Answer by Graphics_Dev · Jan 20, 2016 at 01:58 AM
First, what you are doing in the node editor in Blender is basically ignored by Unity. In the node editor you are creating a complex shader for the material you are working on by combining Cycles' built-in shaders. Unity has its own set of shaders designed for rendering in a game that you will need to use in the end.
That said, you can still get something close to what you have in Blender (I will assume you are using Cycles not BI). The solution to the problem is what is called baking. If you let me know what kind of material this is (metallic, wooden, etc.) I can help you further, but here goes a generalized baking tutorial.
Make sure you have a good UV map on your model
Add a texture node on your material with the image you want to bake to (this should be a 2048x2048 image in most cases)
Go to the baking panel in Blender and select Diffuse Color (for diffuse materials like wood, stone, etc.)
Hit bake then save your image
Export your model as an FBX (make sure you have only the baked UV on the model at this point)
Import your model into Unity
Import your texture into Unity
Assign your texture to the material
Let me know if this helps ;)
Oh! Because baking is essentially getting the same result as the render preview correct? Only that way it is mapped to an image! Yeah, what I am specifically going for is skin like materials. $$anonymous$$ainly for monsters and some environmental object. If I wanted to make something extra shiny or metallic like a machine I would have to create a specular map, right?
Baking is the final product of whatever you select. Blender has a combined baking option that bakes all the lighting in with it which is what is seen in the render. This is often not what you want to use (because Unity wants an unlit version so it can calculate the lighting) so you can just bake out the other parts (glossy color, diffuse color, etc.). Blender 2.77 has a super cool baking option where combined has the option of what is included (lighting or no lighting, diffuse, glossy). I can't wait for this release :-P
If this answers your question, please mark my answer as correct to close the question ;)
Answer by Kamil1064 · Jan 19, 2016 at 08:46 PM
Hi, it's possible, just make uv map and bake it. If you want to use it as PBR then you must split chanels into layers. Here is link to PBR node pack (helping to use substance painter materials into cycles) but if you change those nodes and make outputs then you may connect them and bake these PBR channels as textures.
https://matthieubarbie.wordpress.com/2015/01/12/pbr_shader-1-75-for-blender-2-73-documentation/
Even if you're not using Substance, baking the texture channels is still the way to go.
Thanks! I don't know why baking never crossed my $$anonymous$$d. I'll have to try this out.