[Tool] .xmf/.xac <-> .dae converter

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Thu, 6. Feb 14, 01:51

Ok, I've tried to change a model in blender after converting it and get the reconverted file into the game, but whatever I do, everything fails. I still cant get any file back into the game...

First: Its not an issue in xmls. I've changed many things in the cluster c and cluster d file xml (you can also use new or changed texture animations there, the ani file is useless for that, just do it right and it will appear in game :wink: ) and everything works very good (of course, quaternion is a problem, but i use existing quaternions of other objects).

But now there is a problem- can load files, got them into gmax to move better (Coords simply copied in original file), but when I want to change something, cant get it back.

First, the problem is blender- I'm a gmax/3dsmax type and handeling blender is horrible. No return button? how to simply move or scale or rotate a object? In gmax its very intuitive: Scale with mouse, below the scale factor i use. Much easier the moving- JUST CLICK on the Arrow.
Blender? a whole page of scaling, dont understand much of that. I DIDNT EVEN SEE THE MODEL OF THE SUN OR PLANETS IN BLENDER. Zoom does not work, seem its too big. Gmax automatically zooms out when loading.
Convert is the problem- 3ds is good, but gmax is bad.

How can everyone of you guys have 3dsmax? its about 5000€- too expensive for me... And after handeling gmax I know from test version that I can handle 3ds as well- but how to get?

Second one is of course to get a file the game can read. I already got a xmf file (after 100 fails) but the game doesnt want to load. When I use rotation and scaling the vertices way in gmax (after imported the mesh via .obj) and convert it back to blender and to dae I still get a xmf file sometimes, but this file does not work- it simply does not load the file (the game does not crash- thanks for that)

And blender? you told that rotating or scaling the vertices works (like in gmax) but how to do that? And how to do that when I cant even see the model in the view? Its VERY frustrating, the Sun of DeVries is the last thing left for a release of my next encyclopedia-Mod for Rebirth.

What I want to do: scale the Devries sun to 400 percent- when you change the bigger planets to gasgiants its a quite more realistic scale for a G2V star the star should be- and after repositioning it still looks good- got a silly qaternion effect after playing with the numbers- blows up the sun to 600 or more percent- but moving is only possible in y direction that way and for some reason the star is not longer in the middle anymore- bad for the rotation of the big solar complex. But this way the Tex still looks good...

sorry for the long post... greetings, MJ Fire

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Thu, 6. Feb 14, 17:27

Ok, after trying it again, today I got the upcaled sun in the game. But I still cant get how all of you can have 3dsmax... :wink:

IMPORTANT: A very important thing everyone should know, when upscaling:
Found out an other thing: I thought the size parameter in the xml is useless for the game- but it isnt: to optimize the performance, every mesh is deactivated when you dont see it. The size parameter controls that- it gets the game which size the object has to deactivate it when its out of view. After upscaling the sun to 500% I wonder why it disappears when only a little bit of the star is in the window. that was the false size in the scene- after scale these size parameter too, no disappearing any longer.
greetings, MJ Fire

Hardcard
Posts: 56
Joined: Mon, 18. Nov 13, 09:02

Post by Hardcard » Thu, 19. Jun 14, 21:35

3ds max is pretty cheap if purchased in remote atoll towards eThekwini (Durban).

Those vanilla ship 3D models are way too "dirty". Wireframes are unnecessarily dense in some areas (I mean WAY TOO DENSE), if stations have been created following the same guidelines, I'm not surprised that so many people experience fps drops, even when they have powerful computers.

To see a good example of a clean/efficient 3D ship design, check out this video, which is a full episode of "The Next Great Starship" contest for Star Citizen. The contest consisted in designing a gun and a ship for Star Citizen, the winning team would get their ship included in the game, plus a 30.000 dollar prize. I recommend watching all 18 episodes because it's just amazing how this game is being developed and how talented some contestants are...anyway, the relevant part of the video starts at 50:56.
You can see how clean that wireframe is and when compared to the wireframe from, say, the Skunk, the difference is gigantic.
https://www.youtube.com/watch?v=z_oSsy9Et-g

PS: This is amazing job arc_, thanks a bunch.

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Sun, 22. Jun 14, 19:21

For my first simple test, I created a custom asteroid based on an exiting one. I gave it it's own macro name etc., converted, imported, modified, exported, converted and it works perfectly in-game. Here is image of my asteroid with a hole cut in it that I can fly through:

[ external image ]

Now that I have the basic process working, I can start working with more complex objects.

Thanks for providing this converter arc_ :)

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Sun, 22. Jun 14, 21:32

