SetMaterialOnSide doesn't work?

Jun 19, 2010 at 5:34 PM

Hi Einari,

Got my project to work although i cant get Balder.Silverlight4 to work, so i chnge back to Balder.Siverlight

But then i tried to use Bo.SetMaterialOnSide () and nothing happenned, is this implemented?

Jun 19, 2010 at 7:34 PM


I haven't gotten around to do SL4 yet, will do very soon. 

As for the SetMaterialOnSide() method, I found a bug in it and fixed it 2 days ago. So in the latest sourcecode it should work. 

Jun 20, 2010 at 12:44 AM

Hi again :)

I pull the latest source and the box class changed but when it come to if( _facesBySide.ContainsKey(side))  SetMaterialOnSide method it turns out false and do nothing...

My mesh is defined in MainPage like 

<Geometries:Box  x:Name="mshEvolve1" Dimension="512,128,80" Position="100,0,30" Rotation="0,0,0"    Material="{StaticResource blackMaterial}"  IsVisible="True"/>


Jun 20, 2010 at 7:26 AM

You've discovered a bug. :)



The problem is that the pipeline applies the material that you set in Xaml after you have programatically set the material on the side. So, for now, as a workaround till I get the bug fixed - if you just set the materials for all the sides programatically and not in Xaml. I am also adding a task on the Issue Tracker for setting the sides in Xaml btw.


Jun 21, 2010 at 12:21 AM

Ok,'s working now...

I tried to access the mesh contextgeometry but it took me a while to get there with GetAssetsParts...

Then i started to mess around with the vertices to create a morph effect  and sometimes the textures followed the vertices in render, but other attempts led to black holes in the textured map...

I guess that only where the distance from the vertex and the pivot point (0,0,0) increases i don't loose texture..

Other thing i like to try to implement should be a Class Path to make Nodes follow that path with Position, i let u know... :)



Jun 21, 2010 at 6:51 AM

Great. A path follow is something that quite a few have been asking me about, I think I'll put it up as a task as well.