Jump to content


Photo

GameMaker Terrain Editor 2 (GMTE 2)


  • Please log in to reply
42 replies to this topic

#1 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 11 December 2011 - 07:13 PM

If you do not know version 1, here are some links: GMC thread, GMTE Website
and a video: A GameMaker Terrain Editor


I finally had some time to release this free terrain editor - although I didn't get to implement all the features I'd like to have.

This program and terrain engine feature for example:


  • Very good use of gm 3d's limited speed.
  • The terrain can have an unlimited amount of textures.
  • Saving and loading maps to compressed zip files (GMTE2 format).
  • Saving to Lightwave obj model files, exporting the terrain texture and heightmap. (BETA)
  • Export to Game Maker d3d.
  • Ability to add any amount of custom textures.
  • Resizeable window with drag and drop functionality.
  • etc.

Let me know what you think!


Download
 

Download the GameMaker Terrain Editor 2, including source files


Some example maps:

I'd love to see your creations!

Extensions/Uses/Applications of this Engine (/v1 of it)

If you know of any other or made your own, please let me know!

Videos


default.jpg

Screenshots
gmte2screenshotdesert.png
gmte2screenshotsnow.th.pnggmte2screenshotlava.th.png


I'm open to any comments and suggestions. I hope you'll like it.
Thanks for your time
- Paul


Edited by Master Xilo, 17 March 2014 - 06:45 PM.

  • 4

#2 JonathanPzone

JonathanPzone

    GMC Member

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

Posted 11 December 2011 - 10:51 PM

Wow, this is amazing! I remember using your first version a long time ago, and I'm really amazed that you've improved upon it.

Also I'm not sure if it's only me, but when zooming in or out, the camera gets really screwy.

So how do you manage all of those textures onto the terrain? Is it a surface that's used as a texture?

Edited by JonathanPzone, 11 December 2011 - 10:52 PM.

  • 0

#3 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 12 December 2011 - 07:09 AM

I'm glad you like it. What exactly do you mean by screwy? I have not experienced this. Yes it's indeed using one surface per model. Thanks to surfaces being natively supported in 3d mode in gm81, I don't need to use the surface fix extension anymore.
  • 0

#4 JonathanPzone

JonathanPzone

    GMC Member

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

Posted 12 December 2011 - 07:13 AM

It was an odd behavior. I didn't rotate the camera or anything yet, but when I zoomed in enough, the camera would zoom out quite a ways and I would not have my brush aligned on the map, it would take about half a minute before the brush would fall down and reset again. It did this multiple times in that session.

I haven't replicated it, though.
  • 0

#5 sneaky666

sneaky666

    536e65616b79

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

Posted 12 December 2011 - 11:01 PM

Can you add a feature to export the texture that you can see on the map as .png file?

Can you add a feature to export the map as a height map (.png) file like this
Posted Image


Or better yet, a button to save both in some output folder at same time.
  • 0

#6 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 13 December 2011 - 05:43 AM

Well it wouldn't be hard to add that. But the texture would be huge if you want the full resolution. The textures are already saved as png, try to rename the extension of a .gmte file to .zip and extract it, you'll find all the data.
  • 0

#7 sneaky666

sneaky666

    536e65616b79

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

Posted 13 December 2011 - 06:10 AM

I looked at the contents of the zip, but it doesn't help me. Can you add the export to heightmap feature, it would be very helpful. Also for the texture, can you add the feature to export it as .png (like as 1 file), also i don't want it to be the exact size as on the terrain, can it be possible to scale it down to at most 512x512?

Edited by sneaky666, 13 December 2011 - 06:11 AM.

  • 0

#8 TheIndependentGamer

TheIndependentGamer

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 21 December 2011 - 02:32 PM

WOW! That is seriously impressive. I wouldn't even know where to start putting something like
this together! I'm downloading it now.
  • 0

#9 DanRedux

DanRedux

    GMC Member

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

Posted 27 December 2011 - 07:39 PM

So you use a surface for every terrain chunk, the equivalent of a surface the size of your terrain?

I can't tell, but why kind of optimizing is going on behind the scenes. Are you caching the surfaces, rendering them to backgrounds, doing anything to conserve memory?
  • 0

#10 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 27 December 2011 - 09:44 PM

