AuthorTopic: Realtime Rendering of 3d Meshes as Pixelart  (Read 128112 times)

Offline Cyangmou

  • 0011
  • **
  • Posts: 929
  • Karma: +3/-0
    • cyangmou
    • http://pixeljoint.com/p/32234.htm
    • cyangmou
    • View Profile
    • Pixwerk Homepage

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #90 on: October 03, 2015, 02:52:38 am
That seems slightly problematic:


(remade gfx for Bub-n-Bros. Lots of colors (24 - 266 per icon), no dirty tools used (not even lowered opacity), coherent on a pixel level)

On a personal level I won't consider this as pixel art, because there is no deeper meaning behind where which colors went and I can't see any mastery in those sprites just from the technical approach of drawing. It seems much more like index painting or art "made with pixels"
On the questions of outlines: not everything has an outline, sure. In Howards case we definitely have an outline though - one which isn't clean.
What I meant is that no pixel artist who places colors intentionally would use more than 4 colors per AA, because it's really hard to manage. It's possible, sure - I did it on my own - sure. It's not really economical if it comes down to the time you have to invest to get it right though.

For me pixel art is the art which uses consciously placed pixels to get the idea across. This means mainly clean and crisp.
But we can discuss what and what's not pixel art in the general discussion, please don#t let's start this discussion in Howie's thread, which should stay as clean as possible for his awesome work.
"Because the beauty of the human body is that it hasn't a single muscle which doesn't serve its purpose; that there's not a line wasted; that every detail of it fits one idea, the idea of a man and the life of a man."

Dev-Art
Twitter

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #91 on: October 03, 2015, 03:39:25 am
I don't really want to get into a discussion of what is or isn't pixel art, rather, I was just pointing out a contradiction in what you said; That the originals, which were pixeled, are pixel art, and these, which were also pixeled [ie each pixel carefully hand-placed with 1px brush], directly by refining the original pixel art, are not pixel art, according to your criteria.
It seems clear to me that a criteria which is self-contradictory is not one that Howard ought to use in judging the 'level of similarity to pixel-art' of his results.
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline ptoing

  • 0101
  • ****
  • Posts: 3063
  • Karma: +0/-0
  • variegated quadrangle arranger
    • the_ptoing
    • http://pixeljoint.com/p/2191.htm
    • View Profile
    • Perpetually inactive website

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #92 on: October 03, 2015, 10:04:42 am
ptoing: Hmm - but one that only affects the shadowed areas? Yeah, I can do that. :D

Yeah, basically something where the z-depth defines a pretty on/off kinda scenario for the shadow of a specific limb.

Here you can also see how his arms change brightness as they move to and away from the "camera midpoint" or what you would like to call it.
There are no ugly colours, only ugly combinations of colours.

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #93 on: October 03, 2015, 02:46:12 pm
I *think* the smartest way to go about that is to change the gamma of the occlusion map. Stuff is not darker the farther it's away in those sprites, as the highlights tend to be equally bright, it's just that the highlights become less big. Also, I think you need to clamp your RGB values more. RGB should be clamped so it doesn't go darker than the darkest color, resulting in areas of dark color. For example, if the darkest color is RGB(X,Y,Z) and the lightest color is RGB(U,V,W), the light value which is clamped to (0,1) should be clamped to (X,U) on the blue axis, (V,Y) on the red axis, etc. Might be worth trying out.

Offline Howard Day

  • 0010
  • *
  • Posts: 222
  • Karma: +0/-0
  • Hey, I'm a doofus.
    • View Profile

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #94 on: October 05, 2015, 09:38:05 pm
Cyangmou: Well, First of all, I'm tickled you took a look at it, at all! Thanks. :D And I completely agree, this is in no way pixelart. It's a 3d model with trickery - but if I can make the tricker fool the eye into thinking, even a little, that it is pixelart, then I will consider the experiment and method to be a success! I can get the outlines cleaner, and reduce the colors per plane, as you said - I've made some major improvements on those fronts here lately. As for the model pre-processing to get the right input into the shaders, it's really not that much of an issue - most is done automatically. The rest is just building the model with the results in mind - literally no different from any other type of 3d modeling. I totally agree that the mech isn't the best shape for this sort of thing - that's entirely intentional. If I had started with a shape that was easy to translate into pixelart, then what's the point? This is all about doing things the hard way to make sure they work. :D
Ai: Yes - there's no total agreement what pixel art is. Which actually works in my favor a bit - I can definitely edge closer to an indeterminate goal than I can to a hardline set of exact specifications. :D
ptoing: Yes! I can do that exact thing, and have - it's in the screenshots below and in the build! It actually is a great addition - non-shadowed models now have a ton more depth than they used to. One minor downside is that angled view of objects can look a bit odd - see the fighter or 3/4s view mechs. Because it's shading the back half of the model from the camera's view, it's not really taking the lighting into account as shadows actually do.
Gil: and yes, that's exactly what I've done. It simply changes how the lighting UVs are calculated, same as the AO does. I'm also looking into clamping values - but I gotta say, keeping them unclamped allows for a lot more lighting opportunities.