One problem is inability to change material ID from within the modeling program. The only way I've found, is to manually edit the part xmf externally using a Hex editor. In other words, Mat ID changes are not exported.

Perhaps someone has found a better way?

User avatar
arc_
Posts: 62
Joined: Sat, 7. Dec 13, 20:30

Post by arc_ » Tue, 24. Jun 14, 21:10

Nice to see more custom models being made :).

Concerning material ID's: the converter extracts the material names from the scene node names, rather than from the material definitions. If you change the material ID in the scene node name, that's what will be exported to the .xmf.

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Wed, 25. Jun 14, 06:24

arc_ wrote:Concerning material ID's: the converter extracts the material names from the scene node names, rather than from the material definitions. If you change the material ID in the scene node name, that's what will be exported to the .xmf.
Changing node name does the trick. For some reason it didn't seem to work the other day, but I guess it was just one of those days. Here is a rough experiment with what will become a custom gate inside an asteroid (click to enlarge):

[ external image ]

I'm well on my way to understanding details of working with custom models and materials. From what I can see, this converter can do most everything we'll need. It won't handle animations, but I suspect they won't be needed for the majority of things most of us will be doing for some time to come. :)

linolafett
EGOSOFT
EGOSOFT
Posts: 3373
Joined: Mon, 26. Mar 12, 14:57
x4

Post by linolafett » Wed, 25. Jun 14, 14:51

Hardcard wrote: Those vanilla ship 3D models are way too "dirty". Wireframes are unnecessarily dense in some areas (I mean WAY TOO DENSE), if stations have been created following the same guidelines, I'm not surprised that so many people experience fps drops, even when they have powerful computers.
We use atlastextures and can therefore not paint stuff wherevery we want. So we have to add additional cuts to define the ships better.
Usually polygons are not really a problem, trying to avoid drawcalls (materials/objects etc) is preferable.

By the way cool progress you all do here, I love to see custom made objects :)
If there are some questions regarding models, maybe i can help out a bit.

User avatar
YorrickVander
Posts: 2716
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Wed, 25. Jun 14, 16:31

@Observe - Nice work, I see a stonehenge PHQ :)

@Linolafett - <3
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
arc_
Posts: 62
Joined: Sat, 7. Dec 13, 20:30

Post by arc_ » Thu, 26. Jun 14, 19:31

linolafett wrote:If there are some questions regarding models, maybe i can help out a bit.
You could always post the specs of the .ani format... ;)

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Thu, 26. Jun 14, 22:53

arc_ wrote:
linolafett wrote:If there are some questions regarding models, maybe i can help out a bit.
You could always post the specs of the .ani format... ;)
I second this ^^. While there is a lot we can do without animation, I am already beginning to see areas where I need animation to achieve some things I'm interested in doing. We are very lucky to have arc_ willing to provide these tools. I would hate to see this delayed or neglected any longer than necessary.

Thanks.

linolafett
EGOSOFT
EGOSOFT
Posts: 3373
Joined: Mon, 26. Mar 12, 14:57
x4

Post by linolafett » Fri, 27. Jun 14, 10:09

Oh no idea about the ani format :(
I have to set up the animation in max, put into the object properties some values, that it knows how long the animation is, activating, activated and deactivated states for non looping animations etc is written in there.
The rest is done by the exporter/converter. Something i dont know anything about as is it beyond my reach as an artist^^

killerog
Posts: 3464
Joined: Fri, 28. Oct 05, 16:31
x4

Post by killerog » Sat, 28. Jun 14, 22:03

Nice to see you have managed to get an object in game Observe :)

Hopefully you can push on where I haven't been able to up to now.
Image

RasserXP
Posts: 7
Joined: Thu, 22. Apr 04, 18:27
x2

Post by RasserXP » Fri, 8. Aug 14, 04:24

I've just read all the pages in this thread, beautiful collaboration
and skills on display here.

I was very sad when going through the xmf,ani files with a hex viewer
for it did not look like adding custom mesh stuff would be easy.

But then I found this thread on google by searching for Blender xmf converter.

Should this converter not be in the X - Rebirth Tools thread
I mean after the cat/dat extractor is the most important tool there is.

Design your own spaceship a see it come to life in the amazing X - Rebirth Universe - that's a sales parameter in my book ;-)

Now back to this mesh animation format, I want to push a button and manual operate the ramp on the skunk and push a fired npc out in space, or maybe just watch the scenery :-)

Lc4Hunter
Posts: 2170
Joined: Sun, 2. Apr 06, 16:15
x4

Post by Lc4Hunter » Sun, 10. Aug 14, 04:34

Nice to see some progress here after a while not watching for it :wink:
Keep up the good work guys!

