Skip to content

ShinodaNaoki/isometricPixelarts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Unity]isometricPixelarts

This project is an example of appling depth buffer to quater view style (isometric) pixel arts.

日本語解説: https://qiita.com/Shinoda_Naoki/items/fccdc137747ea4301578

There are some unresolvable situations for isometric sprite z-ordering (see below). I attempt to map textures onto 3D mesh with orthographic projection. It will solve the ordering problem and enables coexists with ordinal 3d objects (such as Terrain).

How to

Prepare materials

  1. make textures size expand to a exponent of 2.
  2. set texture filter mode to Point

  1. set texture Format to which not compressed.

  1. use Custom/SeudoSprite as a shader of material.

Prepare object (corresponds to a sprite)

  1. place 3D empty object.
  2. attach Shed script, Mesh Renderer, and Mesh Filter.
  3. set material, isometric 3D pixel size, and location of the most below pixel on the texture as Pivot.

Camera

  1. Reset transform and attach QuaterView script.
  2. Set view location as Look At.
  3. Set Distance to shift near | far planes of camera.
  4. Set Zoom as pixel per unit.

  • note that transform of camera does not work anymore.

Coraborate with 3D mesh

it looks somewhat collapsed vertically. You may adjust it by wrapping another empty object which Y scaled to 1.155.