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. Dismiss Notice

[RELEASED] 2.5D Camera: Oblique Projection

Discussion in 'Assets and Asset Store' started by Orion, Feb 13, 2013.

  1. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    Hello everyone!

    I've finally finished my 2.5D camera extension. It allows you to render your game in so called "Oblique Projection". This is similar to orthographic rendering, but allows your objects to stay unskewed / undistorted from the front, while still showing the sides. It's often confused with isometric rendering. If you were looking for that, you actually might want what this camera does.

    So this is perfect for combining sprite graphics and 3d models, or for technical illustrations, minimaps, etc.
    So if you want to build a retro-looking side scroller or a topdown strategy game or simulation, or a retro pixel art RPG, this might be just the right thing for you :)

    $isocam03.png $isocam.jpg $wip14.png

    The component easily attaches to a regular orthographic camera, and changes how it renders by adding a couple of options to the camera's inspector.

    You can find an example for web and stand-alone here: Dropbox
    The camera performs just like a regular orthographic camera (same features, same restrictions). Take into account that it's a heavy scene (1.6m triangles), so it might not render super fast on every computer.

    Asset Store


    If you have questions, suggestions, problems, etc. I'd be glad to help you here.
     
    Last edited: Apr 16, 2013
  2. propapandagames

    propapandagames

    Joined:
    Jan 1, 2013
    Posts:
    70
    This looks quite interesting for a project I have in mind.

    Can you confirm that this script

    a) Works with deferred rendering?
    b) Renders point and spot lights correctly in deferred rendering mode?

    Thanks!
     
  3. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    Hello libera-me,

    thanks for your interest. Good that you asked. Since the camera works almost exactly like Unity's orthographic camera, and the orthographic camera does not support deferred rendering, this camera can't support it either. It's a shame, but unfortunately there's nothing I can do about it.

    I'll try and make it more clear from the description of this asset though. Thanks!
     
  4. propapandagames

    propapandagames

    Joined:
    Jan 1, 2013
    Posts:
    70
    Thanks for clarifying. Unfortunately, without support for deferred rendering this script will not be of use to me.

    Really wish Unity would fix this!
     
  5. Molt

    Molt

    Joined:
    Sep 6, 2011
    Posts:
    103
    I seem to be having trouble getting shadows working in this, am I just missing something or does this not support them?
     
  6. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    Hello Molt,

    shadows work well, although only from directional lights. Spotlights or pointlights are only casting shadows under deferred rendering, which unfortunately Unity's orthographic rendering does not support.

    If that is not the problem, check your quality settings and make sure shadows are enabled and the shadow distance is high enough.

    Please let me know if that solved your problem or if you need further help.

    $shadows.png
     
  7. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    What is the asset pack called in last screenshot for the 1st post
     
  8. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    Oh, it's not actually an asset pack. It's a project I've been working on at that time.
     
  9. cel

    cel

    Joined:
    Feb 15, 2011
    Posts:
    46
    does this work with unity5, I get a warning that it might not be compatible with unity 5 when trying to buy it on the asset store
     
  10. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    The warning is correct. There is a problem with shadows not being correct in Unity 5. This is a known bug with custom projection matrices.

    So unless you don't care about using shadows, you can better wait until this bug is fixed. Then it should work fine.

    Rumour has it, it should be fixed in the next version of Unity 5.
     
  11. Astadyl

    Astadyl

    Joined:
    Dec 11, 2016
    Posts:
    2
    Hi there,
    I am wondering, would this assets works with a flat 2D map? (think about something similar to Earthbound)
    Does it also helps dealing with collisions in cabinet view?

    (I am much more of an artist than a programmer so expect from me very basic questions)
     
  12. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    Hello Astadyl,

    If I didn't misunderstand you, then yes. That's pretty much what I made it for. You can set up collisions as if it was 3d and use the camera to skew the perspective.
    This is much easier than building the world skewed.
     
  13. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    191
    hey, will you update this to make it work with 2019 or 2020?
     
  14. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    250
    Probably not. There are likely better extensions that do the same, and the time it would cost to fix up the camera editor is not in proportion to what I could ever ear back (given that there are similar extensions that look much flashier).