Search Unity

Question How to solve this shader related design problem? (Noob question)

Discussion in 'Shader Graph' started by hiab-x, Nov 16, 2021.

  1. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    Hi, the above image shows the actual scene (rotating Icosahedron above a field) the bottom image is a Photoshop mock-up if what I'd actually like to achieve. The intended effect is that the icosahedron will reflect an entirely different scene altogether.

    I've tried looking for answers, assuming that I'll need to get this effect working with Shadergraph, I'm just not sure where to go from there. I've got a cubemap of the intended reflexion but I'm inexperienced with shadergraph and its hard to even know exactly the right terms to use looking for a tutorial to get the instruction that I need. If you can help me in any way, please do. Thanks
     

    Attached Files:

  2. hickv

    hickv

    Joined:
    Oct 31, 2018
    Posts:
    40
    The 'Right' Way:
    That effect would need custom textures, custom surface and post-processing shaders... Even a custom sky shader... Makes you wonder if it's even worth implementing it.

    The 'Wrong' Way:
    You could create that drawing as light cookie instead, wouldn't be the same but close, and for the sky you just would just position an emissive plane really far away from camera with a texture you make in Photoshop.

    Game development is mostly about hacking to just 'make stuff work'...
     
    hiab-x likes this.
  3. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    Thanks for taking the time to respond. I shall go and look up light cookie tutorials on Youtube, unless you know of a better place to start? The image is for a home screen, but it's in VR, so I'm keeping the camera pretty much at the distance that you see in the still image. Thanks again
     
  4. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    139A1100-2BAE-46A3-A454-7EB3045FED45_1_201_a.jpeg D4DEA41D-1F05-41BF-8C74-587F4805DC40_1_201_a.jpeg
    So, your tip was a great start. I've managed to get a projection going but I can't seem to make the iamge appear on the mesh brightly unless I scale it down so that the light is almost touching the mesh. Widen the beam and it just fades terribly. If you can see an obvious error in my setup, please let me know. I'm sure that it can be improved but I've gone through all the usual sliders and stabs in the dark. Thanks again
     
  5. Cranium-Software-Limited

    Cranium-Software-Limited

    Joined:
    Apr 12, 2017
    Posts:
    5
    > The intended effect is that the icosahedron will reflect an entirely different scene altogether.

    This sounds like something environment maps usually can provide 'out of the box'.

    there is some stuff about using cubemaps here: https://developer.arm.com/solutions...ng/implement-reflections-with-a-local-cubemap although there is no reason why you couldn't do this with a cylinder map etc.

    (i'm not sure why light cookies were suggested. they seem pretty orthogonal to the description given)
     
    hiab-x likes this.
  6. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    Thanks for responding. I stuck with the light cookie approach and tweaked a number of parameters to get the effect that I was after.In the end, the suggestion from hicktv was a pretty painless solution, admitting that it was a hack rather than the other method. I'm pleased with the results though.
     

    Attached Files: