Hi Carsten,

I inserted some tracing into the relavent OpenSG function calls and this is 
what I can tell you up to now:

---------------------------------------------------------------
Window::frameInit()
MaterialDrawable::renderActionEnterHandler() - Add material 16071 to DrawTree
MaterialDrawable::renderActionEnterHandler() - Add material 16076 to DrawTree
MaterialDrawable::renderActionEnterHandler() - Add material 16145 to DrawTree
MaterialDrawable::renderActionEnterHandler() - Add material 16145 to DrawTree
MaterialDrawable::renderActionEnterHandler() - Add material 16145 to DrawTree
RenderAction::stop() -> start draw tree traversal..
MaterialChunk::activate() - Activate materialChunk 16086
Window::frameExit()
---------------------------------------------------------------

16071 is the material on materialGroup1
16076 is the material on materialGroup2
16145 is the material on materialGroup3

The materialChunk that gets activated (16086) belongs to material 16071.
So the materialChunk of matGroup3 seems to be not respected during rendering. 
The materialChunk of matGroup2 also not, but as this is a really small geometry 
its hard to evaluate. :-(

Do you have some ideas where I should try to trace some more information to get 
that clearer?

Thanks,
Michael



-------- Original-Nachricht --------
> Datum: Tue, 24 Jan 2012 22:38:15 +0100
> Von: Michael Raab <michael-r...@gmx.de>
> An: "opensg-users@lists.sourceforge.net" <opensg-users@lists.sourceforge.net>
> Betreff: Re: [Opensg-users] OpenSG1.8 - Material Error

> Hi Carsten,
> 
> Von meinem iPhone gesendet
> 
> Am 24.01.2012 um 22:13 schrieb Carsten Neumann <carsten_neum...@gmx.net>:
> 
> >    Hello Michael,
> > 
> > On 01/24/2012 02:55 PM, Michael Raab wrote:
> >> Am 24.01.2012 um 00:09 schrieb Carsten
> Neumann<carsten_neum...@gmx.net>:
> >>> On 01/23/2012 07:47 AM, Michael Raab wrote:
> >>>> Node
> >>>>   - MatGroup1
> >>>>    - Geo1
> >>>>   - MatGroup2
> >>>>    - Geo2
> >>>> Node
> >>>>   - MatGroup3
> >>>>    - Geo3
> >>>>    - Geo4
> >>>> 
> >>>> Geo1 and Geo2 are rendered correctly, Geo3 and Geo4 are rendered with
> >>>> wrong material.
> >>> which material is used for Geo3, Geo4? One from MatGroup1, MatGroup2
> or
> >>> something different entirely? Is the used material for Geo3, Geo4 view
> >>> dependent?
> >> 
> >> Geo3 and Geo4 have a material (I'll call it mat3) that is completely
> different from the Materials that are used for Geo1 and  Geo2.
> > 
> > just to be sure: the material of Geo3, Geo4 should not matter, since 
> > they are below MatGroup3 only the material of MatGroup3 should be used 
> > for them.
> 
> May be I was not precise enough. Each MatGroup points to a unique material
> that should be used for the geo's below. The geo cores itself should't
> point to any material.
> 
> > 
> >> Material properties seem to have no real Impact. But if I switch
> lightning on for mat3 the geos turn completely white if it  turns off it 
> seems to
> be not lit but gets the diffuse color of mat2... So it seems that the lit
> property was respected whereas other properties are completely ignored... I
> have no clue...
> > 
> > hmm, just a thought: are you running any GraphOps as part of your 
> > loading (perhaps the defaults)? Anything like SharePtr-, Merge-, or 
> > MaterialMergeGraphOp that could possibly be sharing objects that are not
> > meant to be shared are suspect...
> > I don't have a precise idea how that could cause the effect you are 
> > seeing, but it could be a hint to either getting a smaller test case or 
> > locating the problem.
> > 
> >>>> A huge problem is that this happens only in a large
> >>>> context, that means if I load only these two node structures
> everything
> >>>> seems to be fine. So producing some small and fancy example is
> currently
> >>>> unfortunately not an option. :-(
> >>>> I do not have any ideas where to start the search for the part that
> is
> >>>> broken inside the render tree. Does someone has any ideas how to
> proceed?
> >>> 
> >>> Hmm, I think the first thing to isolate should be if the error happens
> >>> when constructing the DrawTree or when processing it: what material is
> >>> used in MaterialDrawable::renderActionHandler() when calling
> dropFunctor()?
> >> 
> >> I'll try to find out. But could you give me a  rough idea at which
> stages the DrawTree is created, when the actual rendering starts and which the
> main procedures are? That is one of the few things I haven't completely
> understood within OpenSg....
> > 
> > The DrawTree is built while the scene is traversed by RenderAction. The 
> > callbacks on the various NodeCore types either affect which children to 
> > visit or build up the DrawTree (by calling e.g. 
> > RenderAction::dropFunctor(), RA::dropLight()). The draw tree implements 
> > the state sorting by grouping objects with the same material into the 
> > same sub-tree.
> > Actual rendering is only done afterwards from RenderAction::stop() by 
> > traversing the DrawTree and calling the functors stored in the leaves.
> > 
> > For Geometry the RenderAction callback during traversal is 
> > MaterialDrawable::renderActionHandler(), which drops a functor pointing 
> > to Geometry::drawPrimitives() into the DrawTree, together with a pointer
> > to the material to use. When going through the DrawTree the state 
> > associated with that material is activated and the functor called.
> > 
> I'll check tomorrow.
> 
> Thanks,
> Michael
> 
> 
> >    Cheers,
> >        Carsten
> > 
> >
> ------------------------------------------------------------------------------
> > Keep Your Developer Skills Current with LearnDevNow!
> > The most comprehensive online learning library for Microsoft developers
> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> > Metro Style Apps, more. Free future releases when you subscribe now!
> > http://p.sf.net/sfu/learndevnow-d2d
> > _______________________________________________
> > Opensg-users mailing list
> > Opensg-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/opensg-users
> 
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to