Jump to content


Photo
- - - - -

Terrestrial Perfection, 3D Terrain Editor Engine


  • Please log in to reply
61 replies to this topic

#1 loverock125

loverock125

    GMC Member

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

Posted 06 October 2011 - 08:14 PM

  • Title: Terrestrial Perfection
  • Description: 3D Terrain Editor
  • GM Version: :GM81:
  • Registered: Yes
  • File Type: .zip
  • File Size: 59.4 MB
  • File Link: Download Here
  • Required Extensions:
  • Required DLLs: GMZ.dll, Max WinApi.dll
Summary
This is another 3D Terrain Editor engine. Things you can do with it:

  • Paint textures on the terrain. You can easily add new available textures by pasting them in the Textures folder.
  • Change the height of the terrain. You can create mountains or deep holes.
  • A smooth tool which lets you smooth areas of the terrain.
  • Change the size and the intensity of the tool and cycle through circular and rectangular tool for precision.
  • You can change the size of the terrain when creating a new one (small,medium,large,extra large)
  • You can also change the quality of the terrain when creating a new one to choose between performance and quality.
  • You can export the whole terrain texture and even import a new one. This is useful since not only it lets you set any image you find as the texture
    of the terrain but also edit the texture of the terrain in any other image-editing software and then import it back in.
  • Supports heightmaps, you can use any image as a heightmap and change the height of the terrain. An API Panel
    let's you choose the height value when loading the heightmap, invert the heightmap and more. You can even export the terrain's heightmap.
  • API Panels let you customize how you edit the terrain.
  • Has terrain depth which means the edges of the terrain don't make the terrain seem that it was just cut.
  • And of course, save the terrain map in one file as .tpter with an average size of 1.5MB or load an already saved one.
    (You can quick save and quick load with Ctrl+S and Ctrl+L respectively)
  • You can also use 'Open With' on the map files or drag them over the .exe to load them directly.
  • I included an example inside the zip file which shows how to load the maps in your game.
  • You can reduce the value of textureSize (in .ini file) if you want to reduce the size of your saved maps.
  • Enter First-Person-Shooter mode to view the terrain in close-look. Looks much better with high resolution textures.
  • Export a mini-map of the terrain. Useful if you are making a strategy game.
  • Add layers (such as water) at any point on the terrain. (NEW)
  • Build your own layers with the 'Layer Builder.exe' which is included. (NEW)


If you are using this for an RTS then 256x256 textures will do but for types of games that have a closer view such as RPG and FPS you may want to use 512x512 textures. I've included some 512x512 textures that I've found over the web. Just replace the new folder with the old folder (Textures) and don't forget to change the value of textureSize in the .ini file to 512. High resolution textures make the terrain look more realistic but the file size of saved maps increases.
Here is how it looks with 512x512 textures in FPS mode.


Here is a video demonstrating the import of heightmaps and textures as well as the new feature of adding layers. The results are amazing.
http://www.youtube.com/watch?v=ztCZUSz3J9M&lc=hSDL0HCqPHhGtde4uG0sxGCcT30VtxOrplGU0A_ZpPM&feature=inbox

You DO NOT have to credit me if you use this, not even for commercial purposes.  Keep in mind that the textures used as well as the required DLLs are not mine. Also the script for calculating mouse coordinates on a 3D plane is made by 'Yourself'.

If you have any questions please post here :)
I hope people find this helpful

Edited by loverock125, 23 April 2012 - 10:16 PM.

  • 4

#2 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 07 October 2011 - 01:33 PM

Looks great!Can this be used with GM 8.0
  • 0

#3 loverock125

loverock125

    GMC Member

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

Posted 07 October 2011 - 04:56 PM

Looks great!Can this be used with GM 8.0


Thank you for the reply :) I haven't tried but it should work.
  • 0

#4 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 08 October 2011 - 10:37 AM

