Jump to content

Complete TerrainEditor & LevelEditor for Babylon.js


Dad72
 Share

Recommended Posts

The Babylon field editor has gone into version 2.0 and is more stable. Many corrections, optimizations and improvements have been made. The interface has also undergone some small modifications with some patches.

What you can do with the TerrainEditor :

  • Create a new terrain with 5 sizes to choose from or load a recording.
  • Rename or copy a loaded terrain or delete one.
  • Create mountains or dig lakes, rivers.
  • Smooth the terrain to soften your mountains or rivers.
  • Raise trays rather than mountains.
  • Paint up to 8 different diffuse textures for maximum terrain customization. (Thanks @Luaacro for the mixMaterial)
  • Create ramps on the highlands or mountains to access your characters.
  • Create holes in the ground to enter the basement, cellar / cellar ...
  • Export the land in babylon format with all the textures used. An example file and html test is exported with.
  • Export file meshes separate added in the terrain.
  • Import and add meshes in the terrain
  • Edit meshes with Inspector of properties
  • Add water areas in the scene
  • Add collision boxs in the terrain
  • Add sound and music areas in the terrain
  • Add portals in the terrain

Each tool can be controlled to have more or less radius of your brush. You can choose the type of brush to have different shapes to paint textures.
The brush is visible by a red allo on the floor following your mouse. Its radius defines what the brush will paint with precision.

For texture paints, you can control the hardness and scale in addition to the radius of the brush. When raising mountains, you can control the maximum height limit of your mountains or the minimum limit if you dig.

A grid allows you to see the sea level and is set to coordinate 0,0,0. This is useful when digging your rivers and lakes.

You can save your work at any time and resume it on another day. When your field seems finished, you can export it for use in any project using the Babylon engine. Just take the hardware code of the export of the html file.

I do not think that a publisher's documentation is necessary, but if you think you need it, leave me a message and I'll do one. But I think the editor is very easy to use.

I hope this comprehensive field editor will help you. Do not hesitate to tell me if you have problems and tell me what you think, the improvements to make ...

The publisher is open-source. You can download it on this repository The editor integrates a mini server to start it:

https://bitbucket.org/JSbabylon/terraineditor/downloads/

Enjoy.

Some screenshots:

terrainEditor.thumb.jpg.55a34095aa887485988d5ee1cc6ec073.jpg

terrainShadow.thumb.jpg.3b87c125775bc876bf30ab8e3da75752.jpg

 

Link to comment
Share on other sites

For those who test, I send a major update that corrects:

- The export of the terrain in the zip (the scene this load correctly now)
- The creation of a new terrain (The two mixMap are generated to obtain a default texture of ground, which makes it possible to paint now on the new terrain.  Before the pitch obtained was white and we could not paint.

Link to comment
Share on other sites

 

Nice work !!

If somebody is having trouble starting the server then below might help

1) "TerrainEditor.exe" shortcut does not work. It points to "D:" drive. 
     Instead of that click "PHPServeur\TerrainEditor.exe"

2) Modify " PHPServeur\home\us_config\us_user.ini" 
    Change
     US_ROOTF_WWW = /TerrainEditor 
    to 
    US_ROOTF_WWW = ../

    You might also want to change  
    AP_PORT = 80  
    to a different port.

 

Link to comment
Share on other sites

COOL!  New stuff from CastorWare, Inc!  :)

Ya know, we little farts who are scared of running servers/DB's... would love to see a version that didn't require a server/DB.  It could save and load .obj and .babylon files... from a local folder.

Textures stored/retrieved in the same way... from local.  That'd be cool.

But, you know me, D72.  93.4% of the time... I'm a lost dreamer... and I forget about the security problems with saving/loading things... and the need for databases.

Link to comment
Share on other sites

TerrainEditor has been written with PHP, so it is necessary to have an Apache server to read PHP code like any other website. The use of PHP allows me to generate files, to copy them, to modify them, to create mixMap images.  Do not be afraid, I have not put any viruses or other bullshit in it.

I do not use a Database here.

You can use the provided mini server apache or just put it all on a normal hosting server.

I really do not see where the problem is. it's like you want to host a website and do not use a server, it's impossible. Even Babylon needs an http server, so a server is also needed.

What is CastorWare?

Link to comment
Share on other sites

Oh and everything is local, babylon files, textures and others. everything is local, but you need an Apache server (http) to read PHP. No BDD.

For the CastorWare, I guess you talk about my old CastorEngine project that was abandoned to be replaced by HeroonEngine. But TerrainEditor is for Babylon and can generate complete terrains for any of your projects. :D

Link to comment
Share on other sites

V 2.1.0

I added the possibility of importing models into terrainEditor and being able to add them in the terrain. A gizmo allows to move them, turn them, resize them.
The goal is to be able to paint and sculpt the terrain with the models on it so that it is not painted at random.

When recording the scenes, two Babylon files are created to separate the terrain from one side and the models from the other (the camera and the lights are not exported. Only the models on the ground are. In your game, create your scenes with your camera, lights, then simply load the terrain to one side and load the meshes file that will fit the terrain.)

I also add the inspector to be able to edit in more detailed ways, your models before recording.

TerrainEditor becomes a small level editor now. :D

Link to comment
Share on other sites

New improvement :

Added 3d models is good, but we could not delete them or clone and instantiate. It is now possible. So I add a context menu for this which will display after a right click on a mesh.

I also separate the code from the terrain editor and the meshes editor. Before everything was in one file and the file was getting long. Now it's clearer.

Enjoy.

Link to comment
Share on other sites

  • 3 weeks later...

V 2.2.0,

Improvement. We can now add:
- Sound/music area defined by the radius of a half sphere.
- Water area and change some options.
- Collision wall : to create invisible barriers if you want to prevent access to a certain place of your scene.
- Portals to go from one scene to another. Portal information is saved in metadata to reuse them in your own game with your own teleportation system. 

Enjoy.

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 9 months later...

Hi, I have just joined this forum,

I am an elderly railway technician and for about a year I have been trying to familiarize myself with babylon to build my virtual railway model

http://libero51.altervista.org/Babylon/FS1950/FS1950.html

The question of tunnels, or holes in the dynamic terrain, has been solved for now with tricks that involve discrete complications of the code and its readability.

http://libero51.altervista.org/Babylon/Video/Video_0.flv

Alternatively I was able to create holes in the dynamic terrain using the property hasVertexAlpha = true, but in this way the depth sorting of the bumps is not done correctly.

https://www.babylonjs-playground.com/#J6FMJ#77

double click on the terrain ....

I was unable to access the vertices of the triangular faces for changes or deletions.

(this text has been translated from Italian)

 

TreTreni_0.jpg

Station1.jpg

E835.jpg

E555 % FS235.jpg

Edited by libero51
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...