|
Post by msw on May 6, 2015 2:23:33 GMT
I noticed by default the project is set up to use Gamma Space Lighting, and the camera in the Test Scene is set to use Legacy Deferred and non-HDR. Changing any of these things seems to cause issues. If I switch from Gamma to Linear, the water draws on top of the terrain, and the z-values seem to be backwards on riverbeds. If I turn on HDR, the colors are very off. Changing the camera to Forward Rendering causes terrain to always render on top of water so rivers disappear. I haven't noticed a difference yet between Deferred and Legacy Deferred, but I'm guessing there's a reason that Legacy Deferred is on.
Is there a way to get this project to work when changing these things, or do you have to use non-HDR Gamma Legacy Deferred only? My particular project uses HDR Linear Deferred, which is more or less the new standard in Unity 5 in order to get its new PBR shaders to look right.
|
|
|
Post by khash on May 6, 2015 12:03:48 GMT
We are using new Deferred rendering in our project, I haven't noticed that Honey is set to legacy one, but it does not break anything as far as I can see, so you should be safe to switch to new Deferred.
As for HDR You may want to tweak water shader to compensate the difference or simply render your other stuff using separate camera(which seems much easier unless you need hdr data on water too).
The gamma space is the biggest issue as I have adjusted world rendering to ensure water seems nice from different distances for gamma space while linear space would require rework of it. I'm not really sure why linear space makes rivers to have positive heights instead, I would need to track this issue at some point but I think its an artefact of the linear space during baking stage where river is printed to the world depth with wrong color which results in wrong value. I have noticed that linear space do some offset to drawing all depths of the world and fixing it would require recalculating the world depths algorithm to take into account this space. For static maps it may work to produce map using gamma space for texture production and then play game in linear space but its still very tricky.
|
|
|
Post by msw on May 6, 2015 20:44:31 GMT
Hmm ok, I'll try looking into the shaders and see if I can figure out what's going on. But I would recommend trying to get Linear space to work in a future version, since the new defaults for Unity 5 will be Deferred and Linear. The new Standard Shader in Unity 5 is designed to be used with Linear mode and doesn't look great in Gamma mode. So I'd bet a lot of users will be switching to Linear in the next few months.
|
|
|
Post by khash on May 7, 2015 8:20:26 GMT
We would look into it, thanks!
|
|
irdc
New Member
Posts: 1
|
Post by irdc on May 7, 2015 15:10:25 GMT
Definitely agree with MSW. Making Honey compatible with Linear lighting is going to be important for this generation of Unity.
|
|
|
Post by khash on May 28, 2015 10:51:27 GMT
Hi! I Managed to get it running in linear space, but to be honest it still looks terribly overlit and heavily influenced by ambients. It may take some time before I retain control over all those lighting effects(Its really hard to streach day to 28 hours more than few times a month ), but linear space is definitely doable
|
|
|
Post by DavidSWU on Feb 18, 2016 0:41:30 GMT
Hi! I Managed to get it running in linear space, but to be honest it still looks terribly overlit and heavily influenced by ambients. It may take some time before I retain control over all those lighting effects(Its really hard to streach day to 28 hours more than few times a month ), but linear space is definitely doable I would love to see a version that works in linear space. This was a non starter for us, we need to run in linear space.
|
|
|
Post by mtornio on Feb 18, 2016 8:14:28 GMT
I would really like to see a version with linear color space support too. We have currently set up our project for gamma space just to support Honey, but linear would definitely work much better for everything else in our game.
|
|
|
Post by davidwu on Feb 18, 2016 9:16:07 GMT
Linear looks much better for most projects. I found a solution.
Set the various _h and _m textures to linear read mode (advanced mode, disable srgb conversion) change all ocurrances of RenderTextureReadWrite.Default to RenderTextureReadWrite.Linear except the one in: Woldoven.cs line 522 Here is my changelist for reference: Avalon Lords\Assets\HoneyFramework\Scripts Avalon Lords\Assets\HoneyFramework\Scripts\RenderTargetmanager.cs Edit Avalon Lords\Assets\HoneyFramework\Scripts\WorldOven.cs Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Common_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Dirt1_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Dirt1_m.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Hill3_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Hill3_m.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Marsh1_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Marsh1_m.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Mountain1_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Mountain1_m.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Plains1_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Plains1_m.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\River1_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\River1_m.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Water_h.psd.meta Edit Avalon Lords\Assets\HoneyFramework2WIP\Resources\Terrain\Ground\Water_m.psd.meta Edit
|
|
|
Post by mtornio on Feb 18, 2016 10:20:05 GMT
Thanks a lot davidwu, this seems to sort out most of the issues with linear mode at least.
|
|
|
Post by davidwu on Feb 19, 2016 0:30:31 GMT
Great!
|
|
|
Post by khash on Feb 19, 2016 9:59:20 GMT
Is it change for Honey 1 or honey 2 wip?
|
|
|
Post by davidwu on Feb 20, 2016 6:39:10 GMT
Honey one. Here is another improvment: In TerrainDefinition.cs, the terrain colors look too bright, so you can gamma them with return new Color(Mathf.Clamp01(c.r * rScalar).Squared(), Mathf.Clamp01(c.g * gScalar).Squared(), Mathf.Clamp01(c.b * bScalar).Squared());
|
|
|
Post by davidwu on Feb 20, 2016 20:14:29 GMT
More fixes: Marking textures as linear, otherwise the marker indexing is off
line 254, worldoven.cs texture = new Texture2D(Chunk.TextureSize >> 1, Chunk.TextureSize >> 1, TextureFormat.ARGB32, false, true); line 261 world oven Texture2D gScale = new Texture2D(Chunk.TextureSize >> 1, Chunk.TextureSize >> 1, TextureFormat.Alpha8, false, true); line 283 texture = new Texture2D(Chunk.TextureSize >> scaleDownPower, Chunk.TextureSize >> scaleDownPower, TextureFormat.RGB24, false, true);
|
|