Blender DAE Exporter for HWRM

(Christoph Timmermann) #222

Do you use custom shaders?

(D Kesserich) #223

Weapon meshes should be children of ROOT_LOD[0], not JNT[Default] (actually, they should be children of their own weapon empties, which are in turn children of ROOT_LOD[0]. This is what the ‘Mesh to Weapon’ button is for.)

I’m not sure what’s going on with the UVs from your description. Maybe something up with your normals? Select each mesh, go to edit mode and click the ‘Recalculate’ button under the Shading/UVs tab and try re-exporting from there.

(Pbobbert) #224


I dont think so? How do I check?


Im not sure I understand. Is a mesh weapon something special? I simply have a mesh that I called leftgun and rightgun. Can you explain what you they are?

I did some clarifying tests to put all the information I have together.

Ship 1. Scratch built. Shows up correctly in blender, Visual Studios, DAEnerys and HWRM

Ship 2. HW2c bomber exported via cfhoded. Reversed UVs upon exporting. Shows up correctly in Blender, and Visual Studios. Backwards in DAEneys and HWRM.

Ship 3. HW2c bomber again exported via cfhoded. UVs not reversed. Shows up backwards in Blender and Visual Studios. Correct in DAEnerys and HWRM.

So far I havnt been able to come up with an explanation. It has to be something to do with exporting. But I cant figure it out. How else could it work on one ship and not another?

(Taiidan Republic Mod) #225

That’s not the way I would do it. I would:

  1. RODOH the HW2 classic HOD file for the hgn_attackbomber - you now have a DAE with all the correct joints
  2. Import the DAE into blender using the blender dae importer
  3. Export the texture files from CFHoded for the HWRM hgn_attackbomber
  4. Swap the texture files in Blender and re-export (remembering to add the “_FMT[DXT1]” to the end of the image names, because the importer misses them off…)
  5. HODOR the exported DAE file

(Pbobbert) #226

How will exporting the ship as a DAE differ from and .obj? That said ill give it a try and see what happends. But I thought rodoh only works on HW2c_RM hods. Aka gonna have a bad time when I get to any custom HW2 hods.

Right now im trying to establish a workflow using blender, I was following the export steps from [TUTORIAL] oldHOD to nuHOD with Nathanius

Just to double check though, RODOH doesnt work on any HWRM hods right?

(ajlsunrise) #227

Post HWRM version 2.0, that is correct.

(Taiidan Republic Mod) #228

Because obj is just a model format, RODOH produces the joint structure as well. It will save lots of time.

Yes, that’s why I said to use RODOH on the classic HOD. The HW2 classic models are the same as HWRM. They only changed the textures. I believe the workflow I described is basically the one gearbox used. For HW1 ships it wouldn’t work because the models are different.

Even pre HWRM 2.0 HODs will not work with RODOH, only classic HODs.

(Nathanius) #229

While that is true technically the pre-2.0 HODs could be got at by CFHodEd’s partially updated version

(Pbobbert) #230

As an update I have now tried rodoh and it spat out complete garbage at me. On the other hand I have made perhaps some progress.

One of the meshes propely displays its texture while in blender, visual studios, and HWRM. DAEnerys still messes it up though but at this point I dont particularly care about that. I still have no idea why the other meshes have their textures flipped.

(Christoph Timmermann) #231

Interesting. Would you mind sending me that file? I’m always interested in things that are not the same in DAEnerys as in HWRM.

(Pbobbert) #232


I still have no idea why, but I have solved the issues. There were two of them.

The first issue covers a discrepancy between blender, and DAEnerys. The second issue covers a discrepancy between DAEnerys and HWRM.

Firstly, somehow opening all of my texture files (in, and saving them again fixed the issues with backwards textures in DAEnerys. It must have had something to do with the batch .dds to .tga converter script I found on the farming simulator forms.

So it turns out there was nothing wrong with the .dae file. I ran a test just to double check, placing the same .dae into two different directories so they would reference different textures. One (using the un-saved files) produced a backwards ship. The other produced a correct looking ship.

Now the the second point. I havnt seen this on the forums yet so if its there I’m going to feel like a dork.

You can reference textures across hods, meaning you can make a .hod with no textures at all, and as long as you make your material reference an image named the same way as the base game, e.g. Hgn_AttackBomber_Front_DIFF.tga it will go find you that file and display it in game on your ship, even though it isnt in your hod. This was what was actually flipping my textures, because it was grabbing the wrong files! And because im working on a bomber, when I used the HW2 naming convention it went out and found a file, that happened to be backwards.

So there we have it. If you have flipped textures in DAEnerys, try to re-save your .tga files. If you have messed up textures in game, make sure you have unique names on them all.

Although now I have to fix my stripe, badge, and engine glows. And for some reason my ship looks more matt than other ships.

(Taiidan Republic Mod) #233

@bitvenom mentioned about the texture naming thing. It was a while ago, when the new patch came out, so it is probably buried somewhere. It can be quite useful, or quite irritating!

(Taiidan Republic Mod) #234

Please can someone help me work out why this DAE file is not generating a MAD file? I have HOLD_ANIM etc. all set up and a joint is animated.

@PayDay @radar3301 the animations play fine in DAENerys…

(Sastrei) #235

The only thing I can think of is that your animations are bezier format with in and outtangents instead of linear, but I just know someone is going to come along and tell me that HWR supports bezier now.

(Taiidan Republic Mod) #236

I tried swapping “BEZIER” to “LINEAR” directly in the XML file, but it still didn’t produce a mad file :frowning:

I have other dae files that I made with max that contain BEZIER keyframes and they work. I really can’t spot the problem here, it has the hold anim node and the animation definitions…

(Christoph Timmermann) #237

I also tried some things, without success. This is strange, maybe just recreate the DAE? :stuck_out_tongue:

(Taiidan Republic Mod) #238

There seems to be something odd about the durations. Is blender’s frame rate not 30 fps?

(Sastrei) #239

By default I believe it’s 24fps.

(Taiidan Republic Mod) #240

Ok, it was related to the frame rates. This tag in the DAE file specifies the keyframes in time (seconds).

<float_array id="xxxxx-input-array">0 1.25 2.5 3.75</float_array>

I was assuming 30fps, so it worked when I corrected it to:

<float_array id="xxxxx-input-array">0 1.0 2.0 3.0</float_array>

In other words, unless what you specify in the ANIM[xx] nodes exactly matches the keyframes, you will not get a MAD file…

Interestingly, the max-generated DAE has the following information specifying a frame rate and start and end times:

	<technique profile="MAX3D"><frame_rate>30.000000</frame_rate></technique>
	<technique profile="FCOLLADA">

There is no equivalent in the Blender-generated DAE. Its presence does not seem to matter to HODOR…

(Christoph Timmermann) #241

Nice find! This can be implemented into DAEnerys to warn modders. :slight_smile: