Realm editor

Realm editor

Postby ErtyHackward » Wed Feb 20, 2013 7:41 am

Realm editor is an app that allows you to customize the game by modifying the realm files. You can find it in the game folder. Ususally at C:\Program Files\Utopia Realms\Utopia.Editor.exe
Realm file contains all world parameters (world generator type, possible entities, start set, crafting recipes).

First of all open the realm file you want to change.
editor_1.png
editor_1.png (13.36 KiB) Viewed 4526 times


On the left side of the app you will see a tree (realm explorer).
Each node represents an important part of configuration.

General section contains info about author and allows to setup a set to be used when player gets into the world.
Entities section defines all possible entities in the world. This includes all items, tool, everything that have a model. Here you can change the behaviour of an entity.
Landscape Entities section provides access for special landscape stuff atm it allows you to change the trees.
Cubes contains all possible blocks in the game and their properties.
WorldProcessor params allows you to control landscape generation.
In the Container sets section you could set player start items.
Recipes section controls crafting recipes.
categories.png
categories.png (8.54 KiB) Viewed 4526 times


To add an item press right mouse button on the section and choose "Add..." in the context menu.
add_new.png
add_new.png (47.07 KiB) Viewed 4526 times


When adding an entity editor will ask you a type. Select a type to see its description. The type will define general entity behaviour.
NewEntityType.png
NewEntityType.png (9.13 KiB) Viewed 4526 times


You can edit entity properties if you select it in the tree.
For a new entity the first thing you should set is the model (ModelName property).
Properties.png
Properties.png (39.82 KiB) Viewed 4526 times


If you want to try your new entity in the game then modify the container set used as a start set (General section).
Select the set. Then use context menu on a free cell to set the item there.
set.png
set.png (34.39 KiB) Viewed 4526 times


Don't forget to save the realm after your changes. After that you can try your new realm in the game. To see it in action create a new world.
User avatar
ErtyHackward
Utopia team
 
Posts: 495
Joined: Sat Jan 05, 2013 7:59 am
Location: Kemerovo

Re: Realm editor

Postby s33m3 » Thu Feb 27, 2014 2:09 pm

WorldProcessor Params

0.png
0.png (6.68 KiB) Viewed 3900 times


This realm configuration's section is used by Utopia landscape processor to generate the world.
Utopia landscape processor is the center piece of the procedural world generation, in a simplistic view, you can see it as a big mathematical formula that can, with 3 parameters (X, Y, Z position), tell you which block is present at the requested location.
This section is also use to define the "Biomes".

Before explaining the various parameters and their impact, I would like to take some time to explain the notion of Frequency (Freq) and Octave (Oct), used in a lot of places in this configuration section.
These parameters are heavily use in proceduraly generated content based on Perlin or Simplex algorithm.

The Frequency :

Image

This image shows different frequencies applied to a wave. (With amplitude modification too - that is just defining the maximum/minimum height of the wave).
The higher the frequency, the more up & down cycles are done on the same distance by the wave.

The Octave :

Image

The image shows the result of adding various octave together. Its in fact the result of "mixing" the same curve at different frequencies together, with keeping the firstly generated waves having more impacts.
The higher the octave the more "detail" there will be.

Global World Parameters

1.png
1.png (14.71 KiB) Viewed 3879 times


World parameters
World Generator height : The parameter is frozen for the moment at 128 block height for the chunk.
World Ocean level : Any landscape below this block level will be covered by water.

Climate parameters
Climate parameters will be used in the biome configuration, and have 2 direct consequences on cube :
  • They are changing automatically the color of the Ocean and grass following the temperature and moisture
  • Snow is created over block where the temperature is really cold.

Temperature : On utopia the temperature is stored on the map as a 2d map, you can see it as : Each block column has its own temperature.
  • Frequency of 2 will make temperature to change very fast on the landscape, with a freq. of 0.01 you will have to travel a long time before seeing a big temperature change. (Change of +/- 0.1 in value has already big impact).
  • Octave will create "Noise" on the temperature curve between 2 points, instead of a nice curve going from One value to another, you have a curve with hiccup. (Better leaving it to 1 or max 2 octaves).

Moisture : On utopia the moisture is stored on the map as a 2d map, you can see it as : Each block column has its own moisture or humidity value.
  • Frequency of 2 will make the humidity to change very fast on the landscape, with a freq. of 0.01 you will have to travel a long time before seeing a big humidity change.
  • Octave will create "Noise" on the moisture curve between 2 points, instead of a nice curve going from One value to another, you have a curve with hiccup. (Better leaving it to 1 or max 2 octaves).

