Hi,
Consider the following patch, where the [gemhead] is connected to all [separator]s (I'm not so good with ascii-art):
[gemhead] ... [separator] [separator] [separator] | | | [color 1 0 0] | | | | | [translateXYZ...] [translateXYZ...] | | | | [square 2] [square 2] [square 2]
(with suitable values in translations so that all squares are visible)
The 'issue' is that all squares are red. Is it normal/expected???
I would expect only the square in the left chain to be red.
Is it that [separator] only separates certain things and does not separate others? If so, where can I find a list (or a rule) that tells me what it separates and what not?
You may suggest that I can create separate [gemhead]s, but if I want the resulting scene( to be rendered into a texture all chains must be "children" of a single [gemframebuffer] and so of a single [gemhead] and I can only "separate" them with [separator]s.
So up to now my only solution is to put a [color 1 1 1] on every object that I don't want to be coloured, but that's a bit unhandy....
Matteo Sisti Sette a écrit :
Hi,
Consider the following patch, where the [gemhead] is connected to all [separator]s (I'm not so good with ascii-art):
[gemhead] ... [separator] [separator] [separator] | | | [color 1 0 0] | | | | | [translateXYZ...] [translateXYZ...] | | | | [square 2] [square 2] [square 2]
(with suitable values in translations so that all squares are visible)
The 'issue' is that all squares are red. Is it normal/expected???
yes.
I would expect only the square in the left chain to be red.
Is it that [separator] only separates certain things and does not separate others? If so, where can I find a list (or a rule) that tells me what it separates and what not?
separator only separate geometry. pix_separator separate textures.
i think nothing separate the color.
so you can either using trigger so that the red square is rendered last, or use a color object after each separator.
You may suggest that I can create separate [gemhead]s, but if I want the resulting scene( to be rendered into a texture all chains must be "children" of a single [gemframebuffer] and so of a single [gemhead] and I can only "separate" them with [separator]s.
So up to now my only solution is to put a [color 1 1 1] on every object that I don't want to be coloured, but that's a bit unhandy....
use trigger then.
Cyrille
cyrille henry escribió:
separator only separate geometry. pix_separator separate textures.
i think nothing separate the color.
So am I the only one who misses an object that just "separate everything"????
By the way, as far as I have experimented, separator also "separates" [GEMglBlendFunc], that is, this object applied after a separator, affects the blending function only of the "subchain" under it, and does not apply to other "subchains", no matter the trigger order. (fortunately for me)
Another thing that [separator] does separate independently of trigger order, is [alpha]. (fortunately again)
So, since I can't tell whether blending and alpha belong to "geometry" or to "textures" (I'd say none) the question remains of which things (not related to geometry) [separator] separates.
And by the way, what's the philosophical justification for [color] not being separated and [alpha] being separated?
use trigger then.
Well that would oblige me to render things in a given order (namely the coloured square last in this case) that may conflict with other order requirements.
That is, the fact of applying certain things to a given subchain shouldn't be necessarily vinculated to the fact of implying a certain rendering order: they are two different concept and independent requirement... no?
Matteo Sisti Sette a écrit :
cyrille henry escribió:
...
use trigger then.
Well that would oblige me to render things in a given order (namely the coloured square last in this case) that may conflict with other order requirements.
if you wish to render something white, then red, then white, with the same gemhead, you obviously need at least 2 color objects.
That is, the fact of applying certain things to a given subchain shouldn't be necessarily vinculated to the fact of implying a certain rendering order: they are two different concept and independent requirement... no?
it is like this in Gem, because of the way openGL is made. Gem is very close to the way openGL works. if you read all Gem documentation and need more, then you should read a openGL book.
Cyrille
cyrille henry escribió:
if you wish to render something white, then red, then white, with the same gemhead, you obviously need at least 2 color objects.
That's "obvious" only once one knows that [separator] won't "reset" the color to its default value as it does with other things (not only geometry).
If you wish to render something without alpha, then something with alpha enabled, then something without alpha again with the same gemhead, you _don't_ need at least two alpha objects, provided you use separators.