Jump to content


Photo

Game Maker 3D Terrain Editor (GMTE)


  • Please log in to reply
58 replies to this topic

#41 borut

borut

    Courage Wolf Productions

  • GMC Member
  • 1152 posts
  • Version:GM:Studio

Posted 10 October 2010 - 04:33 PM

verry nice! You should make that you can save map as gml script for vertex stuff and all. So people could use terrain in their games and this editor would be extremly popular!
  • 0

#42 Crhonos

Crhonos

    GMC Member

  • GMC Member
  • 219 posts
  • Version:GM:Studio

Posted 26 October 2010 - 12:18 AM

I did love the engine, execelent for making online 3d rpg games.But... how do we export the map model ?
  • 0

#43 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 02 November 2010 - 11:00 PM

you can't export a map level, and i don't know if Xilo is still working on this but im pretty sure it's not going to come out.
  • 0

#44 YellowAfterlife

YellowAfterlife

    GMC Member

  • Global Moderators
  • 3497 posts
  • Version:GM:Studio

Posted 02 November 2010 - 11:05 PM

If you want a export function, you may go for anything simple as byte heightmap + textureid byte, but you will need to add the terrain rendering code and format reader to your game anyway.
  • 0

#45 Crhonos

Crhonos

    GMC Member

  • GMC Member
  • 219 posts
  • Version:GM:Studio

Posted 07 November 2010 - 01:36 PM

Thanks, I'll see what i can do ^^

Edited by Crhonos, 07 November 2010 - 01:36 PM.

  • 0

#46 Billwaa

Billwaa

    Graphic Designer

  • GMC Member
  • 532 posts
  • Version:GM:Studio

Posted 08 November 2010 - 10:41 PM

oh wow, I remember seeing this, or the ancient version rather, sometime before I left GMC around 3 or 4 years ago due to transition into project with PKMN3D looking for a 3D engine, then college and the real world. Just hop in today and see what improvements GM had made, and hey, this is finally released! Too bad i cant get my copy of GM to activated work anymore. Now that I taken more CS and 3D graphics classes from engineering, maybe I should give GM a try again.
  • 0

#47 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 379 posts
  • Version:GM8

Posted 11 December 2011 - 07:45 PM

Finally had time to release version 2 which adds saving and loading, rendering this one obsolete:

http://gmc.yoyogames...howtopic=526631
  • 0

#48 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 13 December 2011 - 02:16 AM

All i can say is, Nice, kind of sudden :P! But nice :P!
  • 0

#49 sneaky666

sneaky666

    536e65616b79

  • GMC Member
  • 1034 posts
  • Version:GM8

Posted 13 December 2011 - 03:19 AM

Finally had time to release version 2 which adds saving and loading, rendering this one obsolete:

http://gmc.yoyogames.com/index.php?showtopic=526631


I posted here
http://gmc.yoyogames.com/index.php?showtopic=526631
check it out
  • 0

#50 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1021 posts
  • Version:GM8

Posted 30 December 2011 - 10:00 PM

I am just wondering 2 things with regards to the terrain model;

1.How did you accurately calculate the surface normals for each triangles? Could you post the script that did it?

2. How were you able to blend the textures into each other, and even use more than 1 texture in one 3d model?

I am intrigued to know the answers, as I am building my own terrain system...

Thanks,

Zesterer
  • 0

#51 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 379 posts
  • Version:GM8

Posted 31 December 2011 - 11:51 AM

I suggest you look at the source code of version two, there you'll find out how this is done.

1.: I calculate normals per vertex (terrain gridpoint) with the following formula (I calculate the surface normal of the triangle (x,y), (x+1, y), (x, y + 1)):
// Sides delta x and y are constant (equal to 1)
/* ^  2
   |  |\
   x  1-3
      y-->
*/
// Side 1 (x-Direction): 2-1
dx1 = 1;//x2-x1;
dy1 = 0;//y2-y1;

// Side 2 (y-Direction): 3-1
dx2 = 0;//x3-x1;
dy2 = 1;//y3-y1;

// More constants...
dx1_by_dy2 = dx1*dy2;
dy1_by_dx2 = dy1*dx2;

cpz = (dx1_by_dy2) - (dy1_by_dx2);
        
