Hello Michael,

On 2014-09-30 12:28, Michael Raab wrote:
> I would like to highlight selected objects/geometries. Therefore I
> currently go through all materials/materialgroups of the subtree and
> replace the ChunkMaterial by a MPM to render the highlighting effect in
> a second pass. Works but has some management drawbacks..
> I was wondering if there is the possibity to define this behavior
> somewhere near the root of the subtree, e.g. insert a special core that
> defines that after normal rendering of the subtree, the whole subtree
> gets again rendering with a certain highlight material. Has OpenSG
> currently something like this?

Stages can be used to do that, but I don't think we currently have one 
that does exactly:
- render sub tree normally
- render sub tree with all materials replaced by a given one

> If not, do you think it can be
> implemented straightforward? Could you give me a hint how?

You'd create your own core derived from Stage and use that to do your 
two passes over the sub tree below it. For the second pass you'd set 
action->overrideMaterial() (just like MaterialGroup does) to have your 
highlight material take precedence over the materials on the geometry.

The backend representation of a pass is a RenderPartition which is what 
your stage would create internally. An example of a stage that performs 
multiple passes is the DepthPeelingStage in 
System/NodeCores/Groups/Effects/OIT or the ShadowStage.
Unfortunately I think that all stages that run multiple passes are doing 
rather complex things since so far a more straightforward use case like 
yours has not come up - there are of course much simpler stages, but 
they are all single pass IIRC.

        Cheers,
                Carsten


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to