Procedural Texture Baking
Procedural Texture Baking
Hi, been away for a while, but am back indigoing!
I was wondering if anyone else has been doing this (baking Blender's procedural textures onto a UV-mapped image) or am I coming across something that everyone already does?
I just started messing with this today and it appears to work fine. So while it's true that you can't use Blender textures, it does seem fairly elementary to set up your material as you like and then run the "Bake Texture" script in the UV window on your unwrapped UV map, as you would normally in Blender, then moving the resultant file to the Indigo directory. There seems to be slight discrepancies between the Blender/Indigo UV maps, but they're small and probably easy to fix.
Anyone doing this or have any thoughts/advice? I'll post an image in the morning.
Again, sorry if this is old news - I did a forum search for 'Bake' and found nothing.
I was wondering if anyone else has been doing this (baking Blender's procedural textures onto a UV-mapped image) or am I coming across something that everyone already does?
I just started messing with this today and it appears to work fine. So while it's true that you can't use Blender textures, it does seem fairly elementary to set up your material as you like and then run the "Bake Texture" script in the UV window on your unwrapped UV map, as you would normally in Blender, then moving the resultant file to the Indigo directory. There seems to be slight discrepancies between the Blender/Indigo UV maps, but they're small and probably easy to fix.
Anyone doing this or have any thoughts/advice? I'll post an image in the morning.
Again, sorry if this is old news - I did a forum search for 'Bake' and found nothing.
Hey bq1...
Using backed textures for is great, but as long as Animation isn't a Indigo Playground, I strongly prefer to render some effects in Multipass mode...
A Ambient Occlusion, one Depth (for DOF) and sometimes a Global Illumination Layer and Shadow Layer.
Using them to finalize your Indigo Rendered Image gives you much more flexibility, than an "fixed" backed Texture...
Using backed textures for is great, but as long as Animation isn't a Indigo Playground, I strongly prefer to render some effects in Multipass mode...
A Ambient Occlusion, one Depth (for DOF) and sometimes a Global Illumination Layer and Shadow Layer.
Using them to finalize your Indigo Rendered Image gives you much more flexibility, than an "fixed" backed Texture...
polygonmanufaktur.de
Thanks for your reply ZomB. Haven't really looked at the finalizing topics you mention but will do. I'm thinking more about getting 'volumetric' textures such as 3D wood and marble, etc. mapped onto complex objects, as UV mapping of such things is wrecking my head. .
The below is a little test I did, though I couldn't have picked a worse material. (slaps forehead). I should have just made a nice wood or something, but you get the idea. Notice the seams in both the Indigo and Blender UV renders and the slight discrepancy. As I said though, I'm sure this is a small thing to tweak on the map. Also, the colours/shaders would need fiddling with, but I reckon I'll be using this alot.
The below is a little test I did, though I couldn't have picked a worse material. (slaps forehead). I should have just made a nice wood or something, but you get the idea. Notice the seams in both the Indigo and Blender UV renders and the slight discrepancy. As I said though, I'm sure this is a small thing to tweak on the map. Also, the colours/shaders would need fiddling with, but I reckon I'll be using this alot.
- drBouvierLeduc
- Posts: 412
- Joined: Wed Oct 11, 2006 2:32 am
- Location: france
- drBouvierLeduc
- Posts: 412
- Joined: Wed Oct 11, 2006 2:32 am
- Location: france
Ok, here goes. I've never written a tutorial before and I'm no expert on UV mapping, God knows! There will no doubt be mistakes and easier ways to do things, so apologies in advance. Please comment...
BAKING BLENDER'S PROCEDURAL TEXTURES FOR USE WITH INDIGO
Versions I used:
Blender 2.42
Indigo 0.5
Blender2Indigo Exporter 0.5beta
1. Open blender, delete the default cube and add a UV sphere ([Spacebar] -> Add -> Mesh -> UVSphere). I rotated mine around for a bit so the texture would be more interesting. (I know, texture-rotate, but I cheated...)
2. Now set up a material for it as indicated below (or whatever you like really ), by upping the colour to white and adding the two wood textures.
3. Split your screen so you have a 3D window and UV/Image editor visible. In the 3D window switch from 'Object Mode' to 'UV Face Select', making sure your sphere is selected.
4. Press 'a' in the 3D window to select all faces, then in the UV/Image Editor, create a new image (Image -> New...). I used 512x512.
5. Still in the UV/Image Editor window, select the 'Archimap UV Projection Unwrapper' script from the 'UVs' menu. I used the following options:
- Fill in holes (space efficient, slow)
- Unwrap all ... (this won't matter if you selected all the faces)
- ...then just use the defaults for the last two settings.
6. Then select the 'Texture Baker' script from the 'UVs' menu in the UV/Image Editor window. Note: If you use a screen-resolution of 800x600 (like me) you'll have [Ctrl-UpArrow] to maximise that window to access the upper part of the menu. I used the following options:
- No replace
- Size: 512
7. When the UV map renders (and this was an epiphany for me ), press F3 to save it. I called it 'wood-tex.png'.
8. Now that we have an image to work with, we can remove the procedural textures from our sphere. With the sphere selected, go to the Materials pane in the Buttons window and clear the textures out.
9. Now, in the Texture pane, add a new image texture and load in the file we just 'baked'. Doesn't hurt to give the texture a meaningful name. .
10. Back in the Materials pane, with the new texture selected, set up the mapping as follows...
11. A quick Blender-render shows us our result. It's not bad, but the seams are visible.
12. If you go back to 'UV Face Select' mode in the 3D window with the sphere selected, select all it's faces, then load the baked image into the UV/Image editor you can see where the problems lie, as below.
13. There are probably various ways of tackling this, but just for now I'm going to move the UV map up a little bit, then do the following to each of the six UV 'areas'.
a) Select a UV point, then press [Ctrl+L] to select the other linked points in that 'area'
b) Hit to scale, then type .995 to scale it down just a teeny bit.
c) Hit [Enter] to apply the scale.
14.
That's a bit better! Ok, so now let's export to Indigo in the usual way and render to see what happens. BEFORE YOU START THIS make sure that you've copied the baked image to the Indigo directory, and if you have trouble with it not rendering the texture, try converting the file to a JPG instead of PNG, remembering to change the relevant texture path in the XML. I had to do this so be prepared for it.
I ended up with the image below
You can still clearly see the seams, but with tweaking I'm sure they could be overcome. Maybe scaling those 'areas' by .995 was a bit light-handed, or perhaps there's an tiny offset between Blender and Indigo?
I suppose you could also create some nice bump maps using this technique too. I'll be playing with it for a while, no doubt. Anyways, time for coffee.
@Aardbei:
Haven't used that, but will check it out, thanks!
BAKING BLENDER'S PROCEDURAL TEXTURES FOR USE WITH INDIGO
Versions I used:
Blender 2.42
Indigo 0.5
Blender2Indigo Exporter 0.5beta
1. Open blender, delete the default cube and add a UV sphere ([Spacebar] -> Add -> Mesh -> UVSphere). I rotated mine around for a bit so the texture would be more interesting. (I know, texture-rotate, but I cheated...)
2. Now set up a material for it as indicated below (or whatever you like really ), by upping the colour to white and adding the two wood textures.
3. Split your screen so you have a 3D window and UV/Image editor visible. In the 3D window switch from 'Object Mode' to 'UV Face Select', making sure your sphere is selected.
4. Press 'a' in the 3D window to select all faces, then in the UV/Image Editor, create a new image (Image -> New...). I used 512x512.
5. Still in the UV/Image Editor window, select the 'Archimap UV Projection Unwrapper' script from the 'UVs' menu. I used the following options:
- Fill in holes (space efficient, slow)
- Unwrap all ... (this won't matter if you selected all the faces)
- ...then just use the defaults for the last two settings.
6. Then select the 'Texture Baker' script from the 'UVs' menu in the UV/Image Editor window. Note: If you use a screen-resolution of 800x600 (like me) you'll have [Ctrl-UpArrow] to maximise that window to access the upper part of the menu. I used the following options:
- No replace
- Size: 512
7. When the UV map renders (and this was an epiphany for me ), press F3 to save it. I called it 'wood-tex.png'.
8. Now that we have an image to work with, we can remove the procedural textures from our sphere. With the sphere selected, go to the Materials pane in the Buttons window and clear the textures out.
9. Now, in the Texture pane, add a new image texture and load in the file we just 'baked'. Doesn't hurt to give the texture a meaningful name. .
10. Back in the Materials pane, with the new texture selected, set up the mapping as follows...
11. A quick Blender-render shows us our result. It's not bad, but the seams are visible.
12. If you go back to 'UV Face Select' mode in the 3D window with the sphere selected, select all it's faces, then load the baked image into the UV/Image editor you can see where the problems lie, as below.
13. There are probably various ways of tackling this, but just for now I'm going to move the UV map up a little bit, then do the following to each of the six UV 'areas'.
a) Select a UV point, then press [Ctrl+L] to select the other linked points in that 'area'
b) Hit to scale, then type .995 to scale it down just a teeny bit.
c) Hit [Enter] to apply the scale.
14.
That's a bit better! Ok, so now let's export to Indigo in the usual way and render to see what happens. BEFORE YOU START THIS make sure that you've copied the baked image to the Indigo directory, and if you have trouble with it not rendering the texture, try converting the file to a JPG instead of PNG, remembering to change the relevant texture path in the XML. I had to do this so be prepared for it.
I ended up with the image below
You can still clearly see the seams, but with tweaking I'm sure they could be overcome. Maybe scaling those 'areas' by .995 was a bit light-handed, or perhaps there's an tiny offset between Blender and Indigo?
I suppose you could also create some nice bump maps using this technique too. I'll be playing with it for a while, no doubt. Anyways, time for coffee.
@Aardbei:
Haven't used that, but will check it out, thanks!
- drBouvierLeduc
- Posts: 412
- Joined: Wed Oct 11, 2006 2:32 am
- Location: france
Who is online
Users browsing this forum: No registered users and 32 guests