Shangri-La : World editor

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Shangri-La : World editor

Post by REDDemon »

This is a powerfull editing tool that allows to create fantasy-like worlds (i started it with in mind a fantasy game, but there is no reason for don't using it also for make worlds for non-fantasy games).

For now the biggest point i'm working on is the procedural processing of textures. I want to make SLE's strongest point the texture handling.

There are lots of alghoritm I am implementing plus some mine variants to standard alghoritms. (various noise, edge detection for merging images without strange effects ecc. cubic resizing ecc)

Making all features I have planned is a huge work but i'm on the road to do it. Actually the editor can load an "arbitrary" number of textures and merge them into tilesets. Then after a tileset is ready there is no problem for use it. Mipmaps are generated automatically and edges are not visibile from long distances.

You have only to choose wich texture you like to use and modify parameters when mergin them.

Actually there are linear, quadratic and sinusoidal interpolators for doing that, plus an adaptive blending that is usefull for example for merging a grass texture wich is not highpassed filtered with a rock textures that is highpass filtered (the grass seems to grow above the rock, note that what i call "adaptive blending" is similiar to edge detection but is not edge detection).

Here is how it works:
Image
This image show a test terrain for see if there are seem between tiles. Now i'm working on edge detection to make this test terrain looking better(those test textures are takem from http://www.texturemaker.com/gallery.php ... n=ISampler , some week ago those were licensed as "free for free use" now i cheked again and the license seem changed, maybe i will update those screen shots)


The gui of the editor has many options, and there are list box in wich i put all the interpolation i need (I estimated that 16 interpolation are needed for different texture types, actually there are only 4 interpolator available).

Before starting creating a tileset (wich requires lot of time)
a preview of merging the textures is showm using standard textures at 256x256 resolution.

Image
aboveyou can see tileset editor wich allow you to choose how merge texture for make tiles. a preview is shown when making tiles because making a tileset of 7 different terrains using textures that are 512x512 can require up to 5 minutes on my PC. This depend on my procedural api that convert all colors in double for reducing quality loss of the image and on the lots of iterations that are required,(infact using only floats value can cause the images to seem "noised"-).

A future feature that i don't know if I will add is OpenCL support (actually i have trouble with drivers) wich can reduce 5 minutes of computing time to few seconds (or less using GPUs).

Future features planning:

World Editor:

Creating zones with different configurations:
-Quad tiles terrain
-Hexagonal tiles terrain
-Simple surfaces (usefull for makin internal places like dungeons)
-Pseudorandom terrain. (for saving space when creating huge terrains you can only specifify few vertices and the missing vertices are generated randomly on the fly)
-Multiple terrain assets ( 4 detail layer and a mixmap. or 3 detail, a mixmap and a colormap ecc)

Portaling:
-Each zone is connected only to nearest zones. You can choose wich zones are visibile from every zone. (also work with landscapes). This will reduce culling needs.(terrains are not the only possible solution)


Procedural textures:
-Procedural generation of clouds, lava, rocks, smoke, wood, light effects,fire.
-Apply filter when importing textures (make them seamless, apply a different color, apply a frequency pass filter)
-Combining textures using edge detection or frequency detection-
-Combining textures using interpolation (as done by most users via shaders with multiple textures, this time every texture layer has multiple terrain types)
-Compatible with old machines: using at max 4 textures (or less, this only need to change few pipeline assets). Or make incredible textures using more than 4 textures (just imagin adding heightmapt to the 4 textures layers using a total of 8 texture layers for a realistic and parallax mapped terrain). (for work well this require to handle different textCoord for every texture layer wich is not supported for now in irrlicht, actually i can use only 2 textures layers wich let me create nice terrains but not as nice as they will be with 4 textures)
-Special Interpolators are needed for example for merge a brick wall with a stone wall ecc (i don't want to see a brick interpolating linearly with a stone)
-light painting (using or lightmaps or just texture painting).


Mesh handling:
-Texture painting on loaded meshes (or genereated meshes): paint using a texture layer on terrains for adding more details, or paint rocks and trees. (moss. ice, lichens, rust)
-Procedural trees (i will just import the code i have seen in a discussion in the forum)
-Procedural items (just the most used, such as stones, mushrooms ecc).
-Procedural waterfall & water(not decided yet if use a shader or a generated mesh with texture animation and transparency on it).
-weight generated trees and grass (grass and trees are merged into 1 or 2 mesh buffers. if i can i will make them move with wind usin the vertex shader for a realistic but gpu-wise world)


The meshes will take the advange of mesh combining of lonesome ducky so drawing a landscape with all its items will require only few scenenodes each with up to 4 texture layers. ( If I can avoid the use of multiple render pass for combining terrains the performance gain will be good).

GUI:
-the gui is structured like a tree. and will fit the screen. I have tested resizing of the tabgroup from 640x480 up to 1366x768.
-Most options are like pipelines. You must only set the options you like and need.
-This work as an a onion. First you decide what to do, than you import textures, than decide how to use them ecc..
-You create a brushset and then paint (paint terrain, but also trees and any imported 3d model).
-customizable brushes.
-Add item by simply selecting and add
-compability warnings when using shaders higher than 1.2 of glsl(or the equivalent for directX)
-compability warning when using any other features that will be not supported on old machines.



Why using tilesets?
1)Multilple terrain types with only 1 texture (more and more with more than 1 texture)
2)the multitexturing used in videogames is not so much nice, textures are simply interpolated. Using image processing to combine at best will make textures look better.
3)this will save memory. Using a 128x128 terrain with every tile of size 256x256 theorically require (or a detail map and a color map wich save lot of memory but is not so nice) a 30000x3000 texture. With a tile set only 2048x2048 textures (or 4096x4096) are needed and they can be used across multiple terrains. Plus mipmaps+ mixmap (a 128x128 image file , or 130x130.. I'm just deciding now about that)

4) using only 1 texture layer with its tileset and a simple interpolation doesn't look very good. But if i start using special interpolators and more than 1 texture layer the aspect of the terrain will start become very nice.

