Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Shiva - 2.5D Isometric engine

Discussion in 'Assets and Asset Store' started by RepoGames, Aug 2, 2017.

  1. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Hello, I present you
    Shiva - 2.5D Isometric engine

    Download: https://assetstore.unity.com/packages/3d/characters/2-5d-isometric-engine-106321

    Shiva is a 2.5D isometric engine inspired by Baldur's Gate engine that handles correct draw order using depth masks. You will no longer encounter any of drawing order issues in your game even when using complex objects. No more cutting sprites. Everything is handled auto-magically in shaders.
    Apart from that it adds some functionality to 2D sprites that was lacking in Sprite Renderer like 3D lights, sprite atlases, tiling, normal maps.

    -Precise per-pixel draw order
    -No artifacts, no manual cutting sprites
    -Grid independent, not tight neither to hex nor rhombs
    -Sprites react to light as if they were 3D
    -Point light / Spotlight / Directional light
    -Normal mapping for 3D Sprite illusion
    -No semi-transparency issues
    -Sprite tiling(repetitive background)
    -Sprite atlas support
    -No 3D, only flat 2D sprites
    -Fast support
    -Easy configuration - only 1 script

    Enjoy !
     
    Last edited: Jan 8, 2018
    Mister-D likes this.
  2. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    250
    Hi,

    You asset look promising :)
    can you do a video to show how configure iso tile ? as well as the available options ?

    Thks
     
  3. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Hello,

    So you would like to have tile-based isometric game, right? No problem.

    This is a rendering engine - you can add your tiles separately, because Shiva doesn't assume you need to use tiles in your game - its very elastic.

    Adding the tiles is very simple - you would simply add a layer with tiles being rendered beneath the object tiles.

    All the available options are listed in the first post:) What exactly do you need?
     
  4. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    250
    I want know if I need depth map for my iso sprites work with Shiva or everything is managed in the engine ?
    Also do you know performance of Shiva ? is there an overhead with hundreds sprites ?
     
  5. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    You dont need depth map for your iso sprites. By default engine will draw them according to their pivot. You use masks only in special cases like big buildings or complicated objects(gates) .

    I've just checked the performance for 1361 objects and it looks like this:
    1.png
     
    Last edited: Sep 5, 2017
  6. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    I bought this tool today. Because there is not much documentation, I am trying to understand it by integrating the player character from the demo with an existing project that has a 2D Toolkit tilemap. The tilemap has two layers, one for the ground tiles and one for trees, rocks, etc. I have set the Sorting Layer on the Shiva 2D player sprite to be the same as the Trees and Rocks sorting layer of the tilemap, but the player character is always rendered behind the tile sprites. Would you expect this to just work with my existing sprites, or do I need to do something extra? For example, do I need to add the IsoRenderer script to the existing sprites? If so, I may have to rethink what I have done so far, because I'm not sure I have that level of access to the sprites used by the tk2dTilemap.

    Thanks...
     
  7. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Hello, thank you for buying Shiva :)
    Its possible to work with 2D toolkit. If you want your 2D toolkit sprites that use SpriteRenderer to be drawn properly with Iso Renderers you simply need to use Iso Renderer instead of Sprite Renderer and thats it :) If you want it to be behind Isomtric layer then you should use Layer material.

    Nevertheless if you want to preserve your SpriteRenderer objects e.g. your background layer with SpriteRenderers be drawn always behind main layer just you can simply either:

    a)Use your material in SpriteRenderer and set order in layer low value like -1 :
    1.PNG
    b)use second camera with order smaller than the main camera.

    Underneath the IsoRenderer use shaders to determine layer draw order by subtracting layer index from 2000 if below, or adding to 3000 if above main Isometric layer
     
    Last edited: Sep 20, 2017
  8. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    I am having difficulty with this. I have abandoned 2D Toolkit for the time being, while I try to understand how this works. Instead, I have written out a collection of tiles as simple SpriteRender sprites, and I then introduce an IsoRenderer sprite. All of the sprites have sorting layer "Default", and I set the SpriteRenderer sprites to have an order in layer value of -1, as you suggest. However, the IsoRenderer sprite is always drawn behind my tiles, as shown below (the half-visible ball sprite is using IsoRenderer, with sorting layer "Default" and material "Opaque")

    I have also tried to use IsoRenderer to render the tile sprites, but it applies a visual effect (shading the left and right edges of the tiles darker) that I do not want. Could you please help me to understand what I am doing wrong here?

    upload_2017-9-22_22-52-35.png
     
  9. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    You need to create your own material(based on sprites-default/sprites-diffuse shader) and set it to your sprite renderer as in my above screenshot. Also you need to set order in layer=-1 and Render Queue on this material to be low e.g. 1500.

    What visual edge effect do you mean ? Can you post screenshot and your tile sprite? Maybe I can fix it for you :)
     
    Last edited: Sep 23, 2017
  10. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    OK, that suggestion worked well, thank you very much. As for the effect seen on the tile, I think it is just that IsoRenderer is applying lighting effects that I am finding surprising in a 2D game. This is what the scene looks like when the tiles are rendered by SpriteRenderer:

    upload_2017-9-25_16-20-2.png

    And with IsoRenderer:

    upload_2017-9-25_16-21-33.png

    Also, in the top image you may be able to see that one of the two humans (the top one, rendered by IsoRenderer) is rendered darker than the other one (rendered by SpriteRenderer). Again, I think this is unexpected light effects (ignore the shadows, they are baked into the sprite), but what puzzles me is, the darker rendering is only applied to certain frames of the animation. When I animate that sprite, with IsoRenderer drawing it, it appears to be walking continuously into and back out of shadow, in a regular pattern.
     
  11. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    So I guess, if these are just intentional lighting effects, it would be nice to know if those aspects of the renderer can be turned off?

    Thanks again...
     
  12. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Yes its darker because sprites react to light so you could change your directional light rotation and see how it behaves. Can you send me this two sprites(tile+person) so I can see whats happening there and find the best way to turn off the lights?
     
  13. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    Regarding the issue with IsoRenderer drawing certain frames of animation differently, I made a video that shows what I mean - hopefully it will make my problem easier to understand. These two animated characters are identical - the same root images and the same code doing the movement and animation; the only difference is that one of them (the one to the upper right) is drawn by IsoRenderer, while the other is drawn by SpriteRenderer.

    https://limegreen-wayne.tinytake.com/sf/MTk3OTkzN182MjY3Nzgw
     
  14. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    Sorry, posts crossed. Yes, of course, what do you want to see - just the underlying images / spritesheet? Not sure how I would send an actual sprite...?
     
  15. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Yes: a single tile sprite and this character animation atlas. If its in spritesheet then whole spritesheet may be ok. Maybe you can post the link here?

    I've never have any of these problems with my sprites(As you can see in demo there are many sprites and also animated) so I need to look at yours to see wheres the difference :).
     
  16. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    OK, files are below. I have only included one of the spritesheets for the animated character, but that came from opengameart.org so you can grab the whole set if necessary: https://opengameart.org/content/farmer-bleeds-game-art

    Thanks for being interested in fixing these issues!
     

    Attached Files:

  17. wrussell

    wrussell

    Joined:
    Feb 26, 2013
    Posts:
    11
    Sorry, meant to add - I create the walk animation frames by using the Unity sprite editor to slice the sprite sheet in "Automatic" mode; the actual animation is done by a script which cycles through the frames and uses them to replace the IsoRenderer's Sprite member in the Update() loop - similar to the animation script in your demo
     
  18. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Well just set Mesh Type 'Full rect' at your sprite atlas for this farmer to work :) Its in documentation :). And use grid count slicing instead of automatic, because automatic slicing creates different sprite sizes for each frame.

    farmer.gif

    About your black tiles: your tiles sprites react to light naturally so they can't be enlightened from both sides thats why they appear black:)
    However I'm going to add 'Unlit support' in next release.
     
    Last edited: Sep 27, 2017
  19. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    1.2 Released:
    -Unlit support
    -Mac OpenGL Core Z buffer fix
    - fixed demo masks
    - Added assertions
     
  20. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
  21. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    And here it goes.... free week has finished ;)
     
  22. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    636
    Hey, nice work! Is this still being supported?

    Was just wondering how you support collisions? are they all purely BoxCollider2D, CircleCollider2D etc types?

    And do you support dynamic interaction within objects? e.g. If I'm making a beat-em up game similar to Rivercity Ransom Underground, would I be able to have the player carry a box around, jump around from different heights etc in the environment?
     
  23. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    65
    Yes its still beings upported.
    Yes. collisions are pure 2D colliders.

    Of course you could do similar game, engine mostly handles proper drawing order with some additional features. Everything else can be customied and implemented.