This is a really good start; however here is some suggestion for future versions
1. be able to control the alpha value for the textures.
2. Better control over the size of the brush, the size can be a problem as it looks like now. Maybe you should add you so you can add a custom value for the size.
3. Drop down menu for the textures, the arrows can be a real pain if you have lots of different textures. (Or maybe an extra window for it)
4. A mountain tool.
5. A road tool, I tried with the flat tool but it didn't work to well.
6. A skybox would be nice.
7. To be able to import custom object to the scene.
8. Add "get_z" script for the example. (Maybe I just couldn't find it)
9. If you add a mountain tool you should add "Random Fallout". Meaning it add random tops within the brush.
10. be able to change the icons and background color.
11. To be able to set a minus value. With other words be able to subtract from the terrain.
Else Good Work.
  • 0

#5 loverock125

loverock125

    GMC Member

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

Posted 08 October 2011 - 01:58 PM

Thank you very much for the reply and the great feedback! I appreciate it :)

1. be able to control the alpha value for the textures.
2. Better control over the size of the brush, the size can be a problem as it looks like now. Maybe you should add you so you can add a custom value for the size.

Do you mean input a number for these two? Because you can change the alpha and the size by sliding the sliders at the bottom left part of the screen.

4. A mountain tool.

What's the difference of a mountain tool with the change height tool I've put?:P

3. Drop down menu for the textures, the arrows can be a real pain if you have lots of different textures. (Or maybe an extra window for it)

This is a great idea, I'm working on it :)


5. A road tool, I tried with the flat tool but it didn't work to well.

Basically a road tool would be the same as a flat tool but you choose at what height to stop, am I right? I thought about this as well if that's what you mean.

6. A skybox would be nice.

I could implement a skybox but some users may want to use their own sky. This is the same reason why I didn't implement a water/lake system as well.

7. To be able to import custom object to the scene.

I'm about to do that, but the custom object wouldn't have any model or interaction with the terrain. Basically you'll be choosing the name of the object, placing it over the
terrain somewhere, and when you load the map in your game create an instance of that object if it exists in your game.

8. Add "get_z" script for the example. (Maybe I just couldn't find it)

It is getTerrainHeight(x,y). :)

9. If you add a mountain tool you should add "Random Fallout". Meaning it add random tops within the brush.


This is a great idea as well : )

10. be able to change the icons and background color.

I'm not entirely sure what you mean with 'icons' but in the next version you'll be able to change the background color.

11. To be able to set a minus value. With other words be able to subtract from the terrain.

You can do that by holding the right mouse button instead of the left one. And when loading heightmaps you have the option to invert the heightmap.


This was one of the best feedback list I've ever received : D
Thank you eafg2 :)
  • 0

#6 eafg2

eafg2

    GMC Member

  • GMC Member
  • 166 posts

Posted 08 October 2011 - 03:47 PM

http://imageshack.us/f/208/helpgm.png/
http://imageshack.us/f/11/helpgm2.png/
Check these two pictures for deeper explanation of my feedback.
  • 0

#7 loverock125

loverock125

    GMC Member

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

Posted 08 October 2011 - 04:01 PM

http://imageshack.us/f/208/helpgm.png/
http://imageshack.us/f/11/helpgm2.png/
Check these two pictures for deeper explanation of my feedback.



I understand the mountain tool, be sure I'll include it in the next version :)
However I can't see why someone would want to change the icons ;p

And I don't understand why your tool is so big, take a look at mine, this is the smaller it can get:
(Yes it's so small you actually can't notice it : D)
Posted Image

Thanks again : )
  • 0

#8 DuncanBell

DuncanBell

    GMC Member

  • GMC Member
  • 159 posts

Posted 10 October 2011 - 02:40 PM

Great work!

My only gripe is the fact that the brush tool doesnt seem to be changing size correctly on my PC (windows 7).
Perhaps you could put in an option to change the intensity and brush size numerically? Or even have a shortcut to increment it a set amount, like Photoshop?
  • 0

#9 loverock125

loverock125

    GMC Member

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

Posted 10 October 2011 - 07:35 PM

Great work!

My only gripe is the fact that the brush tool doesnt seem to be changing size correctly on my PC (windows 7).
Perhaps you could put in an option to change the intensity and brush size numerically? Or even have a shortcut to increment it a set amount, like Photoshop?


Thank you for the reply DuncanBell!

I'm trying to fix it right now but I'm not sure what the problem is, it works on my PC. Can I ask what your screen resolution is please?
  • 0

#10 jhett6

jhett6

    GMC Member

  • New Member
  • 54 posts

Posted 11 October 2011 - 12:28 AM

does it export as a height map???? if not please add that in!!!!
  • 0
Please Try My New Beta Game!!!]Posted Image

