Sign in to follow this  
ChristOwnsMe

Unity 2d Lighting

Recommended Posts

ChristOwnsMe    374

I am curious if anyone with more experience than I could explain in a general way how games like Ori and the blind forest and Rayman Legends light their scenes. There seems to be a lot of artistic light that is used just for blending purposes, like in this screen:

http://static2.gamespot.com/uploads/original/536/5360430/2562384-ori-screenshot17.jpg

All the lighting in the game seems to pulsate, so I am wondering if maybe they just use shaders and a texture to blend the light/color with the diffuse textures behind them? I am not sure though.
 

I am using Unity and am new to game programming and am just curious if anyone knows or could guess what their workflow looks like for lighting their scenes.Thank you.

Edited by ShadowMan777

Share this post


Link to post
Share on other sites
aconstlink    131

That editor is absolutely amazing and they certainly put a lot of work into it! Great work.

 

I think, the lighting is done either with normal maps or depth maps on top of the diffuse textures. If you have normal or depth data, you can basically light a 2d surface like a 3d surface. See bump mapping for example. 

Share this post


Link to post
Share on other sites
Steffen Unger    131

Hey there, I guess i can shed some light on this... hehe

 

One thing you should know, in comparison to Rayman, Ori had a pretty small team. And rather limited ressources, but more ressources in art than in code to generate art.

So many things have been done in a brute force manner, putting artists on solutions, rather than writing tools to do it automatically.

So a lot was just mostly handcrafted.

 

That said, the artists had a few ways to fake (or lets call it simulate, sounds more professional) lighting.

One way of simulating it was through additive "sprites", they didnt use a sprite system in a classical way, it has been 2d planes with enough geo to minimize overdraw, which could placed and oriented freely in 3d space. They could be manipulated by a master shader, brought to motion, masked and so on.

Which brings me to another option to simulate lighting, imho the most genius one, as I never saw anything similar in any production.

The artists had access to a master shader, they could not only animate sprites, but overlay effects, mask them, animate them, stack them etc.

To make a sprite look shaded essentially.

 

All this was done manually, which also helped, giving Ori this handmade feel. But I think many of those tasks could be automated, if only there was enough time to set this up. Maybe later :)

 

here is a quick video done by me to show how a screen gets constructed. but the shading is all already set up, idealyy a set dresser would record the whole process from start to finish to show it properly

 

https://www.youtube.com/watch?v=KvwEprhAaps

 

hope this helps

 

cheers

 

Steffen

Share this post


Link to post
Share on other sites
ChristOwnsMe    374

Thanks for such an awesome and detailed response! That was extremely helpful. It looks like they do a lot of blending with sprite edges so that they can build more modular 2d art that blends together without having to make rigid transitions between pieces.It would be amazing if the blending amount was easily tweakable for the artist. Then they could determine how much each asset should blend with another.

 

 

 

 But I think many of those tasks could be automated, if only there was enough time to set this up.

By this do you mean having preset overlays and effects that someone could quickly setup on a sprite? 

I am working on a custom tool for myself that allows more integration between photoshop and unity. The idea is to allow the artist to load a unity scene and have one PS document that has all his sprites at the right location. HE can take a screenshot of any scene and only see those objects loaded into photoshop. Then he can paint on them in context, and even add new layers, which will then automatically import back into unity and create a new object at that location.

Using this kind of tool the artist could have a layer that he would paint on to manually blend some of the modular pieces for one final iteration and he wouldn't have to manually place it as it appeared exactly where he drew it in photoshop.

I am curious how the artists on ori created their actual art and how they approached painting their modular assets. I am always interested in improving workflows.

Also, what kind of blending is done with the sprites underneath to blend the blurry edges?Thanks

Edited by ShadowMan777

Share this post


Link to post
Share on other sites
Steffen Unger    131

By this do you mean having preset overlays and effects that someone could quickly setup on a sprite? 

 

ideally the setdressers would just set up light sources and the rest of the overlays generate automatically, just with enough control for the artist to influence the output if needed. But thats just me, I barely did any setdressing on Ori, i don#t even know if any of my setdressing is still part of the game 

Share this post


Link to post
Share on other sites
ChristOwnsMe    374

I see. Rayman Legends seemed to have a polygonal tool for creating an area where a light source would be applied. This kind of setup seems to be ideal for allowing an artist to select regions where they want their masks and lighting to be applied. Even if the overlays were generated automatically, do you think such a polygonal creation process is still ideal?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this