Every terrain chunk has a surface of resolution "patches per model" * "pixels per patch" (values you enter when creating a new terrain) as it's texture. There's no additional caching or memory optimization going on.
  • 0

#11 Schyler

Schyler

    Noskcirderf Derf

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

Posted 02 January 2012 - 07:09 AM

Thanks for sharing.
  • 0

#12 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 02 January 2012 - 03:44 PM

I made a quick update which adds rudimentary obj export, heightmap and texture saving (the last one is still bugged (lines of missing pixels), maybe someone can fix this and share). I did this really quick so I had no time to give the scripts nice names, design nice icons, integrate them with the ui or allow to select a folder. Also note that obj exporting takes a lot of time as Game Maker is obviously slow at saving textures/surfaces. Another thing to add is of course Game Maker d3d model export, but that would be easy to do.
  • 0

#13 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 04 February 2012 - 03:30 PM

Announcing another update (same download link):
  • Improved texture export (fixed seams, allows you to select texture size).
  • Fixed obj export (texture coordinates, group sizes and names were somehow bugged).
  • Added rudimentary Game Maker d3d model export and a loading example, meaning you can finally easily use these terrains in your own games.

Regards,
Paul
  • 0

#14 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1043 posts
  • Version:GM8

Posted 23 February 2012 - 10:15 PM

This is amazing. Just amazing. It will seriously help with level design in my new game, and fits in perfectly. Thankyou so much!

The only way I think it could be improved is if it was able to load terrain from a heightmap.
  • 0

#15 _163807

_163807

    GMC Member

  • New Member
  • 16 posts

Posted 25 February 2012 - 07:40 PM

how could i return the z value of your heightGrid?
  • 0

#16 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 25 February 2012 - 10:03 PM

Use the Terrain_getHeight function as _Brush_drawCircleExt does. If you want to get the position of a grid point (non-interpolated), use with (Terrain) Terrain_getGridpointHeight(...,...) or just ds_grid_get(heightGrid, ..., ...)

@Zesterer: This would indeed be useful and not too hard to add.
  • 0

#17 _163807

_163807

    GMC Member

  • New Member
  • 16 posts

Posted 25 February 2012 - 11:54 PM

Oh cool thanks. I knew it would be something simple =_=. Awesome program btw - Curious if you're still working on it and what could be expected of this in the future?
  • 0

#18 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 26 February 2012 - 11:24 AM

I'm glad you like it!

There are many things that could be added to this, the ReadMe.txt lists a few of them. What I'm thinking about adding/changing is for example:
  • Create a new, much easier to use GUI.
  • Allow resizing the terrain by dragging the corners (just like in mspaint).
  • Allow selecting parts of the terrain for saving/loading/exporting/importing of the model/texture/heightmap.
  • Use arbitrary bitmaps as brushes for texture painting and sculpting.
  • Allow blending the terrain texture with colors.
  • Support infinite terrains or at least simplify connecting multiple terrains.
  • Support voxel/volumetric/"All-3D" terrain.

