- Panda3D and TrueSpace 7.6 -

For those who forget the post you have to know first that TrueSpace 7.6 is now free.
Lot and lot of new things in it like shader, dx9 realtime preview ect…
And well fully support of X and DAE exportation :wink:

The panda tools x2egg seem to be allready strong to support animated model :

I’ve made some other test with some normal mapped model.
The x expoter of TrueSpace generated and well X file with map and normal.

It seem that x2egg ignore the normap map when parsing file
“TextureFilename” is the only checked info.

CVS\pandatool\src\xfileegg\xFileMaterial.cxx

////////////////////////////////////////////////////////////////////
//     Function: XFileMaterial::fill_material
//       Access: Public
//  Description: Fills the structure based on the raw data from the
//               X file's Material object.
////////////////////////////////////////////////////////////////////
bool XFileMaterial::
fill_material(XFileDataNode *obj) {
  _face_color = LCAST(float, (*obj)["faceColor"].vec4());
  _power = (*obj)["power"].d();
  _specular_color = LCAST(float, (*obj)["specularColor"].vec3());
  _emissive_color = LCAST(float, (*obj)["emissiveColor"].vec3());
  _has_material = true;

  // Walk through the children of the material.  If there are any,
  // there should be only one, and it should be just a Texture.
  int num_objects = obj->get_num_objects();
  for (int i = 0; i < num_objects; i++) {
    XFileDataNode *child = obj->get_object(i);
    if (child->is_standard_object("TextureFilename")) {
      _texture = Filename::from_os_specific((*child)["filename"].s());
      _has_texture = true;

    } else {
      if (xfile_cat.is_debug()) {
        xfile_cat.debug()
          << "Ignoring material object of unknown type: "
          << child->get_template_name() << "\n";
      }
    }
  }

  return true;
}

After some seeking about the last format specifiacation on X file it seem that the old X file doc (v1.13 of the 13 january 2007) isn’t the best way now to parse X file.

The last DirectX SDK and especiatly the XNA kit seem to be more “up to date” about the last new feature on the X file format like the extention about the differente map type : (exemple from rhino exported model from TrueSpace 7.6 that fully support X export for XNA)

    Material {
     1.000000;1.000000;1.000000;1.000000;;
     50.000000;
     1.000000;1.000000;1.000000;;
     0.000000;0.000000;0.000000;;

     TextureFilename {
      "file_0.jpg";
     }

     NormalmapFilename {
      "file_1.jpg";
     }

New extension reference in material add directly :
TextureFilename (diffuse)
NormalmapFilename
SpecularmapFilename
ect…

The idea is really good and more clean in ready and don’t generat lot of material and now those type of effect is generalised on the market.

I’ll to seek more info about those new extention.
I could be good after that to change the X2EGG tools to support all the last extention.

That could make the pipeline part of Panda3D really more easier with an professional modeling tools that support of the next rendering game effect (shader, post process ec…).

I’ve asked this question somewhere else but this may be the more appropriate place:

The materials/shaders in Truespace are quite impressive- does anyone know of any what to port them into Panda3d?

I make some search but actully the option of the pipeline part for panda3D is for me the only an real “red” part of the all set.

SDK of truespace 7.6 is on the work after that exporter could be write more easily i think :wink:

You could allready write pluging using older sdk of truespace but the lastest an easy function aren’t avaible.
MD5 import/export already on the road :wink:
And some other old pluging work too.

Actually on panda and truespace only some texture is easily exported.
The best could be is that we can export model/animation (bones) and well shader and texure used in it :wink:

Yeah, I agree it can be used for normal, gloss, and diffuse maps which does help a lot.

That’s fine but I’m more talking about some of the shaders themselves: the translucent shader would be a great feature for Panda. The ghost/xray shader is also one that would be really beneficial. There are a few other ones.

I also really like the oil one. I think I could replicate it as a cubemap. That is if cubemaps worked with the shader generator.

As it stands I think MapZone is a better option if we really just have normal,gloss, diffuse, and glow maps to work with.

In pure edition Map Zone or Fx Composer are really good for making big or complex shader.

For little test an simple shader i think it could be very cool and perfect to just export model/texture and shader needed in one pass (like normal map that is most “wanted” feature in game now for the gfx)

Ah, I see. Actually, since normal, gloss, etc. map support is relatively new in egg file too, it’s not surprising that x2egg doesn’t support this. But are these new map types the only features not supported by x2egg, or are there more features as well?

It should not be difficult to add support for these new map types, if that is the only addition to the file format. Would some Panda community member be interested in volunteering for this task?

Is there a new spec document that supercedes the 2007 spec? It’s very difficult to write a file converter without a spec; without it, we will have to reverse-engineer either TrueSpace’s output, or the XNA kit.

David

Hi, folks!
I’m very happy to report that i managed to import from ts 7.6 an animated character with excellent textures!
I experimented with the rigged tank girl from TS character library. After making some skeletal animation i exported it as directx /file-save and choose directx/. I made all this from the model side.

Now the important part:
I used mview.exe /mesh viewer/ from an older directx SDK /Audust 2005/just to open the file and resave it. After this the file loads perfectly animated and skined in pview.

Unfortunately i didn’t find mview separetely in the net as it isn’t redistributable i think.
So you could download the whole sdk from microsot /it’s free/. There is no need to install it - just run the file which unzips in a temp folder.
The path to mview is \Utilities\Bin\x86\mview.exe

I wish you to create impressive projects!
Special thanks to the panda developers for their great present!
Happy new year!

Actualy i did the animation in the workspace side using the new native bones of TS. Sorry for the misstake

So the right is “I made all this from the workspace side.”