Jump to content

New terrain engine questions


photo

Recommended Posts

Can I import 16 layer PSD as mask source for 16 layers? I see I can specify number of channels up to 16, but I can assign only RGBA. Or do I not understand this functionality well?

 

I know there is 16 layers limit for terrain chunk, but I dont know how to work with more layers than 16 for whole terrain. In old editor it was possible to manually add material to chunk (in case we had more materials than 4), now I dont see that option. What is parenting of layers good for? What is mask base parametr doing?

 

Also after migration blending of terrain textures stopped working: http://www.dropmocks.com/mHWT3x

 

Probably stupid questions, but I cant find any examples, or updated tutorial. Would be possible to do some update?

Link to comment

Hi demostenes,

 

Probably stupid questions, but I cant find any examples, or updated tutorial. Would be possible to do some update?

I'm afraid the only samples with new terrain at this moment are samples/stress/terrrain_*. We are still working on terrain pipeline improvements. Updated documentation will be availabe only after Unigine 2.0 stable release, sorry.

 

Also after migration blending of terrain textures stopped working: http://www.dropmocks.com/mHWT3x

 

Could you please provide us your terrain before upgrade? We will check this behavior.

 

 What is mask base parametr doing?

 

If Mask base option is enabled, child will use parent mask.

 

Can I import 16 layer PSD as mask source for 16 layers?

 

I'm afraid you will need to split your 16 layer PSD into 4 PSD files with 4 layers each. Also, you should manually set up path for all parent materials masks, even if they are using the same file, but different channels.

 

I know there is 16 layers limit for terrain chunk, but I dont know how to work with more layers than 16 for whole terrain. In old editor it was possible to manually add material to chunk (in case we had more materials than 4), now I dont see that option.

You can use childs with overlap mode enabled.

 

What is parenting of layers good for?

You can add more details to your terrain by using childs. Also, you can control blending options and visibility for materials via scale, value, width, threshold parameters. Parent material can be even empty and childs textures will be used instead.

 

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Thanks for quick reply! I still dont understand, how to work with more than 16 materials for whole terrain.

 

Lets assume, I made 16 layer psd, split into 4 files and import it all (always check only four layers in import menu). So now I have terrain with 16 layers, but very few chunks have all 16 layers, actually average number would be 3-4, highest number 6-7, which means, I have plenty of space for some improvements by adding more layers (hand brush). 

So if I want to add some more layers to some chunk, I have to make child material of any material used on such chunk and manually import (or paint) other mask? How can i specify that chunk? In older version there was always list of assigned materials to particular chunk. Now there is no such list.

 

At this moment blending issue on converted terrain is not big problem, I have to rework whole terrain for 16 layers anyway. I will give you some feedback in case of blending issues.

Link to comment

I'm afraid only Import functionality currently works in Unigine 2.0 alpha, no manual editing by hand. It is better to focus on experimenting with import functions, test overlap / overlay materials behavior.

Could you please give us more details about your terrain:

  1. How many materials are you plan to use / how do they look?
  2. How final terrain should look like?
  3. How many materials will blend per chunk / pixel?

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

  1. How many materials are you plan to use / how do they look?
  2. How final terrain should look like?
  3. How many materials will blend per chunk / pixel?

 

1. I expect cca 20-30 materials per whole terrain. Usually 2048 textures with normal maps (rock, dirt, grass, sand, snow...). We have terrain generated in worldmachine, textured in l3dt/worldmachine. Our workflow is simple, first we import procedurally generated terrain and then artists are doing manual modifications/tuning. Which means adding of other materials for some special places, small modifications of heights, etc...Typical game workflow.

 

2. 3 vegetation regions (snow, desert, standard), this is current version with 4 materials per chunk limit:

 

http://www.endor.cz/demo/endor.png

 

3. I am trying to keep this number as low as possible, which means we are blending usually 2 materials per pixel (in case of transition of two neighbouring materials), rarely 3 (transition of 3 neighbouring materials). I am avoiding hypothetical situation with 4 neighbouring materials.

Link to comment

Thanks for detailed description.

 

Our techical artists don't see any problems with this terrain setup.

 

Also, there are few tricks to improve memory consuption and performance:

  1. If you are using overlap mode and materials with almost identical masks it is better to use base mask option and use one parent texture instead.
  2. Overlay mode and parent-child system can be used for achieving different detail materials with different steps.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

This new Terrain seems to capable of a lot of things, great.