#11 DuncanBell

DuncanBell

    GMC Member

  • GMC Member
  • 159 posts

Posted 11 October 2011 - 09:27 AM

I'm trying to fix it right now but I'm not sure what the problem is, it works on my PC. Can I ask what your screen resolution is please?


I am running it at 1920x1200
  • 0

#12 loverock125

loverock125

    GMC Member

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

Posted 11 October 2011 - 06:06 PM

does it export as a height map???? if not please add that in!!!!


Never thought someone would need to export as a height map but I'll upload a new version that includes that. Thank you for the feedback : )


I'm trying to fix it right now but I'm not sure what the problem is, it works on my PC. Can I ask what your screen resolution is please?


I am running it at 1920x1200


Thank you for the information, this could be the problem and I should be able to fix it now. : )
  • 0

#13 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 11 October 2011 - 07:46 PM

you need a smooth tool
  • 0

#14 Schyler

Schyler

    Noskcirderf Derf

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

Posted 11 October 2011 - 09:29 PM

No credit to Master Xilo? You seem to be using his editor interface.. (?)
  • 0

#15 loverock125

loverock125

    GMC Member

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

Posted 11 October 2011 - 09:43 PM

you need a smooth tool


I'm currently working on this one too. Thank you for the feedback : )

No credit to Master Xilo? You seem to be using his editor interface.. (?)



I didn't copy anything so that means I shouldn't be giving credit, does it?

It's only the idea of the interface. I just had in my mind those sliders.

Edited by loverock125, 11 October 2011 - 09:55 PM.

  • 0

#16 loverock125

loverock125

    GMC Member

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

Posted 12 October 2011 - 04:50 PM

Removed the sliders and added an API Panel for the tool preferences. This should fix the problem that some people seemed to be having and also included an option to input your own values for the size and the intensity of the tool. Additionally since this is an API Panel you are able to drag it anywhere you want.

Furthermore I added the ability to export the heightmap of the terrain. Note that if you export the heightmap and then import it right after there's a big chance that the heights won't be the same. This is because it doesn't save the height values (you should save the terrain for that). When importing your own heightmap you should consider what height value you should input if you want it to have the same heights as when you exported it.

Currently working on a smooth tool.

Edited by loverock125, 12 October 2011 - 10:19 PM.

  • 0

#17 loverock125

loverock125

    GMC Member

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

Posted 13 October 2011 - 01:18 PM

Added a smooth tool and the ability to enter FPS mode for closer looks.

Any other feedback would be appreciated, I really need to make this tool better.

Thanks again
  • 0

#18 doggyman

doggyman

    GMC Member

  • GMC Member
  • 101 posts
  • Version:Unknown

Posted 16 October 2011 - 02:42 PM

Hello

I begon to use this tool today. I made a map, and I want to save it, but I receive this message error
ERROR in
action number 2
of Draw Event
for object oController:

Trying to use non-existing surface.

How do I fix that?
thanks to answer^^
see ya ;)
  • 0
woof?

#19 loverock125

loverock125

    GMC Member

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

Posted 16 October 2011 - 08:31 PM

Hello

I begon to use this tool today. I made a map, and I want to save it, but I receive this message error
ERROR in
action number 2
of Draw Event
for object oController:

Trying to use non-existing surface.

How do I fix that?
thanks to answer^^
see ya ;)



It shouldn't be a problem with the file since I'm not getting this error nor anyone else.

I'm not entirely sure what could cause this problem but may I ask how much ram does your pc have?
  • 0

#20 doggyman

doggyman

    GMC Member

  • GMC Member
  • 101 posts
  • Version:Unknown

Posted 17 October 2011 - 12:25 AM

1.99 gb of ram
  • 0
woof?

#21 icuurd12b42

icuurd12b42

    Self Formed Sentient

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

Posted 17 October 2011 - 02:21 AM

It shouldn't be a problem with the file since I'm not getting this error nor anyone else.

I'm not entirely sure what could cause this problem but may I ask how much ram does your pc have?


If you are not checking the validity of the surface every time you use it and don't recreate it when it goes bad on you, you will get the error. Alt Tab out of the game for example... Or stay idle until the screen saver pops up.