Okay, the build is updated! 3 major additions and changes to speak on:
Pixel Locking: This adds the shader  clamping ability of locking each vert of the model to a pixel location - based on the grid of pixels in the camera render. It can be turned on and off, and has the benefit of making some shapes much, much cleaner - while losing some edge detail because of the need to lock to the nearest pixel.

Depth Cueing: The models are now darkened on local object ZDepth - this currently only works correctly on the static, unanimating models - the walking mechs, as they are made up of many smaller objects, don't have the proper information to determine their depth cues. Currently it's a general solution that's a bit too intense in shadowed mode, and not intense enough in Non-Shadowed mode. Working on adding the switch to flip between those options.

Better Palette managing, and AA quality: I've changed the way the textures/lighting ramps work on the objects - they now have a minimized number of colors with a ton of inter-ramp borrowing. For example the white paint colors actually use the dark metal colors half way down. This is very similar to how actual pixel art color palettes are managed. This has the benefit of making color clusters more unified, making AA in general use less colors, and forcing the end result to be cleaner. I took the number of unique colors from 160 to 90. I am going to get that even farther down.
I've also sharpened up the AA through what else - trickery - to help try and clean up some of the lines.

Anyhow, on to the imagery!




Please, any further feedback would be welcome!

Enjoy!



« Last Edit: October 05, 2015, 10:08:00 pm by Howard Day »

Offline Cyangmou

  • 0011
  • **
  • Posts: 929
  • Karma: +3/-0
    • cyangmou
    • http://pixeljoint.com/p/32234.htm
    • cyangmou
    • View Profile
    • Pixwerk Homepage

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #95 on: October 05, 2015, 11:21:40 pm
looks much better  :y:

actually where / how / with which programs will this shader actually work?
"Because the beauty of the human body is that it hasn't a single muscle which doesn't serve its purpose; that there's not a line wasted; that every detail of it fits one idea, the idea of a man and the life of a man."

Dev-Art
Twitter

Offline Howard Day

  • 0010
  • *
  • Posts: 222
  • Karma: +0/-0
  • Hey, I'm a doofus.
    • View Profile

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #96 on: October 06, 2015, 08:49:34 am
Thanks - I still think it needs improvement in a few key areas - though I think it might be time to construct a demo object that follows the needs of a solid mesh that the shader can use. I think I'm going to go with something from Christian Pearce! https://instagram.com/p_e_a_r_c_e/


So this system is currently designed to work with Unity3d projects - though the specifics of how it was done aren't limited to that engine... any modern engine can pretty much do this.

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #97 on: October 06, 2015, 12:01:47 pm
HUGE step in the right direction. I'm even starting to see well-defined clusters appear in certain areas (for example, the lightest skin color on the girl). Biggest issue right now seems to be this:



The yellow part is not straight and looks kinda like when you rotate pixel art with bad software, the dark line that runs over the white just looks very grainy. Stuff like that is still too pervasive in most shots.

Offline Howard Day

  • 0010
  • *
  • Posts: 222
  • Karma: +0/-0
  • Hey, I'm a doofus.
    • View Profile

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #98 on: October 07, 2015, 08:39:43 pm
Gil: Uhm, that's really odd. So what you're seeing there is a combination of like 3 different things. First, the yellow part you indicated is not one piece. it's the stripe around the missile warheads! they're rounded, and tilted slightly to the side. That makes it looks like a reaaaaly janky semistraight line. The darker line over the white area is a factor of the AA being disabled. Turn that on, and it workds perfectly.  I'll work on making it work as well in the non-AA mode!

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Re: Realtime Rendering of 3d Meshes as Pixelart

Reply #99 on: October 08, 2015, 08:25:39 am
Heh, I'm getting confused by which shots enable what and how the model looks.