[TOOL] DAEnerys - DAE Ship Editor

Hi,
I know you probably don’t want to make promises, but I want to recap something:

  • Could DAEnerys be used in the future to make a pre-DAE file before going into 3DS Max?
    I have to get more experience with MAX, but connecting textures to mesh seemed to be painful.
    I’ll be doing it again in the next days, to confirm my impressions, but using DAEnerys just for consulting doesn’t seem to be enough, although it’s becoming a very cool tool/interface.

Let me know if I got something wrong, IDK if there is anyone else with the same impressions (about using MAX).

1 Like

Yeah, I even want to move all 3dsMax/Blender stuff into this tool. But how you said, I can’t promise anything.

I don’t like it either, the interface is non-sense, it’s slow, it’s ugly, etc…
Try to get into Blender if MAX is nothing for you.

1 Like

For pro artists (of which there are obviously many, many here) - Max is one of the main workhorses. It isn’t the only one… we use Modo, ZBrush, Surface (various versions), etc. MANY tools. I think we even use Maya? I can’t even keep track.

3 Likes

I know that, but if we can get access to a specialized tool that can save our spare time, we can optimize results.
Most of us willing to mod have to work at night when we are stressed and Blender, Max et al are more generalist focused in CREATING the project rather than speeding it up. If I would work with it, maybe I would be more competitive or less resistant. But as I said in the previous post, I have to get more experience with MAX to confirm this assertion, maybe I’m not setting up right MAX interface, I have to check more thoroughly. But, so far, I haven’t find it productive.

2 Likes

I’m not defending Max in order to put down the value or utility of what @PayDay (and many others) have done. I know plenty of people who can’t use Photoshop, but virtually nobody is going to call it a bad tool. Most tools require a certain perspective or context - Max is a GREAT tool, give the right context :wink:

2 Likes

My opinion on MAX is relative. Yeah, MAX is a great tool, but nothing compared to Blender.
I even started with 3D stuff using Max, but gave up after some weeks. Then at some point I found Blender and how easy and intuitive it is, that’s why I love it some much.

It’s roughly the same with GIMP and Photoshop for me. :stuck_out_tongue:
EDIT: But I can easily understand why Photoshop is great too, I just have to re-learn the hotkeys and stuff.

1 Like

The biggest nightmare I’ve come across in Max is smoothing and animations, there’s a helpful blender tutorial for anims I have to get through but if the old CFHodEd interface for animations could be recreated… :drooling_face:

2 Likes

I haven’t made many models, but CFHoded was crucial to me when I did.

3 Likes

Here’s the log, but I don’t think there’s anything helpful in it :cry:

OpenTK initialized.
Material 'Default' added.
Material 'MAT[Tur_P1MothershipEngine]_SHD[thruster]' added.
Material 'MAT[Tur_P1MothershipHangar]_SHD[ship]' added.
Material 'MAT[Tur_P1Mothership]_SHD[ship]' added.
Mesh 'COL[Root]Mesh' added.
Mesh 'MULT[P1Mothership]_LOD[0]Mesh' added.
Mesh 'MULT[P1Mothership]_LOD[0]Mesh' added.
Mesh 'MULT[P1Mothership]_LOD[0]Mesh' added.
Mesh 'MULT[P1Mothership]_LOD[1]Mesh' added.
Mesh 'MULT[P1Mothership]_LOD[1]Mesh' added.
Mesh 'MULT[P1Mothership]_LOD[1]Mesh' added.
1 Like

Nope. :frowning: Thank you anyway. :slight_smile:
I’ll google and stuff a bit when I find time. Until then I will add a checkbox for disabling lighting which should “fix” that issue for now. I mean you still have your Nvidia. ^^

I think the biggest issue with MAX and blender when you compare them to DAEnerys is the sheer amount of functionality and features they have versus what you actually need…

also despite how “easy” they can be doing some stuff old tools like lightwave, milkshape, or wingz made modelling a breeze relatively speaking, obviously this considering a world where models used to be much simpler and had much less data embedded on them.

to me replicating the geometry of any of the current homeworld ships in milkshake would probably take just a few minutes starting from a box and extruding like crazy, moving a vertex here and there, but even I can understand that this kind of workflows have changed… hell now triangles are getting kinda deprecated in favour of quads for new games and that basically makes me an obsolete modder D:

oh how I miss games where you could just slap a model add some table and it worked… (Comand and conquer voxels).

Alas for now I am just waiting for this tool to be able to import either FBX or OBJ to create my models from scratch here.

so might I suggest if is not added already, can this tool directly call HODOR and create the HOD file once the modder finishes modifying the DAE file?

3 Likes