//before using it
if(!exists(surf)) //first time or lost it
{
surf = create_surface(512,512) //create/re-create it
if(!exists(surf)) //really fail (not supported or too large)
{
Message "I cant do it anymore"
game_end();
exit;
}
}

use it
  • 1

#22 loverock125

loverock125

    GMC Member

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

Posted 17 October 2011 - 01:45 PM



It shouldn't be a problem with the file since I'm not getting this error nor anyone else.

I'm not entirely sure what could cause this problem but may I ask how much ram does your pc have?


If you are not checking the validity of the surface every time you use it and don't recreate it when it goes bad on you, you will get the error. Alt Tab out of the game for example... Or stay idle until the screen saver pops up.

//before using it
if(!exists(surf)) //first time or lost it
{
surf = create_surface(512,512) //create/re-create it
if(!exists(surf)) //really fail (not supported or too large)
{
Message "I cant do it anymore"
game_end();
exit;
}
}

use it



I see where the problem is. Thank you for pointing it out.

I'll fix it immediately.
  • 0

#23 loverock125

loverock125

    GMC Member

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

Posted 17 October 2011 - 05:55 PM

Hello

I begon to use this tool today. I made a map, and I want to save it, but I receive this message error
ERROR in
action number 2
of Draw Event
for object oController:

Trying to use non-existing surface.

How do I fix that?
thanks to answer^^
see ya ;)



Are you still getting that error or was it the usual Screen Saver error?

I uploaded another version of the Terrestrial Perfection.exe which saves the surfaces to sprites and every time they don't exist when they should they are re-created using the sprite.
This reduces performance when drawing on the terrain (because it saves the sprite) and it may also increase loading time.

Here is the new version. (It's only the exe, just replace it with the original exe)
Could you confirm that this version works? (If you are still getting that error)

Thank you
  • 0

#24 loverock125

loverock125

    GMC Member

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

Posted 19 October 2011 - 10:19 PM

New Version:

  • Fixed a bug that was causing buttons to be pressed even if they weren't (only released)
  • Added the ability to export a mini-map of your terrain. This is very useful if you are making an RTS game.

Edited by loverock125, 19 October 2011 - 10:19 PM.

  • 0

#25 jhett6

jhett6

    GMC Member

  • New Member
  • 54 posts

Posted 31 October 2011 - 11:54 PM

Heyy.... I have even more feedback for you.... i've been noticing errors occuring often when I use the load or export tools. I am forced to abort and lose all my work.... See what you can do on that.... and, also see if you can make an obj export option thx!!! PM me when You release the next version!!!
  • 0
Please Try My New Beta Game!!!]Posted Image

#26 loverock125

loverock125

    GMC Member

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

Posted 01 November 2011 - 12:12 AM

Heyy.... I have even more feedback for you.... i've been noticing errors occuring often when I use the load or export tools. I am forced to abort and lose all my work.... See what you can do on that.... and, also see if you can make an obj export option thx!!! PM me when You release the next version!!!


I've tried it countless times and I don't get any error. Do you mind posting what error you are getting? That would really help me find the problem. I'm sorry for the lost of your work.
What do you mean obj export option? Export the terrain as an .obj model?
  • 0

#27 jhett6

jhett6

    GMC Member

  • New Member
  • 54 posts

Posted 01 November 2011 - 10:50 PM

yes, I do mean save as obj model file. You should also a add a quality option to the obj export so it can have high polys or very low, or in between.

here is the error I got when trying to export the texture map (this error happened on other exports and imports too):

___________________________________________
ERROR in
action number 2
of Draw Event
for object oController:

Trying to use non-existing surface.
  • 0
Please Try My New Beta Game!!!]Posted Image

#28 loverock125

loverock125

    GMC Member

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

Posted 01 November 2011 - 10:52 PM

yes, I do mean save as obj model file. You should also a add a quality option to the obj export so it can have high polys or very low, or in between.

here is the error I got when trying to export the texture map (this error happened on other exports and imports too):

___________________________________________
ERROR in
action number 2
of Draw Event
for object oController:

Trying to use non-existing surface.


You can set the graphic detail when creating a new map. Ah this error only occurs in some computers, I created a new version a week ago for another person which was supporting all of them but I don't have it right now, I will re-create it and update the main post. Thanks for pointing it out.
  • 1

#29 borut

borut

    Courage Wolf Productions

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

Posted 09 November 2011 - 07:50 AM

