Pixel art with GLSL cel shade lighting concept

Showcase your libraries, tools and other projects that help your fellow love users.
luaz
Citizen
Posts: 83
Joined: Sun Sep 16, 2012 2:55 pm

Re: Pixel art with GLSL cel shade lighting concept

Post by luaz »

GarbagePillow wrote:luaz: Definitely.
I may work on one after the platformer. I should have much more practical experience, and my theoretical intuition won't be the only weapon I'll be bring to war. :awesome:
If you're going to reply to my post, consider posting an (preferably working) example - 99.7% of time time, I already know how to implement the feature theoretically! ;) I don't learn very well from references, etc....
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Pixel art with GLSL cel shade lighting concept

Post by Ensayia »

GarbagePillow wrote:
Ensayia wrote:This is incredibly superb. For some reason, your first example reminds me of Zelda: LTTP.
Ha! That is because I modeled the tree stump after the tree stump in A Link to the Past. I really love the style of that game, in particular the fake perspective of walls and cliffs.
Do I know my shit or what?

Back on topic, is this shader a post-render applied to a canvas? I haven't looked at the code.

EDIT: I should have just looked at the code. While I don't understand everything completely it looks mighty clean sir. How do you go about generating the lighting maps? I have to imagine doing that by hand is a pain in the ass.
GarbagePillow
Prole
Posts: 41
Joined: Wed Sep 26, 2012 9:19 pm

Re: Pixel art with GLSL cel shade lighting concept

Post by GarbagePillow »

Ensayia wrote:
GarbagePillow wrote:
Ensayia wrote:This is incredibly superb. For some reason, your first example reminds me of Zelda: LTTP.
Ha! That is because I modeled the tree stump after the tree stump in A Link to the Past. I really love the style of that game, in particular the fake perspective of walls and cliffs.
Do I know my shit or what?

Back on topic, is this shader a post-render applied to a canvas? I haven't looked at the code.

EDIT: I should have just looked at the code. While I don't understand everything completely it looks mighty clean sir. How do you go about generating the lighting maps? I have to imagine doing that by hand is a pain in the ass.
Although the lighting could be done with canvases; having a canvas with just normal data and then a canvas with diffuse that gets lit, right now I'm just doing the full effect in a single pass for each object.

As for the lighting/normal maps they are done by making very simple 3d models. I explain it a bit more on the first page. I kinda wonder though if it might be possible to hand paint normal maps... I feel like I would make mistakes, but maybe it wouldn't matter very much when everything is so low detail?
benhumphreys
Prole
Posts: 31
Joined: Thu Sep 13, 2012 2:10 am

Re: Pixel art with GLSL cel shade lighting concept

Post by benhumphreys »

I'm completely addicted to this look. I tried to use Wings3d to make a simple model, but my experience with 3DSMax didn't really help. It's not a very intuitive application. I'll try to find how to do the same normal map idea with Blender maybe.

These shaders are beautiful :)

Edit: Thinking about this more, it's a really awesome technique, but as far as I understand it, it means you'd have to make a 3d model of every asset you wanted shaded. Even with simple models for pixel art, it multiplies the time required for each asset by a huge factor. For more complex models it's even more difficult.

I wonder if there'd be a way to fake something as effective by letting artists "paint" normals with a predefined palette of say nine directions (N, NE, E etc) + straight out of the screen.

I guess it all depends on what the artist is comfortable working with.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Pixel art with GLSL cel shade lighting concept

Post by slime »

You can use something like CrazyBump to generate normal maps, specular maps, etc. purely from a texture, but it won't ever produce results quite like the real deal.
GarbagePillow
Prole
Posts: 41
Joined: Wed Sep 26, 2012 9:19 pm

Re: Pixel art with GLSL cel shade lighting concept

Post by GarbagePillow »

I watched a youtube video about crazy bump. Looks pretty cool. It seems like it maybe uses edge detection to generate the normals, so I'm a skeptical that it will work decently on a lot of the art assets that you would need to create for the game. It might work very well for textures on ground terrain though.
I wonder if there'd be a way to fake something as effective by letting artists "paint" normals with a predefined palette of say nine directions (N, NE, E etc) + straight out of the screen.
I've thought about the same thing and I think its a solid idea. If the direction painting was done in love2d you could see the light update as you worked. Using just a few directions might mean you would need to dither them, but that might be interesting by itself.

Also, just hand painting normals in photoshop might not be too unrealistic if you paint each channel individually, paint in world space rather than camera space.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Pixel art with GLSL cel shade lighting concept

Post by Jasoco »

This is amazing. It also works for me on my Air now too. (Same machine as Kikito) I just have to think of a way to use it.
jonbro
Prole
Posts: 8
Joined: Tue Oct 02, 2012 10:18 am

Re: Pixel art with GLSL cel shade lighting concept

Post by jonbro »

I feel like the api choices in love2d (2d only, but with pixelshaders!) are creating an awesome alternate history.

This is great work garbagepillow! excited to see the full game.
gouda
Prole
Posts: 1
Joined: Thu Oct 11, 2012 5:33 pm

Re: Pixel art with GLSL cel shade lighting concept

Post by gouda »

This is absolutely incredible! It looks fantastic.

Is there any chance you'd be willing to share your wings3d screenshots and the normal maps for the stump and chair? I would love to try to recreate this effect, but I'm still really confused about how to model a pixel art object in 3D and generate a normal map for it.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Pixel art with GLSL cel shade lighting concept

Post by kikito »

If I understood correctly, he didn't model the objects in 3d "perfectly"; just rough shapes. Then he produced the z-indexes for those objects, adjusting the camera so that their contour more or less fitted the 2d drawings.
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests