I have been trying desperately to get my textured models from blender into panda. I can get the model converted into a .egg file and into panda but without the texture. I am wondering if there is anything special that I need to do, or if there is a better way to do this?
The procedure I use is this(simplified):
Use default cube.
Open second viewing screen and change it to the UV/image viewer.
Create new image in UV/image viewer.
In object editor view, select cube object, switch to edit mode and select all vertices with ‘a’ key.
Check the image painting to allow for painting directly onto the image.
start painting, finish painting, save image to desktop.
Use either of the built in exporters (Collada or .x exporter) to export to desktop.
on desktop open cmd navigate to desktop in cmd.
type: (dae2egg or x2egg) inputfilename.(x dae) -o outputfilename.egg.
type: pview filename.egg
views but without texture.
If this makes sense congrats, else tell me and I’ll try to do better. Again is this wrong? Is there a better way? Is there any option in blender that I need to click / type? Help!?
There is a good chance the path to the texture in the EGG file is not correct (or not what you expected). You can open it up in a text editor and look for the “Texture” entry. It will look similar to this:
If there is no path and just the filename, then Panda is expecting the texture file to be in the same directory as the EGG file. If there is a path before the filename then Panda will look for the texture in that directory.
Another possibility is that the UVs are not getting into the EGG file. This will show up in the EGG file in the “Vertex” entries as either a missing “UV” section or UVs all zeroes.
You might also have better luck exporting an EGG directly from Blender using the Chicken exporter.
Thanks for responding, and you were correct that I was missing the “texture” entry. Unfortunately, after adding this manually it still does not work. I tried to add both with and without path placing the .png and/or a .jpg texture to path which was also in the same directory as the .EGG file.
The UVs however are not zero and do exist. I am using another .EGG file that does have texture as a road map to editing my .EGG file. In the example .EGG file the “UV” entries in the “vertices” entries are different from my .EGG file.
My .EGG:
<UV> UVTex { 0.332314 0 }
Example .EGG:
<UV> { 1 0 }
In between the “” and the values there is UVTex in mine and not in the Example EGG. If this means something then could someone elaborate. If not let me know and I’ll let it go.
As for the Chicken idea, although it is a good idea I cannot use it because it does not work with blender 2.5x. I am aware that I could use this now but I am also trying to get this to work for future generations of a Summer Camp I am a part of. I could just use Chicken to get it to work and leave the headache for the next guy but I’d rather just get it working with these tools now. Until Chicken is working or a substitute comes along I think I am going to have to go with the COLLADA/X work around.
Ah, yes if the Texture entry is missing then adding it manually will not work because it also has to be assigned to each Polygon. You will not want to be doing that manually since usually there are a lot of polygons.
We need to find where the Texture is being lost in your pipeline. I’m not familiar with the syntax of Collada and X but if you open then up you should be able to search for your texture and see if it is in there. Then we can at least know if it is exporting from Blender without the texture or if the texture is being lost in the conversion to EGG. If you like, export something simple like a cube and post the contents, and I will take a look.
UVs in the EGG file can be named or unnamed, so the “UVTex” is just the name given to the UVs. This is probably OK.
There is a very new exporter being worked on for Blender 2.5, see here: [url]Yet Another Blender Egg Exporter (YABEE)], though I don’t know if it will suit your needs or not yet.
Make sure that, in the texture specification in Blender, the mapping type is set to “UV” (and pointing to the right set) rather than the default “Orco”.
I don’t see any texture in the Collada file, so there must be something you need to do in Blender in order for it to export the texture into the Collada file.