looks great, is there an include script to import terrain in your game?
  • 0

#30 loverock125

loverock125

    GMC Member

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

Posted 09 November 2011 - 12:48 PM

looks great, is there an include script to import terrain in your game?



There's an example in the zip file that shows how to import the terrain in your game, along with some useful scripts like the one that returns the z position of the terrain at a certain x,y position. Thank you for the reply : )



Edit: New version, fixed minor bugs.

Edited by loverock125, 09 November 2011 - 01:39 PM.

  • 0

#31 willpoweredgames

willpoweredgames

    GMC Member

  • New Member
  • 10 posts

Posted 16 November 2011 - 11:36 PM

this program is amazing! i can't imagine the pages of code that you must have had to put into it!
do you think you could ever export these maps into an fps? it would be really cool if ppl could have this much control over their maps when they're customizing them
  • 0

#32 loverock125

loverock125

    GMC Member

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

Posted 16 November 2011 - 11:44 PM

this program is amazing! i can't imagine the pages of code that you must have had to put into it!
do you think you could ever export these maps into an fps? it would be really cool if ppl could have this much control over their maps when they're customizing them



Thank you very much for your reply and for the nice comments : )
I can't see why someone couldn't use this for an FPS game. It can pretty much be used for any type of 3D games. What I recommend
though when using it for FPS games is to use high resolution textures like 512x512, instead of the one used in this example which
are 256x256. That wouldn't affect the performance in the game, the only thing it would affect is the size of the exported maps.

By the way I can swear it was working perfectly before but I just re-downloaded and noticed a bug with the intensity and tool size sliders,
is my pc playing with me or are you getting those bugs as well?



Edit: Fixed bugs and re-uploaded

Edited by loverock125, 17 November 2011 - 12:07 AM.

  • 0

#33 Naterocks1

Naterocks1

    GMC Member

  • New Member
  • 10 posts
  • Version:GM8

Posted 11 December 2011 - 01:33 AM

Hey. I love using this to make my terrain with it and all that. The only (ONLY) part i don't like about it is that the heightmaps that it saves are a little inaccurate. I was just thinking of a .obj or .d3d save tool so I could load it in externially. Also a water tool would be nice.
  • 0

#34 loverock125

loverock125

    GMC Member

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

Posted 11 December 2011 - 01:35 AM

Hey. I love using this to make my terrain with it and all that. The only (ONLY) part i don't like about it is that the heightmaps that it saves are a little inaccurate. I was just thinking of a .obj or .d3d save tool so I could load it in externially. Also a water tool would be nice.


I'm working on a newer version which includes a water tool. Thank you for the feedback, I will put an option to save it as .d3d or .obj.

Thanks again :)

Edit: How is the heightmap inaccurate? I will try to fix it if you let me know. Thanks again!

Edited by loverock125, 11 December 2011 - 01:38 AM.

  • 0

#35 Naterocks1

Naterocks1

    GMC Member

  • New Member
  • 10 posts
  • Version:GM8

Posted 11 December 2011 - 08:03 PM

Actually, now that I'm thinking about it, I might just be setting the depth of the terrain a little off in my game. That would also be cool if you could make it tell us what the depth is so I could make it more accurate for myself. Thanks. When will the next update be?
  • 0

#36 slayer 64

slayer 64

    Slayer of gingers

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

Posted 11 December 2011 - 11:55 PM

i haven't played any games that use heightmaps
  • 0

5y5rs3d.pngfg0UQNL.png


#37 loverock125

loverock125

    GMC Member

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

Posted 12 December 2011 - 07:23 PM

Actually, now that I'm thinking about it, I might just be setting the depth of the terrain a little off in my game. That would also be cool if you could make it tell us what the depth is so I could make it more accurate for myself. Thanks. When will the next update be?


The depth of the terrain is 50. It is drawn in the draw event of the oTerrain object. I'm not sure when the next update will be as I've just finished my courseworks, I'll do my best : )
Thanks for the post!

i haven't played any games that use heightmaps


I do believe that most games don't use heightmaps but we can never know for sure, can we?:P

It's just a way of creating a terrain very fast and can allow some great effects like for example making the terrain look like a photo. It can actually look like a 3D image if you load a heightmap of an image, and then load the texture of the same image. It does produce some really nice effects when you try it for example with a top-down moon image.

