[TOOL] DAEnerys - DAE Ship Editor

(Siber) #362

Do you see the asteroids glow at the transitions between the two textures as it’s being harvested? I think that’s what he’s referring to as ‘burn’ but I’m not sure

(ajlsunrise) #363

Well, I still don’t know what’s going on. Even in-game with no changes to the shader other than to auto-cycle the fade value, I get this:

That’s the “vanilla” asteroid.

But the example provided in the HODOR Ship Examples has something like this for the glow tex:

(ajlsunrise) #364

@BitVenom, and others: I tracked down the problem…

Line 332 of data:shaders/gl_prog/sob_ship.frag:

float isPaint = texGlow.g;

Asteriods don’t get painted (typically), so the G channel of the glow texture (which, in the case of the ore surface shader, is actually a combination of the REFL, PAIN, and SPEC maps in the R, G, and B channels, respectively) is defaulted to 0 (for no paint). This is totally fine.

Line 333:

texGlow.g = 0.0;

This would seem innocuous, if it weren’t for the fact that this value gets used further down on line 398:

float mapGlowMask = texGlow.g;

By setting texGlow.g to 0, we are telling the shader to not use the glow mask, which, at lines 452, 493-494, 500, and 604, results in a zero for the glow color addition.

452:    float glowStrength = mapGlowMask*max(0.0, extGlowPower-(extGlowFren*frenDeg));

493:    vec3 diffRGB = paint.rgb;
494:    vec3 glowRGB = texGlowRGB.rgb*0.8;

500:    glowRGB *= glowStrength;	
604:    paint.rgb = (diffRGB*diffAll)+glowRGB+(specAll*specStrength);

Changing line 333 to texGlow.g = 1.0; fixes the issue.

P.S.: I even extracted a clean version of the file from the archive, just to make sure I hadn’t screwed something up with the file I had previously extracted. Same results.

(Snake_B5) #365

Does it affect the asteroid in-game too ?
Or is it only affecting DAEnerys because the game don’t use the glow anyway ?

(trying to educate myself on shaders here ^^)

(Christoph Timmermann) #366

HWRM 2.0 doesn’t load TGAs for cubemaps anymore, the examples are horribly outdated. You shouldn’t even have reflections in-game with these. So DAEnerys should only load DDS too…

So I just realized that I missed the “MAD”-parameter for dockpaths. It’s an index pointing to an animation, right?
But animations are defined like this: ANIM[close]_STF[400]_ENF[400]_LS[0]_LE[0].

How does HODOR know which animation is linked to which index? Is it just the order in the DAE-file? Seems a bit unsafe to me…

Or are they ordered based on their frames?
Also, are they starting at 1?

It affects both, it’s a bug in the game’s shader code. (If I interpreted @radar3301’s post correctly) :smile:

(Siber) #367

What? No, that can’t be…

Damnit. I missed that memo. At least bulk converting them shouldn’t be too hard, I’ve done similar before…

Quick testing suggests the asteroid harvesting glow may in fact be broke ingame. My testing was pretty quick though, and I can’t do more for another nine hours or so.

(Christoph Timmermann) #368

This just looks like the specular highlight. Unless your cubemaps are extremely dark, I can’t see them on here.
EDIT: Look at the original backgrounds in the game files, all of them have DDS cubemaps…

(Siber) #369

I know, that screenshot was confirmation, not refutation. Those spheres looked very different when the envmaps were working, and I have tested them on stock backgrounds too.

(Christoph Timmermann) #370

I just pushed a little update, it’s mostly some fixes. This is also nice to test the updater now. There should be a little window popping up when starting the old version, you can turn this off in the settings or by ticking the little “Never ask again”-checkbox.

Download: DAEnerys_b6117.zip

  • Changed icon.
  • Fixed available file types in save dialogs for OBJ and DAE.
  • The animation index of dockpaths (MAD) is now imported and saved.
  • Fixed that flags would export as uppercase (for example “USEROT”).
  • Cleaned up importing process of names, added many problem checks, fixed many crashes.

(Sastrei) #371

STF = starting frame; animations are sequential, so the fodder has to ensure they do not have overlapping animations.

Also, HODOR can use ST instead for seconds, and index animations that way.

(ajlsunrise) #372

Yes, @PayDay interpreted that correctly.

If you want to fix it yourself:[quote=“radar3301, post:364, topic:540034”]
Changing line 333 to texGlow.g = 1.0; fixes the issue.

(Nathanius) #373

Your update dialogue needs a button :smiley:

It comes up and you can’t get rid of it, can access the functions of the program though

(Christoph Timmermann) #374

There is a “No”-button… or does the window get stuck behind something? :stuck_out_tongue:

(Herbyguitar) #375

I think he means the window does not disappear after making the choice


Is he referencing the lack of an ‘x’ button up top to close it out?

(ajlsunrise) #377

It goes away just fine clicking Yes or No on build 6077 (which is when the updater was released).

(Christoph Timmermann) #378

It does disappear for me, but you never know what happens on other systems. :smile:


@radar3301, @DKesserich, @Dom2, @BitVenom and all others that may know about this. :stuck_out_tongue:

Working on animations. I know most of the stuff by reading @Dom2’s wonderful tutorial.
So the Taiidan Interceptor wings seem to have 102 keyframes, isn’t that a bit too much? I don’t believe that Homeworld uses all of them, isn’t it enough to do a linear interpolation between 4 or so?

What is the difference between the values in the INPUT and the OUTPUT arrays?
Why is there TANGENT data? Can I just ignore it? And why are there only 2 float values for the tangents each?
Homeworld does only support LINEAR interpolation, right?

How do I calculate the frame using the time? Are the animations always in 30 FPS?

(ajlsunrise) #379

They are for all 4 animations. Each animation can define a start and stop time.

Tangent in, and tangent out. I don’t know what they are used for, but I’m sure there’s some info on that other forum about what they are used for.

Yes and no. The old MAD format defined FPS on a MAD animation basis. As far as I know, that hasn’t changed. “Frames” in the sense I believe you are using it, are meaningless here. HW2MAD keyframes are {time, value} values, not {frame, value}. Of course, there could be Blender export things I’m not aware of…

(Siber) #380

I believe the animations are not linear interpolation and are instead curves, as I believe is typical of animation systems, and the tangents are related to that.

(ajlsunrise) #381

Tangent information:


http://forums.relicnews.com/showthread.php?109294-MAD-Editor-MADEd-1-01&p=3514554&viewfull=1#post3514554 (near bottom of post)