On Oct 7, 4:39 am, Brian Fisher <[email protected]> wrote:
> On Mon, Oct 5, 2009 at 3:40 AM, Ben Sizer <[email protected]> wrote:
>
> > See this picture:
> >http://lostgarden.com/uploaded_images/CuteGodMockup-723198.jpg
>
>
> Ben, I think you may not want depth buffer at all. The reason I say that,
> is that in the mockup you provided above, there is definitely antialiasing
> on all the art (both tiles and characters/items). Z-buffer doesn't work
> quite right with anti-aliasing (or transparency either for that matter).
> Only painters algorithm gets alpha blending right for ordered items.

Yeah, I'm aware of the alpha blending and anti-aliasing issues you can
get. But this isn't my own art-work, just an example of a potential
arrangement of tiles that doesn't easily lend itself to a 2 or 3 layer
approach. Lots of free tilesets are colour-keyed and if they are
converted to use alpha values of 1 or 0 then they should work fine.

> You can set the alpha level for when to write to the
> z-buffer to try and minimize the effect, but you can't eliminate it with
> z-buffer.

Yep. I don't know if you saw the code that I linked to in my last post
but I provided a variable alpha test value for this purpose. It's not
perfect but it does allow you to get some usable results out of
certain tilesets.

> My recommendation would be to figure out how to do it painters algorithm.
> There is really nothing in that mockup that hasn't been done many times just
> using painters algorithm.

In pure 2D that is true, but unfortunately that's not always a great
approach with 3D renderers because of all the texture swapping you can
end up having to do. Premature optimisation? Maybe. But I assume
pyglet has the group and batch classes for a good reason.

--
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to