// Calculate normals
for (_x = updateFromX; _x <= updateToX; _x += 1)
{
    // Calculate point positions x
    x1 = _x;
    x2 = _x+1; gx2 = min(x2, width-1);
    x3 = _x;
    
    // Read first y coordinate
    z3 = ds_grid_get(heightGrid, x3, updateFromY);
    
    for (_y = updateFromY; _y <= updateToY; _y += 1)
    {
        // Calculate point positions y
        y1 = _y;      
        y2 = _y;
        y3 = _y+1; gy3 = min(y3, height-1);//_y*TER_PATCHSIZE;   
        
        // Get heights.
        z1 = z3;//ds_grid_get(heightGrid, x1, y1);
        z2 = ds_grid_get(heightGrid, gx2, y2);
        z3 = ds_grid_get(heightGrid, x3, gy3);
        
        // Calculate normal (cross product of two sides).
        // Side 1: 2-1
        dz1 = z2-z1;
        
        // Side 2: 3-1
        dz2 = z3-z1;
        
        // Calculate cross product
        cpx = (dy1*dz2) - (dz1*dy2);
        cpy = (dz1*dx2) - (dx1*dz2);
        //cpz = (dx1_by_dy2) - (dy1_by_dx2);
        
        //r = sqrt((cpx*cpx) + (cpy*cpy) + (cpz*cpz)); // Length of the product. Used for normalization. // Appears to be unnecessary.
        
        // (Normalize and) store results
        ds_grid_set(normalsXGrid, _x, _y, cpx);
        ds_grid_set(normalsYGrid, _x, _y, cpy);
        ds_grid_set(normalsZGrid, _x, _y, cpz);
    }
}
(note that this is the optimized version of this code which precalculates as many constants as possible)

2.: Every model has only got one texture, but this texture is a surface unique for each model. So I can control the color of every single pixel. I could do much more than blend preset textures: I could also tint them in any color, draw any kind of shapes on it etc.

Edited by Master Xilo, 31 December 2011 - 06:29 PM.

  • 0

#52 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1021 posts
  • Version:GM8

Posted 31 December 2011 - 12:26 PM

Thats very complex coding.

But I still have 2 more questions. I would be very thankful if you could answer them.

1. Why do you need 'delta' when calculating normals? Can't you just use a script where you input the 3 x,y,z coordinates and it returns the normal? Isn't that easier, or are there any scripts you know of that do that?

2. With regards to surface texture - what if you need terrain with a large texture size than the screen res? I thought surfaces could only be as large as the screen?

Thanks,

Zesterer
  • 0

#53 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 379 posts
  • Version:GM8

Posted 31 December 2011 - 06:27 PM

1. Yes, of course you could have such a script. I wrote it like this for the sake of speed. You do need deltas for two sides of the triangle as that's how the normal calculation (calculation of the cross product of the direction of two sides) works, but you can caulculate these values from arbitrary given.
You can easily write out everything, giving you the normal calculation code for one triangle:
dx1 = x2-x1;
dy1 = y2-y1;
dz1 = z2-z1;

dx2 = x3-x1;
dy2 = y3-y1;
dz1 = z3-z1;
        
cpx = (dy1*dz2) - (dz1*dy2);
cpy = (dz1*dx2) - (dx1*dz2);
cpz = (dx1*dy2) - (dy1*dx2);
Where the cpx/y/z lines are the actual cross product calculation. See http://en.wikipedia....e_cross_product (lines of the matrix, here a1 = dx1, a2 = dy1, a3 = dz1, b1 = dx2, b2 = dy2, b3 = dz2).

You can normalize this vector (meaning scale the length to 1) by adding:
r = sqrt((cpx*cpx) + (cpy*cpy) + (cpz*cpz));

cpx /= r; cpy /= r; cpz /= r;
But that doesn't appear to be necessary with the Game Maker (at least for me... maybe it has internal auto-normalization, or my normals are not much longer than 1, making the normalization obsolete).


2. The terrain consists of many models (which can be hidden seperately), each containing only like 16 x 16 patches (little squares, consisting of 2 triangles). I use one surface per model, which only has a resolution of about 256 x 256 pixels (variable). You can fit many surfaces of this size into memory.

