From: phowe++at++csc.com.au
Date: 10/09/2000 23:36:01
Hi everybody,
I'm trying to use channel bins to draw geometry in a particular order. I
basically want to draw an ocean
surface first, then geometry that sits on the ocean (e.g wakes, glare or
glint on the ocean), then all other
opaque geometry, then transparent geometry. To do this I have created 2 new
bins, one for the ocean
and one for ocean glare, and order them, then reorder the opaque and
transparent bins.
I have been having problems with the rendering order not being what I
expected.
I have made sure to set PFCULL_SORT on the channel, and the geosets have
an attached geostate
and have the draw bin set to the desired new bin, as mentioned in the man
page.
When I reset the opaque and transparent bin to a new order, before
creating and setting the order
of the two new bins, it works fine.
If however I create and set the order of the two new bins before the opaque
and tranparent bins
are reordered, things are rendered in the wrong order.
i.e this code renders in the order I expect (ocean, oceanGlare, opaque,
transparent);
channel->setBinOrder(PFSORT_OPAQUE_BIN, 5);
channel->setBinSort(PFSORT_OPAQUE_BIN, PFSORT_BY_STATE, 0);
channel->setBinOrder(PFSORT_TRANSP_BIN, 7);
channel->setBinSort(PFSORT_TRANSP_BIN, PFSORT_BACK_TO_FRONT, 0);
oceanBin = channel->getFreeBin();
channel->setBinOrder(oceanBin, 3);
channel->setBinSort(oceanBin, PFSORT_BY_STATE, 0);
oceanGlareBin = channel->getFreeBin();
channel->setBinOrder(oceanGlareBin, 4);
channel->setBinSort(oceanGlareBin, PFSORT_BACK_TO_FRONT, 0);
This code renders in unexpected order, or at least oceanGlare before ocean.
oceanBin = channel->getFreeBin();
channel->setBinOrder(oceanBin, 3);
channel->setBinSort(oceanBin, PFSORT_BY_STATE, 0);
oceanGlareBin = channel->getFreeBin();
channel->setBinOrder(oceanGlareBin, 4);
channel->setBinSort(oceanGlareBin, PFSORT_BACK_TO_FRONT, 0);
channel->setBinOrder(PFSORT_OPAQUE_BIN, 5);
channel->setBinSort(PFSORT_OPAQUE_BIN, PFSORT_BY_STATE, 0);
channel->setBinOrder(PFSORT_TRANSP_BIN, 7);
channel->setBinSort(PFSORT_TRANSP_BIN, PFSORT_BACK_TO_FRONT, 0);
Does anybody know what the problem may be that would cause this effect? Or
any info on how performer determines the rendering order when using channel
bins.
Thanks for any assistance.
Peter Howe.
This archive was generated by hypermail 2b29 : Tue Oct 10 2000 - 00:42:21 PDT