Also if you take a picture of a ground it would look very realistic. Since when you convert the photo to a black-n-white image, the rocks will appear whiter than the ground itself. As a result, the rocks would create mountains thus making it look exactly like the picture.

Edited by loverock125, 12 December 2011 - 07:29 PM.

  • 0

#38 Naterocks1

Naterocks1

    GMC Member

  • New Member
  • 10 posts
  • Version:GM8

Posted 12 December 2011 - 09:22 PM

Okay. That didn't really answer my question on what to put. I think I was looking for the terrain height. Do you know how i could get you my game file so you could have a look at it? Thanks:)
  • 0

#39 loverock125

loverock125

    GMC Member

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

Posted 12 December 2011 - 09:23 PM

Okay. That didn't really answer my question on what to put. I think I was looking for the terrain height. Do you know how i could get you my game file so you could have a look at it? Thanks:)


You can get the terrain height at a certain position using the script getTerrainHeight(x,y).

I'm not sure what you are trying to achieve though.
  • 0

#40 Naterocks1

Naterocks1

    GMC Member

  • New Member
  • 10 posts
  • Version:GM8

Posted 12 December 2011 - 10:11 PM

The scripts I am using are terrain_create, terrain_draw, and terrain_get_z. Here they are

terrain_create

//THE TERRAIN SHOULD HAVE THE HIGHEST DEPTH (10000 etc. - it gets set to -1 after initing this though)
//loads the terrain from a heightmap sprite - it does not matter what the size of the sprite is ( 32x32, 64x64 or 128x128 is recommended)
//argument0 = sprite
//argument1 = the size of the terrain squares
//argument2 = terrain height (Argument1 or 2 is my concern on what to put to make the terrain look right.)


global.swidth=sprite_get_width(argument0);
global.sheight=sprite_get_height(argument0);
global.terrainsize = argument1;
global.terraingrid=ds_grid_create(global.swidth,global.sheight);
global.terrainmodel=d3d_model_create();
draw_sprite_stretched(argument0,0,0,0,global.swidth+2,global.sheight+2)
for(w=0;w<global.swidth+2;w+=1){
for(h=0;h<global.sheight+2;h+=1){
val=draw_getpixel(w,h)
valex=color_get_value(val)
ds_grid_set(global.terraingrid,w,h,valex/240*argument2)
}
}
for(xx=0;xx<global.swidth-1;xx+=1){
d3d_model_primitive_begin(global.terrainmodel,pr_trianglestrip);
adraw=true;
for (yy=0;yy<global.sheight;yy+=1){
adraw = !adraw;
z2=ds_grid_get(global.terraingrid,yy,xx+1);
d3d_model_vertex_normal_texture(global.terrainmodel,yy*global.terrainsize,(xx+1)*global.terrainsize,z2,0,0,1,adraw,1);
z1=ds_grid_get(global.terraingrid,yy,xx);
d3d_model_vertex_normal_texture(global.terrainmodel,yy*global.terrainsize,xx*global.terrainsize,z1,0,0,1,adraw,0);
}
d3d_model_primitive_end(global.terrainmodel);
}
depth=-1;


terrain_draw

//argument0 = terrain texture (draws the floor)
d3d_set_culling(1);
d3d_model_draw(global.terrainmodel,0,0,0,background_get_texture(argument0))
d3d_set_culling(0);


terrain_get_z

//returns the height a a position
//argument0 = the x position to return the height at
//argument1 = the y position to return the height at (I think this one makes you guy go up and down with the terrain or something)

gx=floor(argument0/global.terrainsize);
gy=floor(argument1/global.terrainsize);
ox = argument0-global.terrainsize*gx;
oy = argument1-global.terrainsize*gy;
z1=ds_grid_get(global.terraingrid,gx,gy);
z2=ds_grid_get(global.terraingrid,gx+1,gy);
z3=ds_grid_get(global.terraingrid,gx+1,gy+1);
z4=ds_grid_get(global.terraingrid,gx,gy+1);
if(ox>oy){
mz=z1-ox*(z1-z2)/global.terrainsize-oy*(z2-z3)/global.terrainsize;
}
else{
mz=z1-ox*(z4-z3)/global.terrainsize-oy*(z1-z4)/global.terrainsize;
}
return mz+3

