|
Post by wyliam on Jan 30, 2015 17:50:45 GMT
I've a number of assets that were created based on a Unity unit being the average size of a human. I use those assets in other scenes for various other modes/cinematics, etc. Is there an easy way to change the scale of the hex/chunks to accommodate this different scale? I'd rather not have to create two sets of assets, and/or scale them at runtime based on the scene they're in.
|
|
|
Post by khash on Jan 31, 2015 16:18:38 GMT
There is no easy way to get it all scaled. It would require some tinkering in code. I may consider this a feature for some of the future updates.
|
|
|
Post by wyliam on Jan 31, 2015 16:35:49 GMT
Cool. Thanks...
|
|
|
Post by khash on Jan 31, 2015 17:28:27 GMT
If you want to give it a shoot you may find scale attributes in hex and chunk class, but even when this bit is working you mway want to change shaders (especially water shader) which uses depth value to define water blend. You will have to scale forground to adjust it to your needs ( ForegroundFactory class static private void AddSingleSprite(...) I didnt had time to test it, that configuration still may require some polishing but should allow you to get you far enough for tests
|
|
|
Post by wyliam on Jan 31, 2015 20:35:17 GMT
Thanks- That's where I started initially. I'll keep exploring that for now.
Any thoughts on how it might affect generation/time or performance?
|
|
|
Post by khash on Jan 31, 2015 20:44:03 GMT
it really depends how big chunks you want to have. If you will make chunks very big it will require you to start using bigger textures to store their data (atm default is 2048x2048 so you may increase it to 4096x4096 if your chunks would be bigger. You may consider as well higher tesselation levels or more dense by default mesh)
If you want hexes to be smaller then you should keep chunks about the same size (as its reasonably optimal) and pack more hexes into one chunk. That should not really affect performance.
Other than change in the texture resolution (and its memory consumption, and time to produce world with more resolution) you should not see much of the performance difference.
|
|
|
Post by wyliam on Jan 31, 2015 20:49:50 GMT
Awesome sauce. Thanks for the suggestion.
|
|
|
Post by wyliam on Feb 1, 2015 22:48:54 GMT
I started to fiddle with the scale values in Hex and Chunk, but found that a straight scale of the root object (pre-generation) worked just fine for my prototype purposes. There are, however, some artifacting on the water (see images below). I've scaled it to ~10x. Is this due to the mesh resolution? If so, what's the easiest way to increase it's res?
|
|
|
Post by khash on Feb 2, 2015 9:21:23 GMT
mesh resolution is changed by tesselation in CameraControl But what you see is something else! Open Water shader. You will notice that there is depth test which compares distance between current depth (terrain) and camera->water pixel distance. If you scale everything then those distances are sacaled, and blending is to shallow. Most likely you get just 1-2 pixels of blending. You need to tweak it. Hopefully it will be just changing it x10 but may require some more playing around. You may need as well to lift water a bot higher over terrain. It will be too shalow in most places to get visible but it would get much smoother in places where it may start getting visible. Your corners in the rivers should endup as different depth of the water instead. You may as well want to tweak tiling of the clouds and waves as this may start being very noticeable even on small waters. Making games is always about using tricks to make it looks and work nice even if data you have to work with are far from ideal. That is the strong case we have here where world is far from ideal, but we try to turn its disadvantages and artifats to make it look even more natural
|
|