Jump to content


Photo

Gmmodelterrain


  • Please log in to reply
13 replies to this topic

#1 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 21 January 2009 - 11:18 AM

GMModelTerrain

Last Update Jan 23 2009 (V2 is out!)
sandbox.yoyogames.com/games/67971 GM7.gif 4 MB
Download at bottom right, as usual.

YouTube video


Description

This terrain modeller allows you to quickly create and use terrain files in your games. Everything is included. It is dedicates to terrain ONLY and height map ONLY, no trees, no clowds, just terrain height map, models and textures


The modeller
  • Allows to create a map made of tiles which eventually will be save as GM d3d models.
  • Using a pen type system, you can make your terrain using the supplied morph pens or you can add your own to the pen folder
  • Allows painting your textures right in the modeler, using the same pens
  • Allows painting your textures using an external image editor
  • Saves as a single file (using GMBinFile.dll, not required in your game) (Fast Load)
  • Export to a GM natively supportable multi file system (Fast Load)
  • 100 Undo/Redo
  • Edit and paint in both fly mode and walk mode
  • 2 terrain model supported; 2 triangle or a finer 4 triangle cell system
  • Terrain smoothing (Entire terrain)
  • Models are Light Maped Generated (simple cross product)
  • GMMModelEx.dll Now Used for perfect light mapping (Not required in your game)
  • Smooth terrain using pen
  • Shows the drawing pen in texture draw mode
  • Sample terrain file (test.gmmt) included. Took me 5 minutes to make
  • Comes with engine (merge file) for your game
The Engine
  • Supports quickly loading the height map, the models and the textures using GM's native file system and multiple files
  • Supports loading the height map, models and textures from a single file, the original Modeler File, using gmBinFile.dll (Not required by your game if you use the GM native format)
  • Scripts to load the map, create the tiles, the models and the textures
  • Scripts to calculate the height map smoothly and even provide the cross product of the triangle you are standing on so you can glide down off the mointain if the slope it too steep
  • Sample terrain tile object to manage the drawing (optimisation excluded)
  • Sample and simple object that walks arround to help you understand the various loading and movement methods
  • Sample balls that glide and bounce on the map
  • Everything is kept simple so not to confuse you with a ton of optimisation and hidden functionality...
Version Specific Information
Version 2
Version 2 Patch See Edit
Version 2.2
Version 2.3


Example use

On room start
init_hm();
var f;
f = ""
read_map_binfile(get_open_filename("GMModelTerrain Files (*.gmmt)|*.gmmt", f));
//read_map(get_open_filename("Heightmap Files (*.hm)|*.hm", f));

in step event
var testz;
testz = get_z(x,y,100000,-1)
if(testz !=65656565)
{
//simple set
z = testz+5;
}

The rest is up to you, the movement, the camera system, the individual 3d objects, that is all left to you. I kept it simple on purpose to have as little clutter as possible between your game, the files and the engines. Optimisation (draw when not in view) is up to you as well. I did not want to conflict with whatever method you may be using.


Have fun!

Screen Shots
screenshot100.jpg

screenshot101.jpg


Todo/Suggestions

Edited by icuurd12b42, 26 November 2013 - 01:37 PM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#2 ash47

ash47

    O_o

  • GMC Member
  • 1347 posts

Posted 21 January 2009 - 11:25 AM

FIRST POST!!!

Looks good, i'll try it...
  • 0
Posted Image

Rate this topic: 0 | 1 | 2 | 3 | 4 | 5

PRESS IT
\/


#3 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 23 January 2009 - 05:42 AM

looks nice, I like the undo ^_^ , keep up the good work! Looks like this has potential!
  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 23 January 2009 - 09:19 AM

looks nice, I like the undo ^_^ , keep up the good work! Looks like this has potential!

Thanks brett



Version 2 is out!

Added GMModelEx.dll to nicely light map the model
  • Fixed a few bugs
  • Added a move tool (hold C)
  • Improved the hide model not in view
  • Fixed the drawing on texture when transiting from one tile to the other
  • Added pen preview while drawing on texture...
  • Added smooth using mouse, draw to smooth with preview.
  • Added random pen

The test engines have been merged into a single file... If you don't want to use the binary file load, just don't call that function.
  • Added lighting to the test engine
  • Added moving balls you can drop in the world with the left or right mouse
  • Added a few support function to deal with vectors

