I have been following a great tutorial created by the developers of YoFrankie for the latest Blender. The newest Blender 2.48a now allows live Texture splatting. You can Paint Textures live and watch your handy work as you go. To mix textures you need a stencil map and two other textures. Here is the link to the tutorial…
That said my question is: Can I export these two textures along with the stencil map to Panda3d? I have attempted it multiple times and only one of the textures actually properly exports. I attempted Baking all textures to one image but it looks horrible (unless I’m messing it up). Any advice or direction will be greatly appreciated! Thank You!
You could combine the maps in GIMP.
But i would think the best route is to write your write shader to combine them. Its easy!
jep. you definetly need a shader for it, thought its a quite easy one.
looks like you need to set up multiple uv-maps and asign a texture to each (dunno if assigning already has to be done in panda). then feed it to a shader which does the blending.
since you’r working with it, you could also try to extend the chicken exporter to do the job
Alternatively, if there are just 2 maps, you could play some smart games with Combine modes as well. I once made a smart (very-specific) 3-tex terrain splatter using Combine modes and just 4 texture stages.
true that. if you export the “stencil” texture. and use the already fixed-pipeline combine modes for textures you can blend 2 textures without shaders. on more modern graficcards you can blend more than 2 but its getting tricky with more.
I would love to improve the chicken exporter to perform this task but I wouldn’t even know where to start. I am very new to Panda3d and using Python.
I will look into creating a shader for combining the three textures. I believe using combining modes might simply be a temporary way of avoiding future issues. I’m surprised combining textures prior to exporting to panda3d is not common.
I actually used Gimp to combine all three textures (two textures and a stencil mapped image); it looked great but I feel I’m still avoiding the task at hand.
Forgive my ignorance I have not looked at the source code; does the chicken exporter utilize shaders itself? Regardless if I get a shader to work I will post it for others. I will have to review the structure of the egg and shaders. I am open to any advice for a plan of attack. Thank you all for your good advice.
combining the textures should also be possible with PIL, but it’s not designed with speed in mind
So using a shader will allow it to Render faster?
The main problem with doing it beforehand is that the textures become quite large. However, if the combined map isn’t too large in your case, (smaller than the sum of all the texturemap+stencilmap sizes), you could go with that option.
I recommend using combine modes (or even simple TextureStage blend modes) if you can, because these are usually supported on cards without strong pixel shader support as well. Otherwise, a shader would be the way to go.