I think, a good documentation with an example, in the end, would be very useful.

 

But that will be on its way I guess.

 

cheers.

 

werner

Link to comment

My previous workflow was simple. I made mask for whole terrain, last time it had 22 channels/materials. Than I merged some materials together (for example snow, grass and desert mask to channel R), so I had only 4 channels, imported into Unigine and then manually set different materials for each chunk. On desert chunk I used R channel for desert sand, on snow chunks for snow and on grass chunks for grass. And than by manual painting somehow solve transitions (grass to snow, etc..usually by sacrificing details from one of 3 available layers). It was pain in the ass, becase 4 materials for chunk are sometimes not enough, but generally better than nothing.

 

I still dont understand how to do this in current version. I mean how to operate with more materials than 16? In case I have only 16 materials per terrain, workflow is obvious, I will import 4x4 channels for selected layers. But how to do it in case I have 22 (or more) materials? Previous workflow with channel merge will not work, because there is now no option how to change materials per chunk. 

 

I also tried some manual painting and it does not work. I prepared 4 layers, imported 4 layer mask, but I was not able to manually paint selected layers and after some time it crashed editor. Import for coarse diffuse and normal texture does not have flip x/y controls. In case all import dialogs were importing it in same way it wouldnt matter, but mask is imported properly, coarse diffuse is flipped.

Link to comment

Hi Demostenes,

Number of channels in Import tab determinates number of channels in refined mask texture per chunk. So you may have more than 16 materials if you use children or use different materials on a different surfaces.
So, you should not have problems with your materials, using 1-3 different materials in different chunks.

As for mask import, for the current release you may use one mask per material or use maximum 4 channels mask, one channel per material.
This issue has already been fixed and in future releases you will be available to use multichannel masks, one channel per material.

As for mask painting, some notices you can find in this topic.
If you want to paint on mask fluently, I'm afraid, you need to use low resolution masks.

As for crash, I'm afraid we can't reproduce it and some reproduction steps would be helpful.

Also flip y function is automatically enabled in all textures in import. So, when you use textures from third party software, it will be imported correctly and coarse diffuse created using Import tab will be correct. As for import from Parameters tab, we'll add it to our bug tracker.

 

Link to comment

If you want to paint on mask fluently, I'm afraid, you need to use low resolution masks.

 

Problem is, that I am not able to paint at all, nothing happens. I have 256*256 mask (per chunk, 16*16 chunks). When I have one layer, I am able to paint, if I add other layers, painting dost not work.

 

So do I understand well, that I need to import mask for any layer (also above 16) for whole terrain and engine will "somehow" handle situation, when some chunks have only 4 layers used and some are already full (16 layers used)?.

Link to comment

Hey demostenes,

 

you have to recreate the texture array.

When you add a layer, the texture is not automatically created.

As well you need to decompress the textures.

 

I also had the issue, with the mask previously.

 

Cheers.

Werner

Link to comment

Hey demostenes,

 

you have to recreate the texture array.

When you add a layer, the texture is not automatically created.

As well you need to decompress the textures.

 

I also had the issue, with the mask previously.

 

Cheers.

Werner

 

This is wierd, i noticed, that texture array is updated, when i add new layer (number of textures in array was growing).

 

Do I understand well, that I need to decompress mask texture to for example .png?

Link to comment
  • 1 month later...

Other question, what happens internally in this situation: I have terrain with 256 chunks. I prepare mask for one layer (for example stone). Mask covers whole terrain (256 chunks), but in reality there only some chunks have information from this mask, rest is empty (stone is not used on all chunks). What happens inside of engine?

Is engine automatically able to discard layer, where is no information, so it does not take layer slot for given chunk (chunk has limit 16 slots/layers)? Or it always takes free slot, no matter if there is information or not, so I can use only 16 global layer textures and in case i want to use more, I have to prepare masks only for small regions (even chunks) and use some offset?

 

My situation is, that I have mask texture with 22 materials for whole terrain, but there are only 3-7 materials per chunk, so it is possible. And I am trying to figure best workflow, how to get this into engine as much automatically as possible (without manual splitting of mask into regions, etc..).

Link to comment

I ve tried to experiment, but it seems whole import system is not working. This was my setup. Mask is always covering whole terrain:

 

http://www.dropmocks.com/mHxKm_

 

http://www.dropmocks.com/mHwvwV

 

This is result:

 

http://www.dropmocks.com/mHwvwT

 

