• Register

An indie game project with the goal of reviving our favorite game type, the epic space adventure! By mixing favorite aspects of classics like StarFlight, Star Control, SunDog, Universe, and Tradewars, we hope to bring what we loved as kids to the current generation. Quirky aliens, arcade space battles, planetary mining, and adventure around the galaxy -- should keep us busy developing for a while. The project is a family affair, Wife on art, son on music, and code-monkeying by me. We are currently in early development for the PC,Mac,Linux platforms... XboxOne or PS4 if we can swing it.

Post news Report RSS StarDiver - 2D Sprite Lighting for Spaceships

We are experimenting with moving away from 3d spaceships in favor of 2D. The big drawback of course was losing the great 3d lighting model. We experiment with a 2D normalmap lighting system w custom sprite shader and lighting images.

Posted by on

I asked our new artist to help make some ship concepts as we are struggling with modeling cool ships. To date our game has always used a mix of 2d/3d, but 3d for ships/planets/surfaces and 2d for fx, aliens, ui, etc. He color sketched the following for the lipoc race:

User Posted Image

Looked pretty good and made me rethink using 3d ships. If we could make 2d look good enough, it really would save a ton of modeling time, so I asked him to make a ship overhead view for the Veelow race. A while later I had this:

User Posted Image

hmmm... cool concept, so I put it in the game as a 2d sprite. As I feared I couldn't get any form of lighting on a 2d quad to look anything but terrible. The lighting for the 3d models was great... can't backtrack to have virtually no lighting for 2d sprites, and for SURE don't want to go back to the stone ages of making a ton of sprites w manually painted lighting at various angles. I remembered an awesome kickstart a while back for lamplight. For those unfamiliar, this is REALLY worth a look:


So I looked into doing something similar in Unity. The Unity community being huge and awesome, low and behold someone already beat me to it (Huge kudos to Kencho):Kencho-dev-blog.blogspot.com.esSo I started implementing a custom shader based on Kencho's work. I struggled a bit at first but I'm thrilled with the end result... 2d realtime lighting that really looks great/3dish. Note the image below is 3 screenshots merged w the same ship at multiple angles so you can see 1:1 pixel of the lighting:

User Posted Image

The basics is a custom shader to use a normal map, which is generated from a horiz lighting and vert lighting. Here are my two lighting images:

User Posted ImageUser Posted Image

And of course I need a gif to really show the effect:

User Posted Image

I still need to balance out the left/top lighting images and tweak the base image to not have lighting from the front baked in, but I'm pretty happy with the results.

A second example of new 2d lighting on a new ship:

User Posted Image
User Posted Image

Comments
{HEROIC}Doci
{HEROIC}Doci

Im glad that its working like this mate ^^
3d modelling takes tons of time !

Reply Good karma Bad karma+3 votes
friken0 Author
friken0

3d modeling was going super slow for us as we are pretty new to 3d modeling. I'm pretty thrilled w/ the visual results of the 2d w/ lighting system now. Thx for the feedback

Reply Good karma+1 vote
TheVidmaster
TheVidmaster

check this out: Millionthvector.blogspot.de

Reply Good karma Bad karma+3 votes
friken0 Author
friken0

nice sprites

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
StarDiver
Platforms
Windows, Mac, Linux, XONE, PS4
Developer
GravityRide, LLC.
Engine
Unity
Contact
Send Message
Homepage
Gravityride.com
Release date
Game watch
Follow
News
Browse
News
New
Post news
Report
Report
Share
Related Games
StarDiver
StarDiver Role Playing
Related Engines
Unity
Unity Commercial
Related Groups
GravityRide, LLC.
GravityRide, LLC. Developer & Publisher