Other parameters
Biomes Zone : This is defining a 2d layer with "voronoï" cell that will be useful at chunk creation time. The frequency will influence the size of the cell, the lower the bigger.
To have an idea of the voronoi cell, here is an image :
Image

Here is the result "Ingame" with a frequency of 5 (that makes small cells) where I put a different block type per voronoï cell (See chunk configuration, to see how to do it) :

voronoi.png
voronoi.png (603.74 KiB) Viewed 3879 times


Landscape parameters

The Utopia processor can create 6 different types of landscape relief :

  • Flat
    flat.png
    flat.png (55.75 KiB) Viewed 3897 times
  • Plain
    plains.png
    plains.png (75.04 KiB) Viewed 3897 times
  • Hill
    Hills.png
    Hills.png (69.25 KiB) Viewed 3897 times
  • Midland
    MidLand.png
    MidLand.png (78.54 KiB) Viewed 3897 times
  • Mountain
    Mountains.png
    Mountains.png (96.92 KiB) Viewed 3897 times
  • Ocean
    Ocean.png
    Ocean.png (42.46 KiB) Viewed 3897 times

These basic landscapes are the brushes you will mix to create your final landscape. And this landscape page has been made for it !

2.png
2.png (16.12 KiB) Viewed 3899 times


It may be easier to read this screen from bottom to up.

In the world box you have the possibility to choose between two main generation mode :
  • Normal : infinitely generated world, nothing special
  • Island : a world centered around a single island. Associated to this mode is a size parameter. (!! small change = big island size change !!)
Then after you have a Bar composed of an Ocean and Ground parts. You can made the slider change to tell the world generated the % of Ocean and Ground you want to have.
These two "Big configuration" will be defined with more precision in the boxes above the "World" one.
A right click on the slider make you change the transition zone area in %. It means that inside this transition area the landscape generated will be a combination of both landscape (Ocean and ground). A transition zone of 0%, will make the landscape go from a Ocean to Ground type from one block to another. (It could lead to a mountain cut in two with ocean to the other side).

To show the difference here are two Ocean <=> Ground separation :
0% Transition zone :
NoTransitions.png
NoTransitions.png (951.97 KiB) Viewed 3879 times


6% Transition zone :
6PTransition.png
6PTransition.png (951.71 KiB) Viewed 3879 times



The impact of the frequency here will mainly be the global "size" of the Ocean and ground. With a low frequency you will have Huge chunk of ocean and ground, while large frequency will make the landscape go from ocean to Ground faster (in the same world surface), but it will always keep the same proportion in % given in the configuration.

The other bar are like looking into the Ocean or ground bar in detail and define its own structure with always the same type of parameters.

Sample :

"The ground" landscape is composed of :
  • BasicPlain
  • BasicMidLand
  • BasicMountain

"The BasicPlain" landscape is composed of :
  • Flat ==> Basic Brush
  • Plain ==> Basic Brush
  • Hill ==> Basic Brush

Biomes

The last tabulation of the WorldProcessor Params is the most important one, its where you will define what is populating your world.
What's a "Biome" for the Utopia world generator ?
A biome is a defined zone that correspond to some criteria, if those are met then this zone will be populated by a series of various "things" that we will define.

Biome.png
Biome.png (17.79 KiB) Viewed 3878 times


Here is a sample of the default "Island.realm" biomes that have been defined. You can see to the left 7 biomes, but you can create as many as you want.
When right clicking this list, you have the possibility to Add or Delete a Biome.

