Problem loading Mesh with materials with images

Feb 4, 2010 at 11:12 PM

Hi...

I got this error when i try to load a Mesh with materials mapped with images...

 

~Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Fri, 5 Feb 2010 00:06:04 UTC


Message: Unhandled Error in Silverlight Application
Code: 4004    
Category: ManagedRuntimeError       
Message: System.NullReferenceException: Object reference not set to an instance of an object.
   at Balder.Silverlight.Content.FileLoader.GetStream(String assetName)
   at Balder.Silverlight.AssetLoaders.ImageLoader.Load(String assetName)
   at Balder.Core.Assets.AssetLoaders.AseLoader.LoadMaterials(String aseAssetName, IGeometryContext context, IFormatProvider format, String data)
   at Balder.Core.Assets.AssetLoaders.AseLoader.Load(String assetName)
   at Balder.Core.Objects.Geometries.Mesh.Load(String assetName)
   at Balder.Core.Content.ContentManager.Load[T](String assetName)
   at Balder.Silverlight.Controls.Mesh.Initialize()
   at Balder.Silverlight.Controls.BalderControl.ControlLoaded(Object sender, RoutedEventArgs e)
   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)     

Line: 59
Char: 13
Code: 0
URI: http://localhost:4094/PortfolioTestPage.aspx

 

I have put the image in both Assets Folder and Project root...

 

I will now try to create a material with Balder classes...

Is this possible?

 

Anyway the xaml code is very basic...all ASE files with no complex materials load correctly...

 

<balder:Game x:Name="_game" Width="800" Height="800"  >
                <balder:Mesh x:Name="_lamp"  AssetName="/Portfolio;component/Assets/pyro.ase"/>
</balder:Game>

 

Thx... :)

Coordinator
Feb 5, 2010 at 5:48 AM

Hi,

could you email me the ASE file and textures so I can have a look at it. (einar _at_ dolittle _dot_ com)

In the next release (which is coming very soon) there is support for Materials that can be set programatically and through Xaml. 
You can get a preview of whats coming in the release if you take a look here 

Feb 5, 2010 at 9:22 AM

I will as soon as i get home...

Although i cant load even those examples like audi.ase and other samples which came with the source code, so i dont think it has to do it with my meshs...

Anyway, ill send u a link to get the all project, but dont bother try to find the problem...

I will wait till next version and see if the problem goes, i saw the link, but i get the idea that mesh rotation isnt implemented yet, as u still use camera to simulate rotation...

 

Coordinator
Feb 5, 2010 at 9:48 AM

Mesh rotation is implemented, and scaling as well. The "Programatic" sample uses the camera, but if you look at the Primitives->Box, you'll see that it rotated the Box with a storyboard.