Time for a new release.
Download: DAEnerys_b2739.zip

Added features

  • The transformation of all elements is now EXACTLY like in Homeworld, this makes debugging ships MUCH easier.
  • Dynamic key binding system. You can edit the keys for specific actions in a little window, they get saved in hotkeys.xml.
  • Added checkbox for disabling lighting.
  • Added a Windows icon.
  • Engine Shapes get parsed, put in a tab and displayed when enabled.
  • Added a neat problems tab at the right side of the editor. You can open it by clicking on the little flag button. It will display all problems of your DAE that it found, the flag will either get red or yellow depending on if you have errors and/or warnings. (Errors crash HODOR or your game, warnings are just bad to have)
  • The editor now only loads textures in TGA-format (like HODOR) and will warn you if any texture is not a TGA.
  • Added dockpath tolerance visualization.

Bugfixes

  • Fixed some GUI issues.
  • Recreated the way HODOR uses the transformation of joints. (It was wrong sometimes)

image

It’s not that much for almost a week, but you know… school.
If you know something that does not get detected as a problem yet, tell me here please. :slight_smile:

And by the way, if your ship is weird in-game, like pointing downwards, engine glows scaling wrongly, etc… Just throw it into DAEnerys and save your time by not having to start up HODOR and the game with every test. :wink:

Have fun modding.

4 Likes

Silly question certainly, but how do you visually check that the orientation is ok ?
You have a front/top “reference” visible on screen ?

1 Like

Press NumPad1 for front view for example. ^^
You can view (and edit) all key bindings in the key bindings window.

I will probably add some sort of orientation display in later versions.

1 Like

No, it’s a lot, thank you!

1 Like

Here’s some (Java) code for that (let me know if you need help converting to .NET I converted it myself, see end of post):

public void drawAxesProjected(float canvasWidth, float canvasHeight) {
    // calculate reasonably scaled axes size
    float drawScale = Math.min(canvasHeight, canvasWidth) / 30;
    
    // disable lighting - lighting tends to screw with this process
    glDisable(GL_LIGHTING);
    
    // preserve projection matrix
    glMatrixMode(GL_PROJECTION);
    glPushMatrix();
    glLoadIdentity();
    glOrtho(0, canvasWidth, canvasHeight, 0, -1, 1);
    
    // preserve modelview matrix
    glMatrixMode(GL_MODELVIEW);
    glPushMatrix();
    
    // get modelview matrix
    FloatBuffer fbuf = ByteBuffer
        .allocateDirect(4 * 4 * 4)
        .order(ByteOrder.nativeOrder())
        .asFloatBuffer();
    glGetFloat(GL_MODELVIEW_MATRIX, fbuf);
    
    // reset modelview matrix
    glLoadIdentity();
    glTranslatef(drawScale * 2f, canvasHeight - drawScale * 2f, 0f);
    
    // calculate projected axes
    Matrix4f m = new Matrix4f();
    m.load(fbuf);
    Vector4f x = Matrix4f.transform(m, new Vector4f(1, 0, 0, 0), null);
    Vector4f y = Matrix4f.transform(m, new Vector4f(0, 1, 0, 0), null);
    Vector4f z = Matrix4f.transform(m, new Vector4f(0, 0, 1, 0), null);
    
    // begin drawing axes
    glBegin(GL_LINES);
    
    // draw x-axis
    glColor4f(0f, 0f, 1f, 1f);
    glVertex2f(0f, 0f);
    glVertex2f(x.x * drawScale, -x.y * drawScale);
    
    // draw y-axis
    glColor4f(0f, 1f, 0f, 1f);
    glVertex2f(0f, 0f);
    glVertex2f(y.x * drawScale, -y.y * drawScale);
    
    // draw z-axis
    glColor4f(1f, 0f, 0f, 1f);
    glVertex2f(0f, 0f);
    glVertex2f(z.x * drawScale, -z.y * drawScale);
    
    // done drawing
    glEnd();
    
    // restore views
    glMatrixMode(GL_PROJECTION);
    glPopMatrix();
    glMatrixMode(GL_MODELVIEW);
    glPopMatrix();
    
    // re-enable lighting
    glEnable(GL_LIGHTING);
}

I don’t remember exactly which corner of the screen it draws at, but if I remember correctly, I think it’s the lower-left corner.


I realized OpenTK doesn’t have a Matrix4.Transform function, so here is the one that works in Java:

/**
 * Transform a Vector by a matrix and return the result in a destination
 * vector.
 * @param left The left matrix
 * @param right The right vector
 * @param dest The destination vector, or null if a new one is to be created
 * @return the destination vector
 */
