3D Volume Rendering

Aug 8, 2011 at 4:07 PM


I am currently working on this requirement wherein I need to construct a 3D Model at runtime - i.e. given a set of realtime data like height, the co-ordinate at which the height is obtained from, etc, I need to construct a scaled down but accurate version of the real world object, for eg. a house. Adding to the complexity, well, the user can zoom in/out, rotate the model and also select parts of the model.

I do want to make use of the Balder 3D engine to realize the same, but I wish to confirm - Can a 3D volume like a House be rendered at run time using Balder and Silverlight 4? (not using .ase files)

If yes, what classes of the kit should I use to achieve this as I have never worked on 3D before :( , a helping hand is required.

Thanks in advance.


Aug 8, 2011 at 5:05 PM


you can programmatically define 3D objects in Balder. Also Balder provides a set of primitives such as boxes, cylinders and such that you can use to build a 3D scene from.

For programmatically creating 3D objects, you should have a look at this tutorial : http://www.ingebrigtsen.info/post/2010/08/01/Balder-Tutorial-Creating-a-Mesh-programatically.aspx

The rendering will happen at runtime, but complexity does matter for the SL4 version. The SL4 version of Balder is software rendering, due to lack of hardware capabilities in SL4. But with SL5 that will be released later this year, hardware acceleration is added. Soon there will be a new major release of Balder for SL4 and 5, with optimizations and cleanup - but most of the effort targeting the SL5 version, which will also give you better rendering quality and more features as well. 


Hope this helps,


Aug 9, 2011 at 4:19 PM

Thank you Einar for the quick response. Building a framework like Balder from scratch is simply Awesome!!.

I went through the tutorial you have published and it was indeed very helpful. I tried to build a volume by making use of the primitive Box entity, the only issue is that the data that I need to render is pretty big :( >70,000 vertices, the browser hung on this occasion.

I also did try the other approach as illustrated in the tutorial, I am in a bit of a fix here as well :( because the shape of the object to be rendered will not be known to me in advance, i.e. unlike a cube which has 8 vertices, 12 lines/ faces, hence connecting vertices to each other is an issue as the shape is unknown.

Is there a way to render such bulk volume information?



Aug 19, 2011 at 4:17 PM

Hi, sorry for a delay in answer,

I'm not 100% sure what in the rendering pipeline that would cause it to hang. Do you have the possibility to run the Ants profiler or something and give me a dump of that so I can see if there are some obvious pain-points. 
One thing that I can see, could be that lighting kicks in - which is a heavy operation. But also drawing the lines in general might be a bit too much for it. 

Moving to hardware rendering with SL5 would be the only thing that would solve this.

There are two issues that arises with that though : 

- Dynamic mesh generation is not fully supported yet in the SL5 version of Balder
- Line drawing is not added yet