These are the scripts that i use. I got them from The Sivart on youtube.
  • 0

#41 loverock125

loverock125

    GMC Member

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

Posted 12 December 2011 - 10:26 PM

Ehh, those scripts are not part of this tool. I think you are posting in the wrong topic.

Edited by loverock125, 12 December 2011 - 10:27 PM.

  • 0

#42 Naterocks1

Naterocks1

    GMC Member

  • New Member
  • 10 posts
  • Version:GM8

Posted 12 December 2011 - 10:47 PM

Okay just forget it. I'll just play around with the codes. Also I know this might be alot to ask but could you add a feature to load models into the terrain? Reason being is so I can make the terrain the right size for my game. Thank you:)
  • 0

#43 loverock125

loverock125

    GMC Member

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

Posted 12 December 2011 - 10:50 PM

Okay just forget it. I'll just play around with the codes. Also I know this might be alot to ask but could you add a feature to load models into the terrain? Reason being is so I can make the terrain the right size for my game. Thank you:)


No seriously, those scripts are not of this tool : D

Yes I could add the feature to load models but they wouldn't be saved.
  • 0

#44 Naterocks1

Naterocks1

    GMC Member

  • New Member
  • 10 posts
  • Version:GM8

Posted 13 December 2011 - 12:25 AM

It would be okay if the models weren't saved. I'm just saying that I could make sure the terrain is the right size if you did that.

Oh, that code is just a heightmap loading script and it does work. I can also go up and down with the terrain with that code. I know it's not part of "THIS TOOL". :)

Edited by Naterocks1, 13 December 2011 - 12:27 AM.

  • 0

#45 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 394 posts
  • Version:GM8

Posted 28 December 2011 - 12:58 AM

Hello! I just came across this when browsing the 3D Tools (for deciding whether to put the GMTE 2 there). I would very much have liked to hear of this earlier.
I really like what I'm seeing.

