Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Emissive material like in Blocks leap motion demo?

Discussion in 'General Graphics' started by Juang3d, Apr 21, 2016.

  1. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Hi there.

    I'm trying to reproduce the lighting effect in the cubes of the blocks demo, they of course are non-static objects, and they emmit light dynamically based on a texture, I have not being able to reproduce it (bear in mind I don't program shaders).

    Here is what I am talking about:



    Thanks in advance!

    Cheers.
     
  2. acolgan

    acolgan

    Joined:
    Sep 1, 2015
    Posts:
    12
  3. vikankraft

    vikankraft

    Joined:
    Feb 25, 2016
    Posts:
    88
    Yeah they might be using blooming, which is a simple algorithm to implement yourself. (it is in openGL maybe not unity).
    but I doubt they actually emitt light I think its only color?
     
  4. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    @acolgan.

    Thanks!

    But how did you do to "project" the object as emmited light? Because the bloom is cool, but what about the coasted light? I know it doesn't cast shadows, but it casts shapes, as for example with the icosahedrons the projected light shape is different than with the box or the rectangle.

    @vikankraft
    If you see the video, when you create an object there is some light shape being projected, and as I said just now, the shape is different with the box, rectangle and the icosahedron.
    Any idea on how to get that projection effect?

    Cheers!
     
  5. Namey5

    Namey5

    Joined:
    Jul 5, 2013
    Posts:
    188
    It looks like a mix of bloom, SSR and point light cookies.

    (an example of point light cookies)


    (A further example with bloom and SSR for indirect lighting)
     
    Last edited: May 3, 2016
  6. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    I though about point light cookies, but I'm not sure if I can use an spherically projected texture as cookie (which is what I think that could work for this).

    What is SSR?

    For the bloom they used the asset Acolgan said, and it's what I'm going to use.

    Cheers.
     
  7. Namey5

    Namey5

    Joined:
    Jul 5, 2013
    Posts:
    188
    Point light cookies use the same methods as cubemaps, i.e. spheremap, cylindrical, cubic, etc.

    SSR is the most accurate way of calculating reflections and indirect lighting in realtime (you can kind of see it in the 2nd example of my previous post).
     
  8. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    @Namey5

    I haven't saw your examples, sorry, they are pretty cool, any guide or tutorial where I can learn how to take advantage of SSR?

    Cheers and thanks for the info!
     
  9. Namey5

    Namey5

    Joined:
    Jul 5, 2013
    Posts:
    188
    Something like this could work
     
  10. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Indeed!

    This is pretty cool are you using any addons?

    This goes for VR (like the blocks demo).

    Cheers and thanks for the help!
     
  11. Namey5

    Namey5

    Joined:
    Jul 5, 2013
    Posts:
    188
    No, this is just the standard shader, with a point light and attached cookie (made in photoshop w/ NVIDIA texture plugin). The bloom is included with unity and the SSR is compatible with the standard shader and is completely free on the asset store. Just note that it is still in development and requires deferred rendering.
    https://www.assetstore.unity3d.com/en/#!/content/51515
    Because it is a cookie, if the cube clips through objects the perspective will break somewhat, however you can use shadows.
     
  12. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Oh!

    Cool!

    But I'm having a problem, when I add, for example, the bloom effect to the camera (center eye anchor) all I get is a black screen in the unity game view and inside the Oculus Rift.

    Any ideas on why is this happening and how can I use Image Effects with VR?

    Cheers and thanks again! Namey5 you are helping me A LOT!!! REALLY REALLY THANKS!
     
  13. Namey5

    Namey5

    Joined:
    Jul 5, 2013
    Posts:
    188
    I've not worked with VR myself, but after a bit of research, have you put the image effects on both left and right cameras? (not really sure how Oculus works in Unity, but that's the advice I've found on the matter).
     
  14. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    well, in fact there is no left/right camera in Unity for VR, if I use the Rift prefab there is Left/Right anchor, but there is no camera, the only camera present, even during gameplay, is the center one, I'm not sure how it works, I'll ask in the VR forums.

    Thanks anyway!!! You helped me A LOT.
     
  15. Juang3d

    Juang3d

    Joined:
    Sep 25, 2012
    Posts:
    87
    Ok, I found the problem, in quality setting the antialiasing should be disabled, in any other case effects won't work :)

    Thanks!