Powered by

WastedSpace Colorspace Studio CMS

Copyright © 2018


2D particles layers in orthographic 3D world

Saturday, November 15, 2014 1:37 PM

So in "In The Shadows" I have a problem where while everything is in 3D (most of the things) my camera is orthographic to get the 2D pixel art look. It makes for a weird situation since I need to fake the different layers moving like there was perspective even tho everything is 3D. Losing the perspective really makes it a 2D game, both in the visual and the code. Since I'm kinda new to game dev in general, I look for lots of help online and often don't find simple example of what I'm looking for. Sometime it's for really basic stuff so I thought maybe I can share some of the things I figured out, even tho it must be pretty obvious to developers with years of experience.

 

So this is a simple explaination of how I made the floating dust particles in this gif :

 

 

What happen with the particles is even more backward when you think about it. Using the unity particle system and some scripting I made those floating dust particle stay in a simple 2D container. I needed to make 2D particles, moving only on 2 axies to get the multi layer feel. One big 3D container of particles would have looked like a flat 2D layer since the camera is orthographic. So here is what I did :

 

I have a bunch of layers in the game. The level layer is the static one where the player move around. The background layer is a slow offset image. I got 4 different 2D particles layers. P1 to P3 are 2D. P1 is in front of the tiles forground layer, P2 and P3 are inbetween foreground and level layer, slightly spaced out and all 3 moving at different speed compared to the player movement to simulate the perspective. I then got a fourth layer, P4, which is a 3D container of particles. This one I can keep like this since it doesnt move around, and the fact that it has a depth makes for particle to be in front of and behind the main level layer.

 

So thats pretty much it. Nothing too fancy. 

 

Discussion

Leave a reply

Name ( required )
E-mail ( required, won't be published )
Wesite