[Tool] .xmf/.xac <-> .dae converter
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
The converter takes the material to use from the node name. For example, this node name: "detail_m_mainXlod0XgenericXgeneric_tanks_01" contains the section of the LOD0 mesh of part "detail_m_main" that is using the material "generic_tanks_01" from the "generic" collection in the material library xml.
Ok that makes sense now, I was trying to figure out what the X....X Part was, forgot that the material file is split into sections.
This is my XML output now from your tool for my cube:
I had to make the macro file for it, which looks like this:
And the components file looks like:
And Macros file:
I sill cant seem to get the model to appear in game, I have no error in the debug log text file either now.
Edit: Added all 3 LODs now and still no luck
This is my XML output now from your tool for my cube:
Code: Select all
<components>
<component name="units_kill_box">
<source geometry="\Extensions\SBMod_Test\assets\units\size_l\units_kill_box_data" />
<connections>
<connection name="Connection01" tags="part">
<parts>
<part name="part_main">
<size>
<max x="1" y="1" z="1" />
<center x="0" y="-4.76837e-007" z="0" />
</size>
<lods>
<lod index="0">
<materials>
<material id="1" ref="argon.ar_masstraffic_01" />
</materials>
</lod>
</lods>
</part>
</parts>
<offset>
<position x="-0.061841" y="-0.042030" z="-0.147742" />
</offset>
</connection>
</connections>
</component>
</components>
Code: Select all
<macros>
<macro name="units_kill_box_macro" class="drone">
<component ref="units_kill_box" />
<properties>
<identification name="{20101,7201}" description="{20101,7202}" />
<hull max="1600000" />
<effects>
<explosion ref="explosion_l_01" />
<jumpin ref="jump_jumpin_l" />
<jumpout ref="jump_jumpout_l" />
</effects>
</properties>
<connections>
</connections>
</macro>
</macros>
Code: Select all
<diff>
<add sel="/index"><entry name="units_kill_box" value="\Extensions\SBMod_Test\assets\units\size_l\units_kill_box" /></add>
</diff>
Code: Select all
<diff>
<add sel="/index"><entry name="units_kill_box_macro" value="\Extensions\SBMod_Test\assets\units\size_l\Macros\units_kill_box_macro" /></add>
</diff>
Edit: Added all 3 LODs now and still no luck
I posted an updated version of the conversion tool which fixes the collision file crash. It turns out that the game is much more picky about the vertex declaration in collision meshes than it is about visual meshes. Note that the command line has changed in preparation for .xac support - see the first post for details.
Also the tool now automatically merges overlapping vertices in all meshes and leaves out unnecessary information (like normals) from collision meshes. This way the resulting files are much closer in size to the original.
I can't help you with the macro .xml files, sorry... I know next to nothing about those.
Also the tool now automatically merges overlapping vertices in all meshes and leaves out unnecessary information (like normals) from collision meshes. This way the resulting files are much closer in size to the original.
I can't help you with the macro .xml files, sorry... I know next to nothing about those.
a macro file is basically similiar to a TShips entry in the previous games - it defines what a Ships is made of, explosioneffects, hull Strength etc. - and it contains connections to all parts a Ship is made of, and for Stations Information about in which order the Elements are built (Build Sequence and Build Stage) - some of this Info is not to be defined in the modelling program(basically the whole <properties> node), but the connections and build sequence/stage would make sense to define in a modelling program..
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Now im trying to figure out scaling, I am having great difficulty in simply changing the size of the model. Twice in the last few hours I have been able to change the models size in blender but it seems really temperamental. Changing the scale of the root nodes, the mesh its self all seem to have no effect what so ever. Having never used blender am I being completely silly ?
Its a shame the built in dae importer/exporter in 3dsmax seems to hate the file format and I cant seem to find the plugin egosoft use
On a better note heres a new pic with the model looking a bit smaller: http://s45.photobucket.com/user/killero ... 2.jpg.html
Its a shame the built in dae importer/exporter in 3dsmax seems to hate the file format and I cant seem to find the plugin egosoft use
On a better note heres a new pic with the model looking a bit smaller: http://s45.photobucket.com/user/killero ... 2.jpg.html
Scaling the nodes won't work, you have to scale the actual meshes: enter edit mode, select all the vertices, scale down. Then it shouldn't be a problem.
Of course Egosoft didn't actually use Collada - they probably exported straight from Max - it's just a format I picked for my converter because it has the needed features while also being supported by many modeling programs...
Of course Egosoft didn't actually use Collada - they probably exported straight from Max - it's just a format I picked for my converter because it has the needed features while also being supported by many modeling programs...
Hmm, I have tired that and it doesn't seem to always work, maybe im just doing something silly with not being used to blender.
I have seen this
<author>Benedikt</author>
<authoring_tool>3dsMax 12 - Feeling ColladaMax v3.1.1_3.1.1 r6746.</authoring_tool>
In some of Egos files, I thought that was maybe where you got the idea to look into this file format.
I have seen this
<author>Benedikt</author>
<authoring_tool>3dsMax 12 - Feeling ColladaMax v3.1.1_3.1.1 r6746.</authoring_tool>
In some of Egos files, I thought that was maybe where you got the idea to look into this file format.
awesome ship to get in killerog.
To be honest the first time i got in game and saw all the surface turrets on capitals come to life and start firing, the first ship I thought of was the Galactica. Glad to see it starting to take form in game and cant wait to see it as a finished ship in game with the turrets and and everything working in all its glory.
To be honest the first time i got in game and saw all the surface turrets on capitals come to life and start firing, the first ship I thought of was the Galactica. Glad to see it starting to take form in game and cant wait to see it as a finished ship in game with the turrets and and everything working in all its glory.
Can you try to export in FBX format and convert it to DAE with Autodesk FBX converter and test it in-game?killerog wrote:I have a ******* box in the game **** yeh
Autodesk FBX converter link: http://usa.autodesk.com/adsk/servlet/pc ... d=20481519
I think that's the same exporter that's included in 2014, it doesn't like a few things, I am going to experiment today if I cant a chance. Much prefer 3dsmax to blender already. I might try and ask egosoft if they can give some pointers to there 3dsmax work flow with regards to how to export.
But first im going to try and get a custom texture onto the Galactica.
But first im going to try and get a custom texture onto the Galactica.
=> If you use X3-models for reference, the scaling factor is 550% (or multiply with 5,5).killerog wrote:Now im trying to figure out scaling, I am having great difficulty in simply changing the size of the model. Twice in the last few hours I have been able to change the models size in blender but it seems really temperamental. Changing the scale of the root nodes, the mesh its self all seem to have no effect what so ever. Having never used blender am I being completely silly ?
Its a shame the built in dae importer/exporter in 3dsmax seems to hate the file format and I cant seem to find the plugin egosoft use
On a better note heres a new pic with the model looking a bit smaller: http://s45.photobucket.com/user/killero ... 2.jpg.html
You can easily check this by importing the Split M3 from X3 and the Split M3 from Rebirth.
So i found out the exact scale of 550%.
[ external image ] [ external image ]
It works for max. You can scale up and the use "Reset X-Form".arc_ wrote:Scaling the nodes won't work, you have to scale the actual meshes: enter edit mode, select all the vertices, scale down. Then it shouldn't be a problem.
Of course Egosoft didn't actually use Collada - they probably exported straight from Max - it's just a format I picked for my converter because it has the needed features while also being supported by many modeling programs...
By the way: Awesome job killerorg! Next step after texturing: How to make animations for shipparts. For example a rotating section of a destroyertype
As i know the exporter is selfwritten. It uses a database below (dont know for what, but i think for materials, shaders and so on).killerog wrote:I think that's the same exporter that's included in 2014, it doesn't like a few things, I am going to experiment today if I cant a chance. Much prefer 3dsmax to blender already. I might try and ask egosoft if they can give some pointers to there 3dsmax work flow with regards to how to export.
But first im going to try and get a custom texture onto the Galactica.
Maybe the comment at the files is just a note, written by an exporter, from another program. As i know not all modelers used 3dsmax, some created their models with blender, than imported them into max and from there they exported it to the games engine.
Presumably "Reset X-Form" in Max does exactly the same: apply the node transform to the mesh and reset the node's transform
Animations for ship parts are stored in .ani files, which is another custom format. I don't know how these work yet... The only thing I've found out so far is that they can animate up to 5 attributes (I guess position, rotation, scale, and ...?) and support different interpolation types for each of those (piecewise, linear, bezier and possibly splines).
Animations for ship parts are stored in .ani files, which is another custom format. I don't know how these work yet... The only thing I've found out so far is that they can animate up to 5 attributes (I guess position, rotation, scale, and ...?) and support different interpolation types for each of those (piecewise, linear, bezier and possibly splines).
Right im now using 3dsmax with no problems, the 2014 dae exporter works fine was just me misreading something.
New problem for those that love xml. Trying to add a new collection and texture to the material_library file but not having any luck. Im not getting any errors in the debug file but im not seeing the object the texture is applied to. If I use an ego texture the object appears fine.
Here is my diff file code. Can guess its going to be wrong
And to access that texture I have named the object part_mainXlod0XkillerogXBSG_GBadge.
Get this solved and that's models with custom UVed textures in the game
New problem for those that love xml. Trying to add a new collection and texture to the material_library file but not having any luck. Im not getting any errors in the debug file but im not seeing the object the texture is applied to. If I use an ego texture the object appears fine.
Here is my diff file code. Can guess its going to be wrong
Code: Select all
<diff>
<add sel="/materiallibrary"><collection name="killerog"></collection></add>
<add sel="/materiallibrary/collection[@name='killerog']">
<material name="BSG_GBadge" shader="shaderfx\high\XU_highway_tube.fx" blendmode="additive" preview="none">
<properties>
<property type="BitMap" name="diffuse_map" value="extensions\SBMod_Test\assets\textures\ships\BSG_GBadge"></property>
<property type="BitMap" name="specular_map" value="assets\textures\interiors\int_tile_01_spec"></property>
<property type="BitMap" name="normal_map" value="assets\textures\interiors\int_tile_01_bump"></property>
</properties>
</material>
</add>
</diff>
Get this solved and that's models with custom UVed textures in the game