Jump to content

Problem with the generated world and its low quality and bumpiness (WebGL)


Michal

Recommended Posts

We are currently working on a browser game, the target is WebGL. On the Win / Mac / Linux platform, the world is generated correctly, the terrain bump problem does not occur and the textures are located correctly. However, after switching to WebGL, the terrain looks like the picture below, why is this? Can it be changed? If so, what is it responsible for? 
I understand that for webgl the generated terrain must be of lower quality, but in this form it is not usable, smoothing also does not do the job too much

https://imgur.com/a/syx7jwU

 

Link to comment
Share on other sites

This could be to how the image is compressed. 
To fix this you could use the stamper and change the stamper operation to smooth and stamp. 
This would smooth out the terrain. 

Additionally, you would want to look at the image itself. 

Here is some basic notes that should help: 

All JPG's and most PNG files are only 8 bits per channel. When this gets converted to a stamp this means that you can only represent 256 possible height values, and the resulting stamp may appear terraced. You can address this by smoothing the terrain after stamping, but if possible use 16 bit textures as the resulting stamp will of better quality. RAW16 is better texture format to use.

2. Image compression will also cause artefacts in the resulting stamps. If possible, please ensure that your source image is not compressed, and regardless, make sure that you disable compression on the texture in Unity before you use the scanner to convert it into a stamp. Make sure you disable the sRGB setting on the texture so that it is imported purely as data.

3. Terrain scale is important. These heightmaps represent quite large areas, so in order to get a more realistic scale make your terrain 4 or 8km sq, and increase the Y scale as shown in the video. This is the type of scenario when streaming is important as well, so in Gaia Pro, make your terrain tiles around 512m sq, and enable separate scenes and streaming.

4. You can also use these stamps as the base for much larger environments using the world designer. To do this use the world designer, and then select Image as the Shape Input Type, and then your new stamp in the World Shape section. You can add more detail or not as you choose.

  • Like 1
Link to comment
Share on other sites

I see. We are currently testing terrain generation on the attached heightmap(imgur link), it is quite low quality, (1k and 8bits)
However, there is a problem with world generation, when the options mentioned by you "enable separate scenes and streaming"
are on. The world does not want to generate itself, that is, it keeps generating itself forever. What could be the reason?

 

https://imgur.com/a/49806Ow

Link to comment
Share on other sites

This could be computer specs, this could be memory allocation, it just depends. 
Are you experiencing any crashing, or just freezing? How large is the world you are trying to create? 

Link to comment
Share on other sites

Probably not the fault of the comp specs( 16 cores, 64gb ram, RTX) The problem occurs when I click generate world with the options mentioned above selected:

1. Create terrain scenes
2. Unlload Terrain Scenes
3. Floating Point Fix

Regardless of whether I am generating 17x17, 10x10, 5x5, 3x3, (1024sqm or 512sqm), the loading bar is still in place with the words importing assets and with no progress even after waiting for +30 minutes.

Neither Unity nor Gaia crashes or freezes, I just have to restart Unity because the "importing assets" loading bar is still there even after making a new scene.

 

Link to comment
Share on other sites

I managed to create world with these 3 options enabled by switching to Unity 2021.1.25f1 from 2022.1.0b16 :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...