Page 4 of 7

Re: Pixel art with GLSL cel shade lighting concept

Posted: Sat Sep 29, 2012 1:17 am
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:

Re: Pixel art with GLSL cel shade lighting concept

Posted: Sat Sep 29, 2012 3:03 am
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Sat Sep 29, 2012 4:50 am
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?

Re: Pixel art with GLSL cel shade lighting concept

Posted: Sat Sep 29, 2012 5:49 am
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Sat Sep 29, 2012 8:18 am
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Sat Sep 29, 2012 2:11 pm
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Mon Oct 01, 2012 3:18 am
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Thu Oct 11, 2012 4:25 pm
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Thu Oct 11, 2012 5:41 pm
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.

Re: Pixel art with GLSL cel shade lighting concept

Posted: Thu Oct 11, 2012 11:28 pm
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.