Hi, I use one of them blender .egg exporters. The one I have seems to be working fine with textured models/animations but I noticed that in the .egg file paths to textures are absolute. Is this normal? Does panda take care of that somehow?
Or is it a problem of the exporter?
If I move the texture files along with the game source it doesn’t work anymore because of this (textures don’t get displayed).
You can change the texture paths to be relative, there’s no limitation on egg files in that respect.
By the way, which one of the exporters did you use?
It’s up to the converter whether to write relative or absolute pathnames into the egg file. However, once you have generated an egg file, you can change it from absolute to relative with a command like this:
egg-trans -ps rel orig_file.egg -o new_file.egg
Thanks, I don’t remember which one I use TBH, but it has animations and geometry+textures capabilities (materials are ignored)
Also I wanted to ask, why does the .x format change coordinates to “y” being “up” ? If I convert directly to .egg I get the model ok (z = z as I saw it in blender) but if I export .x and convert I get y = z.
Another thing, if I export an animation (keyframed) I only get the key frames “animated”. Eg: I made a simple “move in a circle” animation with 4 keyframes but in the game I get it as “jumps”. Is this normal? Do I have to make keyframes on each frame of the animation?
The format specification for .x files states that they always represent models in a left-handed y-up coordinate system. Thus, to represent any model correctly in .x file format, it must be converted to a left-handed y-up coordinate system. On the other hand, the .egg file format allows the user to specify the intended coordinate system at the top of the file, so it is possible to keep vertices in their original form.
If you use the X converter from blender to export animation, it is necessary to choose the option that writes a frame for each frame of the animation, rather than the default choice of writing a frame for each keyframe. This is because the egg file format does not support keyframed animations. Arguably, x2egg should therefore automatically expand keyframed animations encountered in an .x file to the proper one-frame-per-frame animation format for .egg files, but it doesn’t.