Biome properties :
  • General
    • Name : The Name of the Biome you are creating.
  • Filter (These properties will be defining when this biome must be applied to the world)
    • LandForm Filters : The list of landscape type (or landscape brush) where this biome can be applied. (ex: I when this biome to by applied only when the mountain landscape brush is used).
    • Moisture Filter : The moister range where this biome can spawn (Moisture range goes from 0 to 1, 0 being dry weather and 1 very humid).
    • Temperature Filter : The temperature range where this biome can spawn (Temperature range goes from 0 to 1, 0 being very cold, 1 very hot).
    • ZoneWeight : Will be used to distinguish 2 different biomes sharing exactly the some other filters. It give the relative importance of this biome compared to the other one that share the same other filters (Landforms, Moisture and Temperature).
      Ex :
      Biome 1 has these filters : Plain, mountain; Full Moisture range, Full Temperature range. ZoneWeight = 90
      Biome 2 has these filters : mountain; Full Moisture range, Full Temperature range. ZoneWeight = 10

      When the landscape is generated, if the landscape type is a mountain, the generator has the possibility to assign 2 different biome to it, the Biome 1 and 2.
      In this case its the voronoï cells that will be use to define zones "inside" this Mountain landscape, zone that will be compose of 90% of biome1 and 10% of biome2.
      Rem : The Temperature and Moisture must be exactly the same for the Weight to be taken into account. If two different ranges have been defined, but are "overlapping" its the first biome that match the filters that will be chosen.
  • Composition
    • Ground Cube : The block type that will compose the majority of the underground of this biome
    • Surface Cube : The block type that will compose the surface layer of the chunk (touching the "Air")
    • Under-surface Cube : The block just below the Surface layer, this zone can have a varying size.
    • Under-surface Layers : Is use to give the size of the under-surface layer with a random value between these Min/Max value. (Ex Min : 2, Max : 5, will give a layer with minimum 2 block height and maximum 5 block heights).
  • Sound
    • Ambiant Sound : The music that will be played when you are inside this biome.
      • Category [FX/Music] : Assign a category for the sound (music purpose or effect sound), most of the time here it will be music.
      • FilePath : The physic path to the sound file
      • isStreamed : Avoid to have the file to be fully in memory (The sound is place in memory incompressed, it means a mp3 of 3MB will take 50/60MB of memory), if streamed the sound will be put in memory chunk by chunk. You will be sparing memory but it is costing more cpu power.
      • Power : Not use here, it mainly for effect purpose (it is the maximum distance at wish the sound can be hear from the emitter).
      • Priority : Only 32 sound of the same Category can be played at the same time, if the playing queue the value be use to stop a sound with lower priority that is currently playing.
      • TimeOfDay : The time of the day when the music can be player between fullday/night/day.
      • Volume : Preset sound value change, 1 being default file volume. 0.5 will make the sound volume reduced by 50%
  • Population
    • Biome Entities : The entities that will spawn on the surface of this chunk
      • Entity : The spawning entity concerned.
      • Entity Per Chunk : the maximum number of time the entity can be placed in the chunk.
      • ChanceOfSpawning : The spawning chance for each entity (0 => 0%; 1 => 100%).
    • Biome Trees : The tree spawning into the chunk
      • Spawning chances : The spawning chance for each tree.
      • Tree per chunks : The min and max amount of tree per chunk.
      • Trees : The trees models that can spawn into this chunk. At each model is assign a spawning distribution that will be used of multiple trees are defined the % of each one.
  • Caverns : Underground caverns that can spawn inside the ground. This is a kind a "mega" veins. Indeed each cavern will be composed of a special cube resource.
  • CubeVeins : Properties that is defining the possible cube veins that can spawn into this chunk.
s33m3
Utopia team
 
Posts: 142
Joined: Sat Jan 05, 2013 9:58 pm

Re: Realm editor

Postby s33m3 » Wed Mar 05, 2014 11:08 am

Tree creation.

Inside utopia has been added an advanced tree creation module.
These trees are considered as "Landscape entities" : their are representing object in the world build with "Normal" world cube, the Trees generator is there to help you create them.
When created they can easily be added into a biome.

There is one restriction in place concerning the landscape entities : They must have a maximum of 7 chunks width.

Here is the screen in the editor where you can find and customize the trees :

landscapeTrees.png
landscapeTrees.png (28.38 KiB) Viewed 3849 times


I will go in detail for the various properties after, but i have created just for you a tool that will help us create the tree, to start it go there :

LTreeVisu.png
LTreeVisu.png (4.73 KiB) Viewed 3849 times


A new window should popup, empty (black), just change the tree selection in the editor and you should see something as this :

LTree.png
LTree.png (26.25 KiB) Viewed 3849 times


As from now, as soon when doing modification the tree configuration, the impact will be seen directly into this window ! Magic !!

The technology used for tree generation is based on a L-System, kind of recursive function that is represented ultimately as an "Axiome".
The axiome is the mathematical representation of the what needs to be done to create a tree.

The understand an axiome you need to apply these rules :

