Author Topic: Hexasphere lighting shader - ambient light issue  (Read 152 times)

nausicaaconsulting

  • Newbie
  • *
  • Posts: 30
    • View Profile
Hexasphere lighting shader - ambient light issue
« on: October 13, 2021, 01:08:13 AM »
Hello,

I'm using an hexasphere with the "Shaded" style and the "Use lighting" enabled.
I also use in the Unity Lighting Panel the ambient light with HDR color

http://brgu6696.odns.fr/ressources/hexasphere_ambiant_light_issue2.PNG

The hexasphere shader doesn't seem to use this ambient light param so the dark side of the planet is fully black (see attachement with comparison with a Primitive Sphere)

http://brgu6696.odns.fr/ressources/hexasphere_ambiant_light_issue.PNG

Any idea how to manage that ?
« Last Edit: October 13, 2021, 03:09:11 AM by nausicaaconsulting »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7565
    • View Profile
Re: Hexasphere lighting shader - ambient light issue
« Reply #1 on: October 13, 2021, 08:37:55 AM »
In Hexasphere, you have specific controls for ambient lighting and other effects so it provides you better flexibility as you can play with different settings for the hexasphere and your other objects. Just set the ambient light color to the property in the Hexasphere inspector as well:


nausicaaconsulting

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Hexasphere lighting shader - ambient light issue
« Reply #2 on: October 13, 2021, 11:11:44 AM »
Thanks, it works now.
I realized I didn't updated the asset since a long time so the "minimum light" parameter didn't existed

nausicaaconsulting

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Hexasphere lighting shader - ambient light issue
« Reply #3 on: October 14, 2021, 02:42:14 PM »
What would be for you the best way to add effects to the material you use ?
(I'm especially looking for smoothness)

A top feature would be to allow different material properties for each tile (this would be costly I guess)

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7565
    • View Profile
Re: Hexasphere lighting shader - ambient light issue
« Reply #4 on: October 18, 2021, 01:25:29 PM »
Latest beta includes new Smoothness and Specular Tint options (for non-extruded modes). These options affect to the regular background tiles.

You can also call "SetTileMaterial(tileIndex, yourMaterial, true)" and that tile will use your own material which can be of any tipe (ie. Standard Lit or Shader based). However please note that by passing the "true" option, the asset will create a tile impostor on the same position which holds your material. This means that this method can't be used to just replace each tile with a different material as it will generate lot of tiles in the scene. But can work really well if you are just setting the material for specific tiles.

nausicaaconsulting

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Hexasphere lighting shader - ambient light issue
« Reply #5 on: October 18, 2021, 01:34:56 PM »
Great, thanks a lot  ;)