sorry for english :)
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

Good work !

Take a look here :

http://www.filefactory.com/file/b46ge82 ... Editor.rar

is free
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

It does not work sorry.
the executable is broken.(alut.dll missing)

What is supposed to be? i can see 4 tiles and i think your program will merge them. right? (there is a little howto.txt in the download you linked)

Anyway i think it is a lot different from mine. :) i have googled about it without find anything else about your editor so i cannot make any comparison.

If you are suggesting to add more features I will listen you carefully :)

SLWE will be released free for opensource games. and when project is more mature i think i will release it opensource.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

To work, install OpenAL-Install-.exe ;
All the dll s must be in the same place as Clady_ColormapEditor.exe is.
I sent you this link just to inspire you in your work.

Good luck !
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

thanks ^^ but i have already installed openal and tried to put the dll. the executable always crash. ^^

.. Ok i finished the test with 64 terrains. using 64 textures 32x32 i made up a tile set of more than 260000 tiles. it works correctly on 1 texture layer but i'm experitmenting bugs with other materials :( so maybe for now multiple texture layers have to wait some bug fixes. I have other things to do in the meanwhile:).


OK i will definitively switch to mesh buffers with standard S3Dvertex insteado of vertex with 2Tcoords until the bug is fixed for the SMeshBufferLightMaps. the original code work only with "glut". the new version for irrlicht works both on directx and opengl but with only1 layer instead of 4 (or more).

This limit the potential of the editor but is best than nothing :)
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

news

Post by REDDemon »

I have finished the tile system. (so now terrains with 1 texture layer can be rendered, loaded and saved. Every terrain need only a tile set, multiple terrains can have the same tileset).

Tile test 1:
http://img408.imageshack.us/img408/3038 ... editor.jpg

Tile test 2( different camera angle):
http://img254.imageshack.us/img254/3149 ... ditor2.jpg

Random terrain generation test from far:
http://img526.imageshack.us/img526/884/ ... or3far.jpg

Random terrain generation test from middle:
http://img52.imageshack.us/img52/8571/t ... 5middl.jpg

Random terrain generation test from near:
Image
Those seems are caused by the texture itself. probably it is not a tile problem. (if the texture is not correctly highpass filtered, flattened area of different brightness can result in brighter/darker lines). To be sure I wil render a plane with only that grass texture using a not tiled terrain.

Next steps i will implement:

custom node with collision(used for the editor but usefull also in-game)
texture paint (not only terrains but every mesh can be painted)
height paint ( gui implementation using the custom collision)

custom brushes :bind a particular texture to anything you want;
Terrain elevation, terrain tilting, shadows, cast a terrain as transition step between two terrains(for example you can cast sand as transition between river's bed and grass), cast a random seed for selecting height or texture types, differents height raising/decreasing tools.. This will help to improve speed in terrain creation without leaving the task to the user of editing every single point of the terrain.

more than 1 layer.
if the first layer must be a RGB texture the layers above it can be RGBA textures.
For that I need multipass render or shaders (using "fmx" 's idea is great for making that possible with standard irrlicht materials. Thanks a lot fmx :) ).

Actually to create a nice looking terrain there are some steps todo:
1)select 4 or more textures
2)using the texture generator (the code is all ready I just need a gui for that) to combine those textures and making transition textures where needed (creating a brush with terrain transition make it easy). Note that this count as new texture generation and i will put it under "procedural textures", that's why there is no gui for that as for the tileeditor. A texture is not already a tile.
3) make a tileset (that will have more than 64 tiles as the example above, but will works.)
4)paint the terrain

as you can see for now the terrain doesn't look very nice.

finished gui elements:
TileEditor. (easily expandible)
Textureloader.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Post Reply