[GEM-dev] "auto 1, 1"--[alpha] with double [gemhead] idiom
Claude Heiland-Allen
claudiusmaximus at goto10.org
Sun Jul 6 18:50:24 CEST 2008
Hi Matthias,
I hope you don't mind me sending this reply to the list too.
Matthias Neuenhofer wrote:
> Hi Claude,
>
> it´s not a bug in Gem the depth sorting follows the render order. Normal
> openGL behaviour.
That's what I suspected, and in that case maybe the wording of [alpha]'s
help patch could be better:
""
Inlet 1: message "auto 1" | "auto 0" turn on/off automatic depth detection
""
I thought this would cache all objects following the [alpha] and sort
them by depth automatically, or something. Now I'm not sure what the
"auto $1" message does at all.
Reading carefully the large paragraph I see it says:
""
Be aware that the rendering order matters, so you probably want to set
the gemhead order number high so that the object is rendered after all
of the non-alpha blended ones.
""
Maybe this could be made more explicit, saying render order of
alpha-blended objects matters as well as alpha vs non-alpha objects.
> In the second way you render your patch it´s well working.
Sure, but naturally the "real patch" has much more complicated geometry,
it would be a major pain in Pd as far as I can tell to do some kind of 3
pass rendering, where the first pass gets the depth of each object, the
second pass sorts by depth, and the third pass actually draws them.
I guess I'm too ambitious :)
Thanks,
Claude
> http://www.opengl.org/resources/faq/technical/transparency.htm
> When using depth buffering in an application, you need to be careful
> about the order in which you render primitives. Fully opaque primitives
> need to be rendered first, followed by partially opaque primitives in
> back-to-front order. If you don't render primitives in this order, the
> primitives, which would otherwise be visible through a partially opaque
> primitive, might lose the depth test entirely.
>
> In a double gemhead patch i see no chance to change. Otherwise with set
> messages to gemhead.
>
> lg
> Matthias
>
>
> Am 02.07.2008 um 19:37 schrieb Claude Heiland-Allen:
>
>> Hi,
>>
>> The attached patch "double-gemhead-auto-alpha.pd" doesn't work as I
>> expect (I don't get any automatic depth sorting). Is there any
>> suggested workaround for repetition with auto alpha depth sorting or
>> is this a bug in Gem?
>>
>> Thanks,
>>
>>
>> Claude
>> --
>> http://claudiusmaximus.goto10.org
More information about the GEM-dev
mailing list