Maybe i can see some of my ships ingame someday :D

[ external image ] [ external image ]

RasserXP
Posts: 7
Joined: Thu, 22. Apr 04, 18:27
x2

Post by RasserXP » Sun, 10. Aug 14, 12:25

I'm having problems getting the converter to work, I have VS2010 C++ runtime up to date if that's a requirement.

It just closes with an Appcrash no matter if the input file name are correct or just garbage.

Dump of my attempts:
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle rettigheder forbeholdes.

c:\XR>dir

Indhold af c:\XRs

10-08-2014 03:05 <DIR> .
03-01-2014 22:33 2.920.448 XRConverters.dll
23-12-2013 23:07 342 XRConverters.h
03-01-2014 22:33 62.464 XRConvertersMain.exe


c:\XR>dir "C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\*.exe"

Indhold af C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth

26-07-2014 16:06 18.723.328 XRebirth.exe
26-07-2014 16:06 13.896.192 XRebirth_32.exe



c:\XR>dir "C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\assets\interiors\crates\*.xml

Indhold af C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\assets\interiors\crates

01-10-2013 13:43 2.811 interiors_crates_size_l.xml
01-10-2013 13:52 2.515 interiors_crates_size_m.xml
01-10-2013 13:53 1.572 interiors_crates_size_s.xml


c:\XR>XRConvertersMain.exe importxmf "C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\" "C:\Program Files (x86)\Steam\St
eamApps\common\X Rebirth\assets\interiors\crates\interiors_crates_size_l.xml"




c:\XR>dir *.dae

Indhold af c:\XR

Filen not found.

c:\XR>


c:\XR>dir "C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\assets\interiors\crates\interiors_crates_size_l_data\*.*"

Indhold af C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\assets\interiors\crates\interiors_crates_size_l_data

02-08-2014 18:23 <DIR> .
02-08-2014 18:23 <DIR> ..
01-10-2013 13:43 536 assets_interiors_crates_interiors_crates_size_l-collision.xmf
01-10-2013 13:43 717 assets_interiors_crates_interiors_crates_size_l-lod0.xmf
01-10-2013 13:43 987 part_door-collision.xmf
01-10-2013 13:43 2.114 part_door-lod0.xmf
01-10-2013 13:43 1.847 part_main-collision.xmf
01-10-2013 13:43 4.226 part_main-lod0.xmf
17-05-2013 12:37 4.052 _tmppart_door01-collision.xmf
17-05-2013 12:37 9.857 _tmppart_door01-lod0.xmf
17-05-2013 12:37 8.807 _tmppart_main01-collision.xmf
17-05-2013 12:37 15.173 _tmppart_main01-lod0.xmf
It Closes with appcrash and no DAE file is found, any sugestions ?

RasserXP
Posts: 7
Joined: Thu, 22. Apr 04, 18:27
x2

Post by RasserXP » Sun, 10. Aug 14, 23:38

I got it to work ! :o
do know what's change but now it produces a dae file without appcrash.

I converted the file interiors_crates_size_l.xml
and opened It in Blender 2.7 dae import and I see and nice locker from the game,
I extruded two polys a bit and exported to dae, the converter complains about only one root node and deleting cam and lights, but I've done that still the same error.

I will try with an non animated object.
anyway nice to be getting somewhere.

LordSneazy
Posts: 153
Joined: Wed, 11. Dec 13, 19:47
x4

Post by LordSneazy » Mon, 29. Sep 14, 06:16

I get the same error? I opened the Local Highway Mesh, made my changes, and it keeps saying only one node. What does only one node mean??? I checked for cameras and lights, all gone. Just the animations and meshes from egosoft and my added meshes.

User avatar
Litauen
Posts: 193
Joined: Fri, 22. Nov 13, 21:09
xr

Post by Litauen » Mon, 29. Sep 14, 16:19


LordSneazy
Posts: 153
Joined: Wed, 11. Dec 13, 19:47
x4

Post by LordSneazy » Mon, 29. Sep 14, 17:34

That is very helpful, unfortuately through trial and error I figured that out last night. I was able to pack it back to an egosoft file, but I noticed it didn't create files for the parts I created. When I get home I'm going to covert it back to a DAE file and see if they are still there from the XMF.

The modding guide is good, but I wish you experienced guys would help us dummies and create a Modding Guide Step-by-Step for dummies.

Also, is there a chance that the converter executable will be updated to allow more than one material on it. I took several layers that had different materials on them, joined them, copied them, and multiplied them, to take a single asset and create a circle out of the parts. But, when I converted the file. The executable said I can only have 1 material per asset.

Post Reply

Return to “X Rebirth - Scripts and Modding”