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
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 ?
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:
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.
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 :
b)use second camera with order smaller than the main camera.
How Shiva works underneath
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
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?
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
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:
And with IsoRenderer:
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.
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?
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.
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 :).
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
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.
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.