Jump to content

Terrain setup and editing questions


photo

Recommended Posts

I am currently updating our old terrain for the new version of the Unigine terrain. There are several things that I could not find in the manual and it might take some time to guess the solution for them:

 

1). With the productivity questions in mind, what is better placing terrain into the world file or storing it in the node file?

 

2). I will need to re-generate the terrain occluder every time I make significant changes to the height map, so the following information is necessary.

What is the correct file format/encoding for the terrain occluder?

How it is generated: Unigine utility? third party utility? Photoshop?

What will be its correct size for 8193x8193 terrain (the only one that worked was 256x256 - maybe too small)?

 

3). It is said in the manual that specular intensity for terrain is defined in the alpha channel of its diffused texture. How I can modify specular "channel" directly (or in other words separately from RGB ) in the terrain editor? It is definitely possible after export in Photoshop, but is it the best and the only method?

 

4). Compressing/decompressing textures is a time consuming task. Is it necessary to decompress textures every time before editing and then compress them again (I need to upload only optimized terrain versions to the server)? Is there any less time consuming method of editing?

Link to comment

1). With the productivity questions in mind, what is better placing terrain into the world file or storing it in the node file?

Does not make any difference from the point of view of productivity. Node references only make editing of identical objects easier. Plus, if there are hundreds of them, they will be loaded much faster (though the memory usage is still the same, whether nodes or node refs).

2). I will need to re-generate the terrain occluder every time I make significant changes to the height map, so the following information is necessary.

What is the correct file format/encoding for the terrain occluder?

How it is generated: Unigine utility? third party utility? Photoshop?

What will be its correct size for 8193x8193 terrain (the only one that worked was 256x256 - maybe too small)?

Terrain occluder is a RG8 texture: red channel for a height map, and green - for cone-step map. This texture is automatically generated by the engine when you feed it the downsized height map. That is only way to create occluder texture.

256x256 occluder texture for 8193x8193 terrain is Ok, or it can be 512x512. The idea is the following: if the visible relief is falsely culled by the occluder, use the bigger sized height map; however, the smaller, the better.

Btw, if the terrain relief changes in runtime, the terrain occluder is better not to be used. Or as a variant, black out the area in the height map, where changes will take place.

3). It is said in the manual that specular intensity for terrain is defined in the alpha channel of its diffused texture. How I can modify specular "channel" directly (or in other words separately from RGB ) in the terrain editor? It is definitely possible after export in Photoshop, but is it the best and the only method?

We will add this feature into the terrain editor.

4). Compressing/decompressing textures is a time consuming task. Is it necessary to decompress textures every time before editing and then compress them again (I need to upload only optimized terrain versions to the server)? Is there any less time consuming method of editing?

Actually, the textures are better to be compressed once before the final build is released. Compressing them every time only makes sense if you got problems with streaming of textures, because each decompress-compress manipulation results in a quality loss.

Link to comment

Thank you for your replay.

There is another question or actually a problem. It is not clear what my action caused it, so I will try to describe how the problem occurred and my attempts to solve it.

 

A newly created and fully setup terrain object worked fine for two days and than caused a crash during editor load. There were no apparent problems while editing terrain or saving the world file. After crash the log file showed that there are two textures missing. They were _d.dds coarse diffuse texture and _n.dds coarse normal texture. As far as I understand these textures are auto-generated (not created manually). While editing I used the option to re-generate coarse texture several times. Could it happen that at certain point I forgot to re-generate them, and continued working, saved files several times from the editor, and this caused the problem? But that was more a rhetorical question. What I really need to know is how to recover my work without re-building the terrain from the scratch.

 

I tried the following: deleted records about terrain.node from the world file (so the world file can load), added externally created coarse textures to the terrain folder (to substitute the missing ones) and tried to add the terrain as a node reference (once with and once without these textures). The editor crashed at this time leaving no error messages in the log file.

 

In the manual I could not find much information about possible problems with these textures except that they have to be re-generated after manual editing.

Link to comment

While editing I used the option to re-generate coarse texture several times. Could it happen that at certain point I forgot to re-generate them, and continued working, saved files several times from the editor, and this caused the problem?

That definitely can't be the cause. Could you please send the log, an error screenshot, or better still, your terrain recources, so we might grasp the problem?

Link to comment

The message with detailed description of the problem is already sent to your support team and I hope that it will be solved soon. The problem turned out to be more complex than I thought. My description of it is valid, but it shows only what is on the surface. The cause of the problem lays outside the scope of this topic and my competence. So, I will not go into further details here.

 

Nevertheless the question how to recover lost work with current terrain editing tools remains. Specifically I found it problematic to re-assign textures to surfaces.

 

For example, textures were not backuped and what is left after crash are 1024 diffuse texture files, 1024 mask texture files, and 1024 normal texture files. Each of them has a unique name that can potentially allow them to be automatically re-assigned to corresponding surfaces. Nevertheless current editor's tools does not allow me to select a group of files (or the whole folder) and assign them to a selected group of surfaces (or to all surfaces) at once. I see several possible solutions. None of them looks great:

 

1). copy-paste the parts of XML with information about materials and surfaces from a .node file into the world file (or a new .node file). But what if there is no .node file, XML data is lost and there are only images and .ter files left?

 

2). assigning every texture (of 3072 in total) to its corresponding surface manually. Should it be so complicated?

 

3). "glue" each set of 1024 textures together in Photoshop to be able to import diffuse and mask textures into the editor from a single file?

Link to comment
×
×
  • Create New...