Edited by Master Xilo, 31 December 2011 - 06:37 PM.

  • 0

#54 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1021 posts
  • Version:GM8

Posted 31 December 2011 - 09:39 PM

Ah, thankyou for your help. What you have told me has been genuinely helpful to the creation of my terrain system. I now see where I have gone wrong in many senses.
  • 0

#55 unlimit3d

unlimit3d

    GMC Member

  • New Member
  • 2 posts
  • Version:Unknown

Posted 10 July 2012 - 02:19 AM

Another terrain editor that game maker users might find helpful (and that makes bigger terrains than GMTE) is Landscap3d. Here: http://www.unlimit3d...landscap3d.html
  • 0

#56 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 379 posts
  • Version:GM8

Posted 10 July 2012 - 08:47 PM

Another terrain editor that game maker users might find helpful (and that makes bigger terrains than GMTE) is Landscap3d. Here: http://www.unlimit3d...landscap3d.html


xD shameless ad, not even a feedback included, and your first post (you really created an account just for this?). (But thanks for the bump)

I should report this blatant ad, but I prefer to make a quick review of Landscap3d (after using it for a few seconds), pointing out what I didn't like and why I think it might not be as interesting to a Game Maker user as you said:
  • Uses an installer.
  • Uses a custom installer, installs to Program Files on my 64 bit system even though it's a 32 bit application (should install to Program Files (x86)).
  • Camera movement and terrain changing speeds are way too low and I couldn't figure out how to speed it up.
  • Only saves to heightmaps and undocumented format for which no specification is available (afaik).
  • Is not open source.
  • Is NOT made with Game Maker nor comes with an example on how to load the terrains with GM.
  • The 7 texture limit (GMTE doesn't have this...)
  • How can the textures be saved?

Also about the price/licensing and the website: I couldn't find out what's the difference between the two licenses on your website. I'm not going to comment a lot on the price and the closed source nature, but I think software developers of today should aim to end the software wars (I didn't read the book (yet) but I think the title and idea are great). I mean this and your program reinvent a wheel that has been perfected in 2002 by the first 3D RTS games (AoM, Wc3) if not earlier, we should build up on what has been done not redo it (at least not from scratch).

I'm seriously looking forward to an answer from you.
  • 0

#57 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 416 posts
  • Version:GM8

Posted 11 July 2012 - 09:46 PM

Incredibly Amazing ^^
Nice effect and wonderfull work.

I'll be using this in my RTS game :D

Nice AoE III music in your video ;)
  • 0

#58 unlimit3d

unlimit3d

    GMC Member

  • New Member
  • 2 posts
  • Version:Unknown

Posted 13 July 2012 - 02:33 AM

Awesome feedback and helpful. Thanks!

Yes, I confess that I was hoping to get feedback on it. I appreciate you taking a look. You raise good points.

The reason I made Landscap3D in the first place was to create heightmaps + aplhamaps to be used in game maker. I especially wanted the terrains to be huge and easy to create. I was disapointed with other editors I found online (especially regarding size). So, I do believe it can be helpful to game maker users because game maker's terrain functions make use of heightmaps and alphamaps.

I sympathize with what you say about software wars. By reinventing the wheel, however, I discovered a new technique for rendering far mountains at low detail with minimal popping (better than geomipmapping and other lod algorithms I tried). I have no problem sharing the technique and making the source code available eventually, but I'm still "cleaning" the code and perfecting the algorithm.

[*]Camera movement and terrain changing speeds are way too low and I couldn't figure out how to speed it up.

I'll change this. (You click on the camera to change speed.)

[*]Only saves to heightmaps and undocumented format for which no specification is available (afaik).

You can also export to .obj

[*]Is NOT made with Game Maker nor comes with an example on how to load the terrains with GM.

Okay. I'll add an example of how to do this. Good idea! As for 7 textures, that will hopefully change to 256 (plus any blend of any combo)

Thanks again for the feedback and not dismissing a "shameless ad" :)
  • 0

#59 jabogames

jabogames

    GMC Member

  • GMC Member
  • 4 posts

Posted 21 July 2012 - 02:43 PM

Im alusinating or these graphics are just like the age of mitologhy terrain editor...
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users