Changes you should know
  • The file now holds the x,y,z min max that you can use to decide not to draw the tile...
  • The modeller can load old files and will save them with the newer version, the old engines will not load the new file. The new engine will not load the old files. So either remerge or copy the load scripts.
  • The Undo, if you undo to an old undo file made in version 1 will not be able to load the old undo file


[edit]
I found a nasty little bug that made GM d3d models file size expand every time you would use the light map. The bug was in the gmmodelex.dll, not writing the right number of lines, combined with GM reading the temp file and then adding blank/zeroed value lines... So a file would jump from 2MB to 20MB...

Edited by icuurd12b42, 23 January 2009 - 11:29 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#5 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 24 January 2009 - 08:02 AM

I made a video to show how to use it. My First Vid!!!

YouTube video

Edited by icuurd12b42, 24 January 2009 - 08:05 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#6 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 24 January 2009 - 08:10 AM

wish I could watch it... I got a bad internet connection though so I wouldn't be able to.
  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#7 hotshotscott

hotshotscott

    GMC Member

  • New Member
  • 3483 posts

Posted 24 January 2009 - 08:40 AM

You truly are a GM legend iccurd! All of your tools/applications are extremely helpful and professionally polished off. I really wish you would make a big game, it would be one of the best GM games!

Scotty
  • 0

TEAM ODDBOX

Did I try your game or help you out with yours?? Please return the favour and try out my game! NOT just another Halo Clone!!

Posted Image


#8 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 24 January 2009 - 12:44 PM

You truly are a GM legend iccurd! All of your tools/applications are extremely helpful and professionally polished off. I really wish you would make a big game, it would be one of the best GM games!

Scotty

All these tools are leading up to the big one, that's for sure... This map editor was inspired by these map editors
http://gmc.yoyogames...opic=394711&hl=
http://liquidlight.e...uni.cc/news.php

And a few others on the GMC and a 3d game we are making using GMBullet.

Since I can load a gm d3d model in bullet using a few lines of code, I needed a modeler that stored model files for terrains... The provided height map engine here is pretty simple in comparison and I quickly put it together so you guys can use the modeler. The need for the game pushed me towards making a terrain editor. This public version is a side project I think people will find easy to use.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#9 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 25 January 2009 - 06:25 AM

Version 2.2 is out.

Fixes memory Leak and Right Click Color fetch.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#10 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 05 February 2009 - 04:40 AM

UPDATE 2.3:
Uses the fixed gmmodelex.dll.
Fixed the moving while in external texture edit

Edited by icuurd12b42, 05 February 2009 - 04:40 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#11 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 17 January 2011 - 08:03 PM

WHOA MAN!!!! YOU BLEW ME UP!!!

It's soooo awesome, I'll give you credit because I'll use it to make a realistic scenario for my 3D game!

I LOOOOVE YOU!!! WEEE!!! :D:D:D

Btw you should put the commands in the first post like:

-CTRL-C for moving the camera
-CTRL-Z for getting closer
-CTRL-X for getting away
-Left mouse button for rising terrain up
-Right mouse button for lowering the terrain
-WASD for moving the camera up,right,down and left
-Q for making the camera turn right
-E for making the camera turn left
-etc...

That would really help :)

Edited by GPro, 17 January 2011 - 08:03 PM.

  • 0
Gun Powder Games leader

Join our crew here!

Top Down A.I. Example | RPG Combat System | Level Up System | Shield Example


#12 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 17 January 2011 - 10:27 PM

Pretty sure if you hit F1 you get all this information.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#13 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 18 January 2011 - 05:58 PM

Pretty sure if you hit F1 you get all this information.


Yeah but there are people that may not know F1 thing or they are too lazy to press the F1 button like me.

Anyways i love it :)
  • 0
Gun Powder Games leader

Join our crew here!

Top Down A.I. Example | RPG Combat System | Level Up System | Shield Example


#14 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 18 January 2011 - 06:29 PM

Pretty sure if you hit F1 you get all this information.


Yeah but there are people that may not know F1 thing or they are too lazy to press the F1 button like me.

Anyways i love it :)


Now you know ;). F1 is standard in GM games and programs. It's a neat feature. Glad Mark put it in.

Glad you love the program
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button