Blender DAE Exporter for HWRM

(Sastrei) #12

I did it old school and created a shortcut with the following target path:
“C:\Program Files (x86)\Steam\steamapps\common\Homeworld\HomeworldRM\Bin\Release\HomeworldRM.exe” -mpbeta -overrideBigFile

Place your ship hod into an appropriately named folder under Data > Ship

Make sure you have a .events and .ship file with a matching name. Just grab one of the other ships .event and .ship files and in the .ship file, comment out all the weapon and engine lines near the bottom.

Edit your startingfleets.lua under Scripts > Startingfleets to add your new test ship to the skirmish start fleet.

Also if you want to post the hod, I’ll toss it ingame real quick. :smiley:

0 Likes

(D Kesserich) #13

Like I said, I’ve never done it old school or new school, so most of that is gibberish to me.

I take it I have to unpack the HW1Ships.big to get the .event, ship, and startingfleets.lua files? How do I do that? I ran the big decrypter, but archive.exe just gives me a failed to initialize archive error when I try to run it

[edit]Figured it out. AND IT REALLY WORKS

I intentionally stretched out the swarmer’s sides to prove that it’s actually what I exported from Blender and not me accidentally using the HOD that I generated from the original DAE for comparison purposes.

So now the trick is going to be building a ship from scratch…

2 Likes

(D Kesserich) #14

A couple of notes: For reasons that I haven’t been able to figure out yet, sometimes Blender will crash when doing the export after loading a saved Blend file. It seems to be material related, as appending the objects into a new file and rebuilding the materials seems to fix it.

HODOR really doesn’t like relative image paths that don’t lead to the same folder as the DAE is saved in. Make sure you’re saving the DAE into the same folder as all your textures, or vice versa. Ran into this when testing with the Turanic Carrier.

2 Likes

(Xercodo) #15

I can;t get Blender to import the DAEs given to us for the example

What do? D:

0 Likes

(BitVenom) #16

HECK YEAH MAN (I can’t swear, doh… it just turns into little dots…)!!!

Great job. I’ll still dig into your DAE and see if I can ‘harden’ HODOR to bad/odd inputs though.

But still - really, really amazing work!

0 Likes

(D Kesserich) #17

As writing a new importer would have to be done from scratch and is beyond my abilities, you’ll have to convert them into FBXs with Visual Studio (the Community Edition is full featured and free). Then import the FBX into Blender. Be sure to set the scale to 100 when importing.

After that you’ll have to re-set up all the textures, which is kind of a pain.

1 Like

Getting Homeworld Remastered Ships into Blender
(Xercodo) #18

How does that work? I been using VS for code dev stuff but never knew it could do that lol.

0 Likes

(Sastrei) #19

@DKesserich YOU ROCK!!! :smiley:

0 Likes

(D Kesserich) #20

Stumbled onto a problem with the script: Weapons don’t work. Looks like it’s an issue with the way animations are exported (the stupid id generator function of the original exporter strikes again), and I’m having a hell of a time parsing the damn thing to figure out how to fix it.

More as it develops…

0 Likes

(BitVenom) #21

Let me know if I can help in any way…

0 Likes

(D Kesserich) #22

I think I got it. Updated script pushed to GitHub.

Problem was the library_visual_scenes was pulling matrix_local (which is a 16 item array that has all the transformation data (location, rotation, and I’m not entirely sure what else) and was dumping that into one long string in the xml. Changed it to just pull the XYZ location (rotations don’t seem to matter since the orientations for all the hardpoints are set by the child empties) and it looks like it’s working okay now.

2 Likes

(D Kesserich) #23

Questions for BitVenom or anyone else who might know: What’s the deal with the animations? When opening the FBX in Blender, every single object has an action on it named “[ObjectNameHere]|Take 001|Base Layer.002” Are these necessary for the ship to work, or is this something that 3DS Max just does for no reason?

Also: what are the absolute minimum requirements for a ship to work? I tried throwing together a quick crappy tapered cube and add all the engine trail stuff empties, a basic material with no textures (also no actions), exported the DAE and HODOR took it just fine (hooray), but when I tried it in game I got an Access Violation error when loading in to the match. Does it need at least one diffuse texture and one team texture (even if Team is totally blank like for the Kad Swarmer)?

Trying to figure all this out to make an actual Homeworld Ship Building in Blender guide (also trying to figure out if Blender’s cartesian Z-Up coordinate system causes any weirdness when building a ship from scratch).

0 Likes

(Dragon93) #24

Textures aren’t needing. I put a model in based from the p1mothership. I removed all but one repair/capture and totally remove salvage (purely because there was no need for them). Removed all the left/right etc. bits but ended up adding them back in manually before realising their importance in .events and how lucky i was with the number of my new ones :smiley:

This was 3ds Max - no material, no textures. Collision model is not needed either. Again, salvage was not included.

0 Likes

(D Kesserich) #25

I hadn’t looked at the .events file. That refers to animations, so I guess that’s what all the actions are for. Maybe threw the access violation because it was trying to get info from the HOD that just wasn’t there.

Probably be worth making a ‘Generate Animations’ script that’ll automatically add all of them.

0 Likes

(Dragon93) #26

Possibly but they are optional. It is used by events for things like smoke and fire when health is low. The number of them and having them as far as i understand is not needed - pretty sure not all ships have .events too. Simple pop up to choose left/right/front/back for a joint is all that would be needed. You’re probably right that’s where the crash came from; also make sure the .ship file doesn’t look for any utilities (repair etc.) that you don’t have.

0 Likes

(Sastrei) #27

Typical behavior when stuff in the events file doesn’t have a matching joint in the hod is it’ll just spawn the effect at the root.

Missing hardpoints in the .ship file WILL cause a crash though.

0 Likes

(D Kesserich) #28

Well, I can’t figure it out. I’ve manually created an exact duplicate of the Swarmer rig for my silly test ship mesh. Every joint with exactly the same name, with exactly the same hierarchy. I even put in all the animations and set up the materials.

Export the DAE, HODOR makes the hod no problem, I swap it into the kus_scout, same way I did for testing the swarmer.

Start up mp beta with the -overridebigfile flag, and I get the access violation error when I try to start a match.

0 Likes

(BitVenom) #29

PM it to me, I’ll check right now.

0 Likes

(D Kesserich) #30

PM sent.

<10 char>

0 Likes

(BitVenom) #31

Skype complete! I think the (relatively minor) issue now found means there will be some degree of Blender->DAE for ‘new’ ships in the very near future. I still need to roll out an update to HODOR for a few things - but some really great progress is being made.

2 Likes