Textures are on different places (I ve checked that layers in alpha maps are in proper order, so really no sand on green hills), distance does not match with proximity (different textures). Some textures are completly missing (for example material number 15 and others). There is no more than 5-7 textures per chunk, so limit 16 wasnt reached.

Blending out of box not functional, tuning of parametres like treshold/value/widt helps, but it is very wierd, that terrain after conversion from old Unigine blends in majority of cases well on default values (0,5). In new terrain defaults values (0,5) does not blend at all.

 

No error message during import.

 

This should be result (converted terrain from old Unigine), default values for blending (only few textures needed tuning, generator of alpha maps is still the same, setup for texture distribution identical):

 

http://www.dropmocks.com/mHxUX4

Link to comment

Hi demostenes,

As for 16 channels per chunk, every chunk displays 16 of top priority materials (lowest in materials list) used in this chunk.
So, if there is no information about the material in this chunk, channel isn't used.

Also, what size of refined mask texture do you use?
The larger the size of mask textures, the better materials are mapped.

For more specific information, I'm afraid we need your terrain sample.
It would be very helpful if you can send us new terrain with the old one to compare.

Thanks!

Link to comment

I ve uploaded to your ftp (desktop.rar + diff_last.png) heightmap, alfamaps, terrain diffuse texture + list with description what each layer is (rock, desert...). Materials in list are in same order, as in alfa maps files 1-6. So just asign any texture you have and import. You will instantly see, that some materials are not loaded at all and for example sand textures are on random places over whole terrain, instead of one place (desert section of terrain). I attached diffuse texture to have idea, how terrain should like (mask will fit 99% on this texture, but there are some differences, diffuse texture was used in old Unigine with 4 materials, new mask have 21 materials, so more detail, anyway global layout is same).

 

Btw, was there some change of height map vertical size? Our import value was 2650 as maximum height of height map. Upgrading went OK, but when I import same heightmap now, I have to put 1115 there to achieve identical result. This new value seems proper, since it works exactly as in other tools we have. So this was some bug fix?

 

Does terrain ocludor handles holes in terrain? I have some troubles with it...

Link to comment

As for your terrain, there is a known problem on a coarse level.

I'm afraid, on detailed level we have 16 materials per chunk, but on coarse level we have 16 materials on whole terrain, so some materials could disappear.

 

For the present moment, as a workaround you can grab terrain with all materials using Grabber tab and use result texture as a coarse diffuse.

Some tips for this method:

- use a flat terrain with grabber to grab all materials on refined level

- if you want to add the texture as a coarse directly from Parameters tab you need to flip your texture by Y.

 

We can't find any problems in placing of materials, all is exactly as on your diffuse picture.

I've uploaded our terrain here, please check it.

 

 

As for heightmap, terrain view depends on the terrain size so it may be the cause of the differences. There wasn't any changes in heightmap import.

Link to comment

We can't find any problems in placing of materials, all is exactly as on your diffuse picture.

I've uploaded our terrain here, please check it.

 

All layers seem to be there. But I have found one issue. Material 20 should be controlled by alfamap6 (R channel). But it is controlled by R channel of alfamap5 (this channel should control material16). So sometimes materials are not assigned to proper mask and it is little bit mixed.

 

Anyway your result is far better than my (all layers are placed). I dont understand why, I am missing some layers.

Link to comment

Anyway your result is far better than my (all layers are placed). I dont understand why, I am missing some layers.

 

No matter what I do, I am not able to reach result as you. Alpha maps are OK, but in terrain there is lots of layers mixed together, like only one channel of each mask file was used instead of all 4 channels. Anyway even your terrain contain some issues (described post above).

 

I tried to split 4 channel .tga files in 4 one channel .png and it works properly. So there is some issue in import process.

Link to comment

Hi,
I'm afraid I can't find any problems in material placing.
Check that 48 materials array is used, so the last one material is not a 20th, but the 47th.

So, I'm afraid, we need your terrain for specific advices.
Could you please save it as a NodeReference and send all the files to us?

Link to comment

I think I found the issue. If I use 21 files for 21 layers, it works properly. Only if I use 6 files (4 channels), materials are mixed in wierd way (usually first channel is used for all 4 materials). I have of course import RGBA channels set.

 

I can pack such terrain, no problem.

Link to comment

Thanks for the sample!

I'm afraid it's a problem with rgb/rgba mask import.
This problem has been solved and fix will be available in next SDK update.

Sorry for inconvenience.

Link to comment
×
×
  • Create New...