Rules list
  • M : move forward one unit with the pen up
  • F : move forward one unit with the pen down drawing trunks and branches
  • f : move forward one unit with the pen down drawing leaves
  • A : replace with rules set A
  • B : replace with rules set B
  • C : replace with rules set C
  • D : replace with rules set D
  • a : replace with rules set A, taking into account probability set for rule A
  • b : replace with rules set B, taking into account probability set for rule B
  • c : replace with rules set C, taking into account probability set for rule C
  • d : replace with rules set D, taking into account probability set for rule D
  • [ : Push stack states
  • ] : Pop Stack states
  • + : yaw the turtle right by angle degrees
  • - : yaw the turtle left by angle degrees
  • & : pitch the turtle down by angle degrees
  • ^ : pitch the turtle up by angle degrees
  • / : roll the turtle to the right by angle degrees
  • * : roll the turtle to the left by angle degrees

The various parameters entered into a tree configuration will be used to resolved the main axiom.
The Axiom is the generation starting point, from it you just need to read if from left to right applying what the letter tell you to do.

Properties description :
  • Angle : The default angle applied when requested by one rule.
  • Axiom : The base formula, decoded by the rules.
  • Foliage size : The size a of "unit" foliage. It means that when you "write" a foliage, it will create a volume compose of this amount of foliage block.
  • Foliage start iteration : The iteration as from wish the foliage are written. (Will mainly be used to create the trunk without leaves block)
  • is using small branch : create small branch.
  • Iteration : The number of time the axiom will be executed : First iteration is based in the root axiom, the next iterations will be based on the previous iteration !
  • iteration Rnd Level : will make the iteration a random value (this value could be added or removed from the iteration one).
  • Rules A, B, C & D : These must simply by replaced the corresponding letters into the axiom formula, they can have a probability to be added into the axiom or not.
  • Trunk Type : the trunk type :)
  • Foliage block : The block that will be used for the foliage
  • Trunk block : the block that will be used for the trunk
  • Name : the name of your creation.
  • Linked static entities : The entities that will spawn around the tree (below, or attached to it).

An example will be easier to follow.
Let's decrypt this axiom from the screenshot : FFFFcA, with the various properties as in the screen shot (but with probability for the rules A;B;C;D set to 1 (= 100% chance)

At first, let's "unfold it" by applying 3 iterations on it :

iteration 1 : FFFF FF [&FFBFa]////[&BFFFa]////[&FBFFAFFa]
iteration 2 : [Will be too long too decrypt, but you go it, take the iteration 1 replace the A by the rule A, B by the rule B, ...)]
iteration 3 : [Will be too long too decrypt, but you go it, take the iteration 2 replace the A by the rule A, B by the rule B, ...)]

Now you have a Looooooooog string that we will begin to decrypt.
You have a cursor that can move into the world, but also "write" into it. That's all it can do.

Let's decrypt some imaginary letters (In the end, the remaining letters A,B,C & D themselves have no impact on the cursor, they are just used in the iteration).
FFFF[////F][//F][//FF]
So here are the action that will be done by the cursor (At the beginning the cursor is always facing up):
  • F : Move one block unit then Draw trunk without leave (Only because it has been put into the final string in the iteration 1, and the Foliage start iteration is set to 3)
  • F : Move one block unit then Draw trunk without leave
  • F : Move one block unit then Draw trunk without leave
  • F : Move one block unit then Draw trunk without leave ==> cursor is still facing Up direction
  • [ : Save the cursor position + rotation (what's its facing)
  • / : Make the cursor roll by 35degrées
  • / : Make the cursor roll by 35degrées
  • / : Make the cursor roll by 35degrées
  • / : Make the cursor roll by 35degrées
  • F : Move one block unit then Draw trunk, we have turn the cursor so its no more facing UP direction (Let's imagine that now this F was added in the final formula at the 3 iteration).
  • [ : Restore the last cursor position + rotation saved by the [ (So now I'm again facing Up)
  • I let you decode the rest :p

Don't hesitate to visualizer, its best for try and error and for giving good result :)
s33m3
Utopia team
 
Posts: 142
Joined: Sat Jan 05, 2013 9:58 pm

Re: Realm editor

Postby s33m3 » Thu Mar 06, 2014 3:57 pm

- on going -
s33m3
Utopia team
 
Posts: 142
Joined: Sat Jan 05, 2013 9:58 pm


Return to Manuals

Who is online

Users browsing this forum: No registered users and 1 guest

cron