It's funny how we developed GMTE into quite similar directions independently of each other!:
  • We both use a compressed file format for the maps (just a renamed zip) containing the height information and texture. And we even both use GMZ to create the file (though I use the gex wrapper). (As for the compression: You might have noticed that the compression doesn't help too much since PNG is already inherently compressed, but it still helps to pack these files together.)
  • We both have smooth and flatten tools - I decided to use that sprite included with GMTE 1 ("spr_flat", not used there, I already made this for the original 3d RTS Editor) you use for the flatten tool for the smooth tool and made a new sprite for the flatten tool.
  • We both store textures externally in a folder called "Textures". And we both still use the arrows to switch textures although we know a selection menu is very much needed.
  • People seem to want heightmap and .obj support (I got the same feedback), I'm working on adding that on request too...

    How is the heightmap inaccurate? I will try to fix it if you let me know.

    Well that's obvious: A greyscale heightmap has only 256 height levels (8 bit), while floating point numbers are 32 bits.
  • We both know there are much more sculpting tools that should be added, most prominently a road/ramp tool.
  • We both still need an undo function.

Here's some more feedback

  • Why does the lower right corner only say "Terrain Quality: ..."? You could have more information there like terrain size and mouse xyz position + FPS (so people will know how good this terrain will perform in a game).
  • I really like the heightmap and texture & minimap import/export.
  • I don't see the need for the FPS terrain walking mode. There should rather be a free flight mode for the camera (which still allows editing) - that's what I'm planning to add.
  • You should add a secondary texture that is painted when you hold the right mouse button.
  • The windowed mode that can (still) be toggled with F4 is useless as the window is too big to see the title bar to move it. You should disable that.
  • I don't like this "terrain depth" (the fixed height vertices) at the edges of the map. Looks uglier to me than a simple cut. Nicest IMO is what the Age of Mythology editor does - a texture that shows layers of dirt that repeat. I did this in the Game Maker 3D RTS engine, check it out. (Although this would be visually pleasing, it is not worth the performance drop... this program is to create terrains, not look at them).
  • Why does the smoothing tool not take into account the shape of the brush? - It always smooths a rectangular area and has no falloff whatsoever...
  • The flat(ten) tool is not very useful as all it does is move the vertices to height 0. It should instead create a plateau at the height the user started clicking - check out the implementation in GMTE 2.
  • Why would you put a password ("tppass") (that the user can't change) on the map zip files?
  • I really like the progress bars. They are really needed since it does indeed take some time to load/create maps. GMTE 2 is still missing these...
  • I really like the real WinApi style Interface, but there seems to be too much unused space, e.g. in the new map window.
  • It failed to save an XLarge Map at quality Excellent. I have 4 GB RAM and ~800 MB of GPU Ram so that shouldn't be the problem, especially since I can view and edit the map just fine...
  • Why would you not allow to edit all parameters of the terrain freely when creating a new one? - you just have like 4 * 4 presets.
  • The current texture should always be visible (not only when the paint tool is selected) as it's crucial to know this when using the paint bucket.
  • You should include a ReadMe file - who made this and when? What about licensing (how can I use the stuff I produce)? Where can I get help? How does it work? What is the file format? What are the credits? What are the controls (SPACE for turning the camera is not straightforward) - Questions like these should be answered in the ReadMe.
  • Why would you not give out the source code for the editor? The loading sample contains the model creation code anyways so there's not much left except the texturing code. It's not like you could sell this (and you also don't seem to want to), especially not with the same ripped Age of Mythology textures that I used. So what's the point of keeping this code a secret?

  • No credit to Master Xilo? You seem to be using his editor interface.. (?)


    I didn't copy anything so that means I shouldn't be giving credit, does it?

    It's only the idea of the interface. I just had in my mind those sliders.

    That's simply not true and you know it.
  • You are still using the two-directional-lights approach for ambient lighting:
    d3d_light_define_direction(1,-1,-1,-2, c_white);
    d3d_light_enable(1, true);
    
    d3d_light_define_direction(2,1,1,0, c_gray);
    d3d_light_enable(2, true);
    (from d3d_init from the Example.gm81, but I can see this being used in the editor too).

    This was needed with Game Maker versions prior to 8(.1 ?) as there was no ambient light color (but plain black). To gain performance, you should remove the grey light as it's not needed anymore.
  • You are still using the terrainRay(Intersect) script with too much accuracy and without temporal coherence. I found out that this caused the greatest performance impact in GMTE 1 and optimized it. Now the brush takes some time to move from one depth to another, but I get much higher framerates in idle (400+).
  • Even when the window is not in focus, the program asks whether to shut down when I hit the ESC key.

I guess that's pretty much all I can think of. I'd like to know what you think of my feedback.

Maybe we could work together on further extending GMTE (though collaboration is a real PITA with GM...).
Anyways, keep up the good work.

Regards,
Paul

Edited by Master Xilo, 28 December 2011 - 01:52 AM.

  • 0

#46 whyundead3

whyundead3

    GMC Member

  • New Member
  • 4 posts
  • Version:GM8

Posted 10 January 2012 - 11:13 PM


Looks great!Can this be used with GM 8.0


Thank you for the reply :) I haven't tried but it should work.

It might be just me but when I try to play the Example it says:
___________________________________________
ERROR in
action number 1
of Create Event
for object oMapLoader:

Trying to use non-existing surface.
  • 0

#47 Zesterer

Zesterer

    Professor of Articul

  • GMC Member
  • 1043 posts
  • Version:GM8

Posted 13 February 2012 - 08:56 AM

Could you make a tool to export it as a ds_grid data structure string? It would be very large, but helpful!
  • 0

Fortified - The sword thrusting, castle busting, catapult adjusting new Tower Defense game!

More projects and work coming soon... If you need help on voxels, mesh rendering, physics, perlin noise generation, 3D, mathematics or more just contact me and I'll be happy to help!

Skype: zesterer                Email: barry.of.smith@gmail.com <---- Actually, don't use this address, I never check it.


#48 Pigdug Gaming

Pigdug Gaming

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 03 April 2012 - 07:24 PM

ERROR in
action number 2
of Draw Event
for object oController:

Trying to use non-existing surface.

Please help!!! This program looks sweet.

It usualy happens when i load and save a terrain
  • 0

#49 Pigdug Gaming

Pigdug Gaming

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 03 April 2012 - 09:39 PM

That error only happens when i do large and extra large maps. Hope that piece of info will help :P
  • 0

#50 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 394 posts
  • Version:GM8

Posted 04 April 2012 - 12:25 PM

It means your computer ran out of (video) memory. There's nothing you can do except reduce the resolution.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users