Jump to content

Mesh export plugin for Blender + Query and suggestion


photo

Recommended Posts

Observation

Strings in Meshfiles *must* be null terminated and the string size integer must include that extra byte in its count. This needs to be mentioned in the documentation.

 

Question

Normals are unsigned Shorts - what is the best practice for generating these?

 

Plugin

very early release-- export only, static meshes only -- still has a lot of debug info but try it if you like

io_mesh_unigine.py.zip

Link to comment
Strings in Meshfiles *must* be null terminated and the string size integer must include that extra byte in its count. This needs to be mentioned in the documentation.

Added.

 

Normals are unsigned Shorts - what is the best practice for generating these?

In Unigine they are generated according to the following formula:

 

file.writeUShort(clamp((int)((v->normal.x * 0.5f + 0.5f) * 65535.0f),0,65535));
file.writeUShort(clamp((int)((v->normal.y * 0.5f + 0.5f) * 65535.0f),0,65535));
file.writeUShort(clamp((int)((v->normal.z * 0.5f + 0.5f) * 65535.0f),0,65535));

Link to comment
  • 2 weeks later...

If I can figure it out how to do so...

Currently this is a spare time project because I personally use and Like Blender (also wings3d). I am more than happy to collaborate with others in getting a really good plugin working.

Link to comment
  • 1 month later...

Thanks for that... I shall take a look it.. I am currently stuck on getting bones into Blender. With Unigine each bone is an object with a matrix. In Blender when constructing bones they are two points in world space. I need better understanding of 3d maths to make this work.

Link to comment

Our current idea is to improve COLLADA support and use it as an intermediate format for mesh and animation data, new version of UnigineEditor will convert it into native runtime formats automatically.

Link to comment

reading COLLADA format animation would be really great - it's correct implementation would add support for lots of programs alike Motion Builder, DAZ Studio, etc. Even without support in Unigine Editor it would be great to see improved Resource Editor .dae importer functionality.

Link to comment

Blender 2.60 RC1 is out and has COLLADA export / import in it, so not need to work on it on the Blender's end :)

 

Blender also exports into Doom 3 MD5 and UDK PSK/PSA format. While Unigine supports Doom3 MD5 (haven't tried it myself yet), UDK's format is more flexible.

Link to comment

Blender has had Collada support for some time... 2.60 includes one of the GSOC projects which added quite a bit to the Collada exporter. It's a work in progress; the features we need for Unigine may or may not be implemented or may be buggy.

 

The MD5 exporter for blender is extremely temperamental. Unigine will accept the MD5Meshes it outputs but not the MD5anims. I am trying to get a hold of some md5anims that Unigine will import so I can compare them to the ones I have that don't.

 

PSA/PSK support could be interesting but I think that Collada is probably a better solution. I particularly like that you can embed arbitrary data inside a collada file which could be used to hint at how to use Unigine specific features.

Link to comment
  • 2 weeks later...
×
×
  • Create New...