Search Unity

Official Tell us how you're creating 2D games that include 3D elements

Discussion in '2D' started by rustum, Mar 10, 2022.

Thread Status:
Not open for further replies.
  1. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Hello 2D creator folks! :)

    The 2D Team at Unity is interested in finding out more about your experiences and goals when using the 2D Renderer in URP to develop 2D games that include 3D elements.

    Important Note:
    For this exercise, we want to focus on 2D games developed using the 2D Renderer in URP. If you are not using the 2D Renderer or have another question to ask please start a new thread. Thank you for your kind understanding!


    Here are some questions to get this discussion started:
    • What kind of game are you making? What perspective, genre and art style?
    • What are your expectations when importing 3D objects into your 2D project/scene?
    • Which URP features are required for the 3D objects in your game? How are they used?
    • Which 2D lighting features are required for the 3D objects in your game? How are they used?
    • Which 3D lighting features are required for the 2D objects in your game? How are they used?
    • Do you use a perspective camera in your game? If so, could you elaborate on your reasons?
    • Do you use camera stacking in your game? If so, how is it used?
    • Describe how you would like to construct a scene that has both 3D (with volume) and 2D (flat) assets?
    What else would you like us to know about your experiences and goals when adding 3D elements to your 2D games?

    If you would rather answer these questions in private, please feel free to DM me.

    We're looking forward to hearing from all of you!
     
    GDevTeam, ashrafmajdee and EvOne like this.
  2. Zephus

    Zephus

    Joined:
    May 25, 2015
    Posts:
    356
    I was about to start a project and was actually not sure if the 2D Renderer can handle 3D objects, so I went with the normal URP renderer. But I guess I could give you some feedback on what I was planning to do.

    • What kind of game are you making? What perspective, genre and art style?
    Sidescroller like Mario, but with 3D objects in the background. Orthographic perspective, but was thinking about switching to perspective for that effect Paper Mario has. The art style is mainly pixel art, with geometric 3D shapes in the background.

    • What are your expectations when importing 3D objects into your 2D project/scene?
    I'd like to be able to use them exactly like I use 2D Sprites. For Sprites it's usually enough to drag them into the project and set the filter, PPU and compression. With 3D objects this becomes a bit of a hassle, since Blender for example uses a different coordinate system, so by default objects are always rotated when dragged into the scene.
    I'd love if there was a universal setting where you can actually choose the 3D modeling software you're using and that's setting the import settings in a way that makes the entire process drag & drop. So like a dropdown in the project settings or preferences with Blender, 3DS Max, Maya etc. - and when I choose Blender, and then drag in files from Blender, they just work right off the bat, without having to change anything.

    • Which URP features are required for the 3D objects in your game? How are they used?
    • Which 2D lighting features are required for the 3D objects in your game? How are they used?
    • Which 3D lighting features are required for the 2D objects in your game? How are they used?
    Shader Graph and I guess 2D Lights? I'm not sure how exactly they should be used, since the objects are 3D and I couldn't get 2D Lights to work properly, so I went back to the normal 3D Lighting. There's one Directional Light and a lot of Point Lights to illuminate both background objects and sprites. It's really hard to say what I'm expecting, since there's no clear guideline on how to get 2D and 3D objects to work with Lighting together.

    I think I'd rather give feedback that there's a lack of clear tutorials or information in general on how to set this up. Until I saw this thread, I was convinced that the 2D Renderer meant that I'm now constrained to using Sprites only. Which made sense in the beginning, but the more I've tried to work with it, situations where I needed 3D objects came up again and again. In a lot of cases it's way easier to have a 3D object and rotate or animate that, instead of re-drawing a sprite from dozens of different perspectives. So in my opinion it's essential to be able to mix the two. But the current information makes it seem like using the 2D keeps me from having anything 3D in my scenes.

    • Do you use a perspective camera in your game? If so, could you elaborate on your reasons?
    Sometimes, yes. As mentioned, I'd like to create that Paper Mario effect where 2D Sprites run around in a 3D world. Currently I'm actually using Quads to render the Sprites. But in some levels I'm planning on switching between orthographic and perspective, like in Super Paper Mario:

    I can't tell you what I'd like the solution to be though. In my mind I'd want to use the 2D Renderer and its features (mainly 2D Lights) when in orthographic mode, but switch to a 3D Renderer in perspective mode. If there was a way of using only the 2D Renderer for both, that would be ideal. Although I'm not sure how that would work on the engine side.

    • Do you use camera stacking in your game? If so, how is it used?
    No. Actually didn't know URP had this yet, but might consider it if it's needed. No plans though.

    • Describe how you would like to construct a scene that has both 3D (with volume) and 2D (flat) assets?
    I think I already described this in the other answers. But in short the main application would be - 2D for most interactable objects, but 3D for backgrounds. Mainly for rotation and animation, since they are much easier to do in 3D.
     
    Xiangting_Su likes this.
  3. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    I used to work on a purely 2d game that eventuall became 3d (example) with some interesting implementation choices.

    What kind of game are you making? What perspective, genre and art style?
    This is a top down game that used to be purely 2D, its perspective was about 60 ish degrees kind of top down perspective, and its style/feel was to be a fast paced arcade rogue like shooter. So a lot of importance was in clarity but also enticing visuals at the same time.

    What are your expectations when importing 3D objects into your 2D project/scene?
    Not sure what this question means or trying to get at. I guess my expectation was that if I added a 3d model into a 2d game it then it should appear given there are 3d lights are present to illuminate it.

    Which URP features are required for the 3D objects in your game? How are they used?
    I used render textures frequently because I wasnt familiar with srps way of implement fullscreen image effects. This is specifically for adding lighting in underground areas like here by rendering the light layer as a black and white low res texture on top of the original render texture using a shader/material. So the only required feature would be how to make fullscreen image effects (which I know is possible I just couldnt be bothered to sift through different contradicting guides online).

    One feature I really wanted was for sprite renderers to be lit from both sides by a 3d light, because of this I had to have 2 sprite renderes facing each way so that one casts and shadow and the other is lit from the camera's POV. This is because the shadows should appear close to you, which would mean that the directional light needs to be pointing downwards and towards the bottom of the screen. Which results in sprite renderers not being lit. I didn't want to make them unlit either cause then I lose the whole purpose of being able to use lighting in game (like point lights in underground areas)

    Which 2D lighting features are required for the 3D objects in your game? How are they used?
    At that time, 2d lighting as it is right now didnt exist.

    Which 3D lighting features are required for the 2D objects in your game? How are they used?
    When the game transitioned to 3d I removed the old approach for my lights and started using the usual 3d components for lighting. This includes directional lights and point lights.

    Do you use a perspective camera in your game? If so, could you elaborate on your reasons?
    Yes and no. The game atm lets you switch perspectives on a whim. This is because it was easier to make the game for 3d since there game's features work well with those (jumping, arcing projectiles, elevation), so might as well use 3d tooling. But from a completely 2d game's perspective, I see a very good reason to use a perspective camera, since it allows for free parallaxing as a result of a 3d projection and also intuitive depth management (since its all just regular 3d workflow). Theres also the usual "the game is 2d so use an ortho camera" argument which is just using the more fitting camera setup for the setup (a very empty reason imo, but an easy decision to make).

    Do you use camera stacking in your game? If so, how is it used?
    Before the camera used to render 2 cameras, one for the game itself that is downscaled then upscaled to keep that pixel art look, then a 2nd for the lights. When I switched to 3d i could ditch those two which is great cause less cameras proves more efficient and simpler to work with in this game. Described more here. I also had a UI camera that was an overlay on top of the game camera, theres no real valid reason for this imo, it just adds to the overhead and going back I'd use one camera for everything instead.

    Describe how you would like to construct a scene that has both 3D (with volume) and 2D (flat) assets?
    In the future, if a game ever could have 3d elements, ill just make it 3d because its a lot easier to make a 3d game look 2d (from experience). This is what im doing at work as well.
     
    Xiangting_Su likes this.
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    What kind of game are you making? What perspective, genre and art style?
    We're making Teslagrad 2. It's similar to Teslagrad, which has a Steam page here. Both we and Unity have evolved a lot in the years between it released in 2013 and now, so imagine that everything is cooler and higher fidelity, but the perspective (side-on with perspective camera) genre (2D puzzle-platformer) and art style (handdrawnish) are the same.
    To note things we are not making, we're not doing pixelart at all, so things like the pixel perfect camera etc. is not interesting for us. We're also using spritesheet animations for all the characters instead of any kind of 2D animation.

    What are your expectations when importing 3D objects into your 2D project/scene?

    That they should work! We're using them to create depth in the scene, so all the 2D features should handle them.

    And, well, they do?
    Which URP features are required for the 3D objects in your game? How are they used?
    Which 2D lighting features are required for the 3D objects in your game? How are they used?
    Which 3D lighting features are required for the 2D objects in your game? How are they used?

    Our setup is using 2D lights. In order to have them interact well with 3D objects, we use Sprite-Lit-Default for the 3D object's material. That works well, except for the snag that we can't set the sorting layer on the 3D objects from the UI, so we had to add a script in order to expose setting
    renderer.sortingLayerName
    in the UI.

    Do you use a perspective camera in your game? If so, could you elaborate on your reasons?
    The art style requires it. We're not big fans of how orto cameras look, even in very simple 2D games.

    It's all about the parallax. Adding parallax scripts like in a snes 2D game is a lot more work than just setting the z-depth of objects. Things pretty much automatically look better if you've got that in, so I guess a bigger question is why you would ever use an orto camera? Maybe if you're doing a very hard retro appeal?

    Do you use camera stacking in your game? If so, how is it used?
    There's some camera effects that involve a camera filming a specific layer, writing that to a render texture, downsampling that, and placing it on an overlay canvas. So, uh, "screen space effects"?

    Describe how you would like to construct a scene that has both 3D (with volume) and 2D (flat) assets?
    I don't think there's anything really complicated in there. I want to put the 3D elements in there next to the 2D elements and have that function reasonably.

    Features that would be nice would be stuff like;
    - If we're using 2D lighting, then adding 3D objects to the scene should have them on Sprite-Default-Lit, or some other default material that supports 2D lighting, instead of URP/Lit, which does not. This already works for sprites.
    - If we add an EdgeCollider2D or a PolygonCollider2D to a 3D object, it should do a reasonable job of trying to match the outline of the object. It's fine if that's done in an ortographic way, but now we have to do it completely manually. BoxCollider2D works, I guess because it's really easy to just grab the bounds.
    - Clearer docs on how this is supposed to work! Right now slapping a 2D shader on a MeshRenderer and then fiddling with hidden values makes things "just work", but the docs is very clear that these features should not function, so that is a bit worrying.
    - The requirement for things to be coplanar is a bit iffy. We have some background SpriteRenderers that we rotate, but in those cases we have to make sure that they're not hit by any point lights that hit anything else, as the lights assumes either ortographic camera or no rotation on elements.
     
    PanthenEye, Xiangting_Su and Mindjar like this.
  5. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    • What kind of game are you making? What perspective, genre and art style?
    • What are your expectations when importing 3D objects into your 2D project/scene?
    • Which URP features are required for the 3D objects in your game? How are they used?
    • Which 2D lighting features are required for the 3D objects in your game? How are they used?
    • Which 3D lighting features are required for the 2D objects in your game? How are they used?
    Right now I'm making a platformer with realistic sprites and 3D characters (for many reasons). I'm using built-in rendering and custom sprite shaders with 3D light support. I'd love to use URP features like Sprite Normal Mapping, but 2D lighting in URP doesn't support 3D models in any way.
    • Do you use a perspective camera in your game? If so, could you elaborate on your reasons?
    • Do you use camera stacking in your game? If so, how is it used?
    Right, perspective camera, because no built-in parallax scrolling in unity.
    • Describe how you would like to construct a scene that has both 3D (with volume) and 2D (flat) assets?
    Just place them in the scene, that's all.
     
    Xiangting_Su likes this.
  6. TracyBlais9900

    TracyBlais9900

    Joined:
    Apr 1, 2022
    Posts:
    1
    a quation about using the perspective camera, yes I use it to make sure everything looks the way it should
     
    Xiangting_Su likes this.
  7. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Hi folks! I just want to say I appreciate all the detail that has gone into these responses. :) Keep 'em coming! We're reading them carefully and may have some follow-up questions for some of you soon.
     
  8. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    253
    Yes thank you for all of the responses! They are super helpful!
    Just curious as to what prompted this decision because you make these really great looking pixel art games. So I'm wondering if there were any blocking production reasons that made you switch to 3D?
    This is interesting too. Do you happen to have a screenshot of sorts to help us understand this use case fully? Thank you!
     
  9. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    Thank you!
    the game emphasised 3 dimensions, yet it was portrayed as a 2d game, and one of the gameplay features was to be able to jump (including over obstacles), as well as toss projectiles over walls. to showcase this more with my game I had shadows and I wanted them to look as youd expect shadows to look in a 2d game (with some artistic stylizing as well). with sprite renderers and the default sprite shader alone, this meant that I had to eventually start using masks everwhere to prevent certain renderers rendering over other renderers that are considered elevated or on top of another. I eventually decided that this wasnt worth the hassle of setting up, because I preferred the "default" approach, and working with masks and plenty of code to get it work wasnt default to me. so i made the switch to 3D because it fit what I wanted more, it did exactly what I wanted it to and it was easier to fake a 3D game to look like a 2D game.

    In 3D then, you can see how the sprite would only be visible from the cameras point of view, but not from the directional light (the character is using a custom shader that I wrote). If i were to use the provided lit shader, I'd have to modify it to render both faces, but then the other side of the renderer wouldnt be lit. If the light direction was from the other side, then the sprite renderer would be fully lit, but the shadow would cast the other way (to solve this I had to use 2 separate lights, one for lighting the sprites and the other for casting the shadow). I also had underground areas so I had to account for that too.
    upload_2022-4-11_11-3-12.png upload_2022-4-11_11-7-36.png
     
    Xiangting_Su and EvOne like this.
  10. MatthewFox3

    MatthewFox3

    Joined:
    Apr 14, 2022
    Posts:
    1
    I personally sometimes put a camera, and sometimes not, it depends on how much it takes to render the characters and their quality in order to load less RAM.
     
    Xiangting_Su likes this.
  11. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    253
    Thank you @print_helloworld for the details!

    I see what you mean now. And even switching to 3D, to make it look like a 2D game, there were still workarounds needed because 3D Lights only light the Sprite Renderer from one side.

    Because of this, you either had to (1) create two 3D Lights - one for lighting the Sprite and one for casting the shadows (in the right direction) because even with a bi-directionally-lit custom Shader, the shadows would still get projected on the wrong side as seen on your screenshot on the left.

    Either that, or (2) to create 2 Sprite Renderers facing each way (one facing the camera, the other facing the other) so that one casts the shadow and the other gets lit from the camera's POV. Though I'm guessing this would require the Sprites to be symmetrical in order for the shadows to look correct too. Is that true?

    Also this is also an interesting point you brought up too. Do you happen to have a screenshot of this? Just to be sure we understood the issue correctly. Thank you!
     
    hemendrasingh likes this.
  12. diversitytipped

    diversitytipped

    Joined:
    May 12, 2022
    Posts:
    3
    That's so interesting thread
     
  13. PBKitty

    PBKitty

    Joined:
    Dec 23, 2021
    Posts:
    45
    I am not currently using the 2d renderer, but would consider it if it met my needs.

    Both 2d orthographic and mixed 2d and 3d scenes.



    I would prefer that 3d objects not be handled any differently by default. I mix 2d and 3d in a single project.

    I use 'render object,' as well as depthnormals and outlines. These are mostly used for custom layering, masking or stylized lighting, other than outlines which is used for... outlines.

    I use shadergraph for the usual shader-making reasons.

    Ideally, being able to light 'the 3d object from the perspective of the camera' as if it were a sprite, to make the lighting consistent between 2d and 3d objects when using 2d lighting. Both in terms of receiving lights and using the screen-space outline to cast 2d shadows.

    Allowing the screen depth of a 3d object to affect 3d shadows would be nice.

    It would be great to make masking 3d objects as simple as it is to mask sprites.

    While not exactly lighting, it would be nice for the rendering layer to be exposed on mesh renderers- you can edit it via script already and it is useful in 3d. For instance, I use it to mix procedurally generated meshes with sprite mechanisms such as the chains and wheels of a bike which are meshes that are meant to look 2d.


    Proper tangents on sprite meshes. This has been a total thorn in 2d users' sides from the beginning of sprites in Unity, and the single thing that would make me more interested in the 2d renderer. Of course, ideally this would be done for regular URP and BIRP as well, just because there is no reason I can imagine to not have proper tangents on sprite meshes. It makes making custom lit sprite shaders a real pain.

    Generally speaking, sprites, spriteshapes, and rigged sprites responding to 3d lighting even when rotated.

    It would be really nice for the rigged sprite editor to be able to export 3d meshes with 3d bones rather than sprites, the way that Anima2d(which the 2d rigging package was based one) did. This would allow for better integration between 2d and 3d in some cases, as well as allowing for exporting unity rigged sprites into 3d software for texture baking and the like.

    I use a perspective camera sometimes, to allow for proper environmental perspective.

    I do not yet, because it was introduced after I made my own solution. I would definitely consider using it in the future.

    I would like to build to be able to set an arbitrary 2d plane.

    Sprite shape splines allowing 3d positions for nodes would be useful.

    Overall, I like the ability to just treat 2d objects as flat 3d objects and don't want to move away from that paradigm. It is one of the best reasons to use Unity rather than a few of the other 2d engines.

    I dislike the decision to make a separate 2d renderer, which feels like it will inevitably lead to the renderers drifting apart in features and support(no offense, but this has already happened with Unity and render pipelines multiple times), as well as making it even harder to deal with assets authored for any given renderer. There currently isn't much value in the 2d renderer for me, since I don't think that the 2d lighting is enough to justify breaking my existing projects.

    I am still not sure what there is under the hood that requires splitting off a separate renderer, but I am willing to accept that there might be technical reasons to require the branch rather than using renderer features for 2d lighting, etc. I look forward to seeing how it develops, in any case.
     
    Last edited: Jun 19, 2022
    Xiangting_Su likes this.
  14. DoctorShinobi

    DoctorShinobi

    Joined:
    Oct 5, 2012
    Posts:
    219
    The 2D pipeline should support opaque + depth textures. I tried switching from URP to the 2D renderer, but it broke a water shade I made.
    When I'm using the URP renderer the pixel-perfect camera doesn't work
    upload_2022-6-28_10-43-52.png

    This leaves me in a situation where no matter what renderer I use, I either lose the ability to make a water shader or to have pixel-perfect graphics. Both are things that feel like they should be supported by both render pipelines.
     
  15. PBKitty

    PBKitty

    Joined:
    Dec 23, 2021
    Posts:
    45
    I hadn't realized that they had done this. Absolutely maddening- and a good example of the sort of stuff I'm worried about in splitting off a separate renderer.
     
    DoctorShinobi likes this.
  16. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    • Which 3D lighting features are required for the 2D objects in your game? How are they used?
    Directional lighting. Sun etc.
     
  17. jonjons

    jonjons

    Joined:
    Oct 13, 2016
    Posts:
    41
    The one thing missing that anyone can notice right away, and also quickly gets pushed/lost into the many unanswered questions. Its the option to draw multiple sprites into one single sprite ( draw ). Game maker studio has the "surfaces", even godot with their clunky tileSets have the "viewPort" option...

    Unity has the ussually deities / divinities of intellectuality in one post, about the subject, argumenting why this a good or a bad thing.
     
    Last edited: Jan 11, 2023
    PBKitty, MousePods and id0 like this.
  18. AnaWilliam850

    AnaWilliam850

    Joined:
    Dec 23, 2022
    Posts:
    36
    I was about to start a project and was actually not sure if the 2D Renderer can handle 3D objects, so thanks for the update and the information
     
  19. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,079
    Isn't RenderTexture similar to Godot's Viewport? https://docs.unity3d.com/Manual/class-RenderTexture.html

    EDIT: Nevermind, it's nowhere near the usability of Godot's Viewport.
     
    Last edited: Jan 18, 2023
  20. jonjons

    jonjons

    Joined:
    Oct 13, 2016
    Posts:
    41
    2D Renderer can be added to a 3D object. All 2d is being draw on a 3D plane... ( dont blame be for changing the post subject :D)
    I mentioned the option to render multiple sprites into one image. I havent found anything that could to this, except maybe make the 2d draw calls in a script.
     
  21. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,087
    In answer to the question...

    by avoiding URP. And utilising the benefits of Builtin.

    URP isn't fit for purpose, despite repeated attempts to use it at major "update" milestones, it's a pig without makeup.
     
    PBKitty and enhawk like this.
  22. Spazius

    Spazius

    Joined:
    May 22, 2018
    Posts:
    16
    I heard camera stacking is a workaround to allow mixing 2D and 3D, but with pixel perfect camera that gets you hit with "pixel perfect camera won't function properly if stacked with another camera", which is to say it'll be disabled entirely apparently. BiRP allows stacking pixel perfect cameras, either without issues or despite the issues.

    I would mostly prefer to make characters which have distinct features as pixel-snapped sprites, and limbs in between skinned mesh renderers able to be rotated and to take advantage of realtime IK and bone physics in 3D space. Upscaled render target affecting 3D meshes the same as 2D sprites is definitely helpful for this.

    A nice to have feature would be to be able to choose opaque alpha clipped sprites instead of transparent alpha blended, to get the benefits of per pixel depth sorting and to reduce overdraw as a bonus.

    Edit: Stacked cameras must have the same renderer type, so stacking is not an option. No idea what a functioning workaround is for mixing separate 3D and 2D renderer cameras.
     
    Last edited: Jan 24, 2023
    Unifikation likes this.
  23. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,514
    This is kind of possible right now. A hand-crafted shader can do it based on Sprite-Lit-Default. For Shader Graph, you can use an URP Unlit Shader Graph as the base BUT it won't let you use the Light Textures - so you create a custom node which samples _ShapeLightTexture0 (and 1, 2, 3). I can't remember if it sorts it right though, so try that then check the Frame Debugger to verify it's drawing front-to-back.
     
  24. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    I think it can be better. I make a lot of 2D games and sometimes they have 3D in them. We don't use URP because it always brings up issues that slow down or simply don't work in production. From a time and cost perspective, it's not viable to use URP in 2D games production.

    Out of the box BiRP suits all aspects of production in 2D games, including adding 3D elements, directional normal lighting, pixel perfect camera etc. I wish URP got more attention and feedback, from these kinds of threads. In reality these threads are made, comments are posted, on how developers would like to see existing feature from BiRP brought over to URP. We get "thanks for the feedback" and years pass with nothing being addressed in URP / 2D!
     
    Last edited: Jan 25, 2023
    useraccount1 and Unifikation like this.
  25. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,087
    Have almost exactly the same reasoning.

    But for others reading this... there's another couple of huge benefits that are easy to tap into for Builtin Renderer:

    1. Very easy to find optimisations strategies you can almost copy verbatim and see big gains in frame stability and frame rates

    2. The methods for adding features from 3D to your 2D just work, when using Builtin

    3. Shaders of all sorts are available from a decade of development by the old school of devoted Unity users

    4. Most of the stuff on GitHub that's good is from these former eras

    5. You can use an older version of Unity... and this is more important than just about anything else.
     
  26. patrickjarnfelt

    patrickjarnfelt

    Joined:
    Jun 24, 2013
    Posts:
    28
    I have an exciting use case if I might say so myself :)

    I made a separate thread about the problems the pixel-perfect camera with this method yields: https://forum.unity.com/threads/pix...-isometric-camera-rotation-solutions.1405975/

    What kind of game are you making? What perspective, genre and art style?
    I am making a 2D isometric snowboarding RPG in a pixel-art style and have chosen to make it with 3D physics to simulate elevations and the physics of snowboarding more naturally as well as being able to jump to different elevations. I have therefore made a "blocky" world with 3D colliders and rotated the camera to an isometric rotation (35,45,0). We are using the 2D tilemap to build the visuals of the environment and sprites for all the elements.

    Something like this (scene view, but also the camera’s view):


    Game view is something like this:
    Jumpeers and Lift.jpg

    Now comes the funky part. Everything has 2D sprites associated with them and every sprite is then rotated to match the camera angle and then offset according to the world height so we still have sorting dependent on elevation.



    Which URP features are required for the 3D objects in your game? How are they used?
    Nothing. We don't show the 3D objects. Only use the 3D physics.

    Which 2D lighting features are required for the 3D objects in your game? How are they used?
    Same

    Which 3D lighting features are required for the 2D objects in your game? How are they used?

    Do you use a perspective camera in your game? If so, could you elaborate on your reasons?

    Nope. Isometric makes most sense.

    Do you use camera stacking in your game? If so, how is it used?
    Yea. Rendering pixelated effects that is used for the UI

    Describe how you would like to construct a scene that has both 3D (with volume) and 2D (flat) assets?
    I would love to be able to switch to 2D view, but it would be the isometric camera. I would love to be able to switch between 3D objects view and 2D sprites view.
     
  27. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Thanks for all the feedback folks! :) I'm closing this thread now, but please start a new thread in this board if you have more to share about producing games that mix 2D and 3D in Unity.
     
Thread Status:
Not open for further replies.