I'm already prototyping the latter:
Posted Image
Posted Image
(the volume is a density field where the points have values from [-1,1] (1 is represented by green for debugging purpose in the above picture, -1 is red), the isosurface is created apporximately where the density value reaches 0. I'm using marching tetrahedrons to create the surface, see http://paulbourke.ne...lygonise/#tetra for more info)


Unique texturing on that will be hard to do without shaders though...

Edited by Master Xilo, 26 February 2012 - 11:31 AM.

  • 0

#19 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1043 posts
  • Version:GM8

Posted 26 February 2012 - 12:44 PM

The voxel engine looks great! I can't wait to see that up and running. By far the biggest problem with heightmap terrain is the fact that it does not support internal structures: e.g cliffs, caves, and overhangs.
  • 0

#20 TheSnidr

TheSnidr

    That guy

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

Posted 26 February 2012 - 12:55 PM

Impressive! There are many heightmap examples, but I haven't seen volumetric terrain done it game maker before!
How would you register collisions?

Edited by TheSnidr, 26 February 2012 - 12:56 PM.

  • 0

#21 _163807

_163807

    GMC Member

  • New Member
  • 16 posts

Posted 26 February 2012 - 05:15 PM

Wow, I'm glad I asked too lol. That sure makes a difference but i could see where special texturing could be a problem. But that is still pretty awesome.

I have another question (while I'm obviously using GTME2); Is it possible to convert your [_Brush_drawCircleExt] into a shadow? I've been trying to figure out how to cast small circular shadows on my terrain, but had no luck.

Also, is there a way to scale the terrain into a larger size when importing it to my project?
  • 0

#22 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1043 posts
  • Version:GM8

Posted 26 February 2012 - 07:29 PM

a shadow is generated due to the position of the surface normal. The only way to do what you want is to darken that area, and Master Xilo says he shall be adding terrain colouring soon.

Edited by Zesterer, 26 February 2012 - 07:29 PM.

  • 0

#23 _163807

_163807

    GMC Member

  • New Member
  • 16 posts

Posted 26 February 2012 - 09:36 PM

a shadow is generated due to the position of the surface normal. The only way to do what you want is to darken that area, and Master Xilo says he shall be adding terrain colouring soon.


Oh no no.. I mean shading casting from an object that stays warped with the Terrain as the object moves along it. Kinda like how the brush tool looks but as a shadow texture instead.
  • 0

#24 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1043 posts
  • Version:GM8

Posted 26 February 2012 - 10:06 PM

Oh ok. But including terrain colouring would be nice right?
  • 0

#25 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1043 posts
  • Version:GM8

Posted 03 March 2012 - 10:15 PM

I've just had another idea... Could you add the option of editing 2 terrains on screen at once (you switch between them)? This would be useful for rivers/waterfalls/oceans etc.
  • 0

#26 Samuel Venable

Samuel Venable

    GMC Member

  • Banned Users
  • 632 posts
  • Version:GM:Studio

Posted 03 March 2012 - 10:53 PM

^I agree.

#27 kyonzuken

kyonzuken

    GMC Member

  • New Member
  • 1 posts

Posted 04 April 2012 - 06:27 AM

Hi. Can you add this GMTE2 to have features like render the image output (png) to isometric terrain or to take picture/snapshot rendered from camera view (of course with view camera object). Thanks!
  • 0

#28 Camman

Camman

    UnReal Software CEO

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

Posted 12 May 2012 - 08:44 AM

Does anyone else have the problem of the GMUT extension not working correctly?
  • 0

#29 Glen

Glen

    GMC Member

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

Posted 18 July 2012 - 03:07 AM

Region separation would be wonderful. In the event of creating a large map, breaking the final product up into smaller models would be great. That way you could draw only the regions surrounding your camera. Rather than the entire map. And by the way. The program freezes every time I run it. And your source files require extensions that are not present in the download. People who want to use this have to go find the extensions.

Specs Regarding the Freeze Up:

Windows 7
Intel Core i5 2.4 ghz Quad
4gb RAM
Intel HD Graphics 3000
Lenovo Laptop

Edited by Glen, 18 July 2012 - 03:22 AM.

  • 0

#30 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 393 posts
  • Version:GM8

Posted 18 July 2012 - 10:39 AM

This issue with DBUT Camman had was sorted out.

Hello Glen, thanks for the feedback.

The system already splits up the terrain into many small chunks referred to as sections, which can be rendered and culled separately. You can see this if you zoom in and move the camera around. However the loading example doesn't implement this, you're right - it just renders it all. Refer to the editor source code to see how this could be done. (I think I should make the camera in the demo free flight mode and implement this myself, together with a way to change the camera range to see the effect).

A good improvement would however be to allow streaming of arbitrarily large maps and/or to create maps which can be perfectly appended to one another.

About the freezing:
  • Try compiling from the source file once you have the extensions - does it freeze then too?
  • When does it freeze? Right after you start or doesn't it even start? Or when you do something specific? Or at seemingly random times?
  • Make sure you are running this program from a non elevated (non UAC controlled) folder, not e.g. Program Files (x86).
  • Try turning of your AntiVir program it might be blocking some actions.
Let me know

And about the extensions: Yes it does require some extensions, links to them can be found in ReadMeForSourceCode.txt. Maybe it would be a good idea to include a copy of them or at least create my own package of them and give a link to it rather than asking people to download and install the 4 extensions separately?

Edited by Master Xilo, 21 July 2012 - 01:53 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users