public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) {
	if (dest == null)
		dest = new Vector4f();

	float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z + left.m30 * right.w;
	float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z + left.m31 * right.w;
	float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z + left.m32 * right.w;
	float w = left.m03 * right.x + left.m13 * right.y + left.m23 * right.z + left.m33 * right.w;

	dest.x = x;
	dest.y = y;
	dest.z = z;
	dest.w = w;

	return dest;
}

But it does have OpenTK.Vector4.Transform(Vector4 vec, Matrix4 mat) – I just don’t know what results that gives…


VB Code (untested, but should (theoretically) work):

Public Sub DrawAxesProjected(CanvasWidth As Single, CanvasHeight As Single) {
    ' calculate reasonably scaled axes size
    Dim DrawScale As Single = Math.Min(CanvasWidth, CanvasHeight) / 30!
    
    ' disable lighting - lighting tends to screw with this process
    GL.Disable(EnableCap.Lighting)
    
    ' preserve projection matrix
    GL.MatrixMode(MatrixMode.Projection)
    GL.PushMatrix()
    GL.LoadIdentity()
    GL.Ortho(0!, CanvasWidth, CanvasHeight, 0!, -1!, 1!)
    
    ' preserve modelview matrix
    GL.MatrixMode(MatrixMode.ModelView)
    GL.PushMatrix()
    
    ' get modelview matrix
    Dim buffer(0 To 15) As Single
    GL.GetFloat(GetPName.ModelviewMatrix, buffer)
    
    ' reset modelview matrix
    GL.LoadIdentity()
    GL.Translate(DrawScale * 2!, CanvasHeight - DrawScale * 2!, 0!)
    
    ' calculate projected axes
    Dim m As OpenTK.Matrix4 = New OpenTK.Matrix4(
        buffer(0), buffer(1), buffer(2), buffer(3),
        buffer(4), buffer(5), buffer(6), buffer(7),
        buffer(8), buffer(9), buffer(10), buffer(11),
        buffer(12), buffer(13), buffer(14), buffer(15)
    )
    Dim x As Vector4 = Vector4.Transform(Vector4.UnitX, m)
    Dim y As Vector4 = Vector4.Transform(Vector4.UnitY, m)
    Dim z As Vector4 = Vector4.Transform(Vector4.UnitZ, m)
    
    ' begin drawing axes
    GL.Begin(BeginMode.Lines)
    
    ' draw x-axis
    GL.Color4(0!, 0!, 1!, 1!)
    GL.Vertex2(0!, 0!)
    GL.Vertex2(x.x * DrawScale, -x.y * DrawScale)
    
    ' draw y-axis
    GL.Color4(0!, 1!, 0!, 1!)
    GL.Vertex2(0!, 0!)
    GL.Vertex2(y.x * DrawScale, -y.y * DrawScale)
    
    ' draw z-axis
    GL.Color4(1!, 0!, 0!, 1!)
    GL.Vertex2(0!, 0!)
    GL.Vertex2(z.x * DrawScale, -z.y * DrawScale)
    
    ' done drawing
    Gl.End()
    
    ' restore views
    GL.MatrixMode(MatrixMode.Projection)
    GL.PopMatrix()
    GL.MatrixMode(MatrixMode.ModelView)
    GL.PopMatrix()
    
    ' re-enable lighting
    GL.Enable(EnableCap.Lighting)
End Sub
2 Likes

One quality of life enhancement would be to exception trap and allow loading of temporary or no textures and instead throw a warning so that the mesh can be previewed even if the textures are invalid. I was testing a model and got a crash when using a dummy .png (that had UV arrows on it) A lot of modders may want to put a basic ship in the tool to preview hardpoints and other things.

In my case the materials were setup correctly, but I had remapped the img to the dummy png in max so it wasn’t a TGA and it wasn’t named consistantly.

1 Like

Thank you very much. I can use that as a reference. :slight_smile:

Well, it has the one you posted below and this one.

Thank you, but a bit unnecessary to be honest, I code in C#. ^^
I personally “hate” Visual Basic, it’s just so ugly and hard to read. C# is the much better option.


Oops, that wasn’t intended. I will allow any textures to load but display a problem then.

1 Like

CreateTranslation isn’t the same thing, though. CreateTranslation takes a Vector and spits out a Matrix.

Well, still should be the same, just with braces and semi-colons, and some re-arranging of variable declarations, lol.

1 Like

I think you use it like this to recreate the thing you mean:

Matrix4 matrix = Matrix4.Identity; Vector3 translation = new Vector3(42, 0, 42); matrix = matrix * Matrix4.CreateTranslation(translation);

This translates the matrix by the given vector, it’s how I do it in my code.

Yup, lol.