Babylon 3D engine (Updated for Silverlight 5 RTM)

This sample shows a full 3D realtime engine with some advanced features and an integrated collisions system.Live sample : http://david.blob.core.windows.net/babylon/Babylon.htmlUpdatesUpdate: Support for Silverlight 5 (RTM) Update: Integration of the Silverlight 5 Toolkit: h

C# (4.0 MB)
 
 
 
 
 
(20)
10,682 times
Add To Favorites
12/10/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to Ask a Question


  • Browser crash with "Appcrash... Kernelbase.dll..."
    1 Posts | Last Post October 24, 2011
    • I tried rendering a sample bsf using Babylon and got the browser crash. But the babylon sample downloaded works fine. Can u please show what might be the possibilities for such crash?
  • Babylon .bsf model not loading
    1 Posts | Last Post October 20, 2011
    • We tried using Babylon to load a simple .bsf model. The model didn't show up on the browser (other silverlight controls are visible). Please throw some light on these issues.
      
      The sample code used to load bsf is below:
       Surface.Scene.Load(new Uri("http://localhost/babylon/bmv.bsf"));            
              
  • Downloaded Babylon 3D Engine, downloaded nova SDK, fixed references, fixed obsolete code... still not working (Does the current version support Silverlight 5 RC?)
    2 Posts | Last Post September 24, 2011
    • I now get various "XXX does not exist in context" "XXX is not supported by current language" and one "Babylon.dll could not be found" error.
      
      I'm using Silverlight 5 RC
    • Yes it is due to the APi changes between sl5 beta and sl5 RC
      I will update soon Babymon to support sl5 RC
  • Silverlight 5 RC Support
    4 Posts | Last Post September 23, 2011
    • Do you plan to update Babylon for the RC release? If so, do you have an estimate on when this will be done (I know no promises can be made :-))
      
      Thanks.
    • I think I will be available to update the new version next week
    • Does the latest version works with Silverlight 5 RC ?
    • Yes it will
  • how to draw a primitive in the loaded scene?
    2 Posts | Last Post September 01, 2011
    • nice toolkit and also nice engine!
      I imported a 3ds max scene to this engine, and the scene was drawn well, for my app. I need to draw some custom primitives(like a rectangle primitive, that I created with Babylon.Toolkit classes) ,  I wrote the drawing code of my primitive before "engine.EndFrame();"  method but when the app starts, I can't see that inside of the scene. I also checked the drawing code in a sample project with only using Babylon.Toolkit and all the drawing was well, how can I draw my primitive in Babylon engine?
      Furthermore, I have another question: can I draw a Babylon.Toolkit model in the engine?  Alternatively, can I import and draw a single model(like a cube) inside of my scene?
      I hope you help me to solve my problems.
      Thanks
    • Hi VirtualWorld,
      
      the better solution will be to generate your own model. So it can be included in the collision system as well.
      
  • Problems using the code
    13 Posts | Last Post July 28, 2011
    • First, it wouldn't build, then I installed the Build Task Stuff, and it still wouldn't build until I closed VS and restarted it, then it worked.
      
      Second, it compiles, but won't run because of this error in Mainpage.xaml.
      
      Hardware rendering is disabled. Consider activating "EnableGPUAcceleration" on the host.
      
      
      I'm not sure what to do here.  I enabled it in the plugin, but that has no effect at design time, so I'm confused as to what to do next... help!
    • You must set the Babylon.Web as startup project and then set the html page as startup page :)
      
    • That doesn't even come close to answering the question.  I do have the web project as the startup, it dies in the InitializeComponent() of the mainpage, with this exception
      
      "The invocation of the constructor on type 'Babylon.BabylonSurface' that matches the specified binding constraints threw an exception. [Line: 200 Position: 66]"
    • Hum..strange. Babylon will throw an exception if the GPUAcceleration is off. The html file is supposed to have this option activated.
      
      Could you check that the parameter is on on the html page?
    • A couple of things.
      
      1.  I always use the html file as the start page, and it didn't have the GPU turned on, it wasn't even there, but it was on the aspx page.
      
      2.  That is a runtime solution that has absolutely no effect because the error will show up on the xaml page at desigh time, even though it compiles, which is a bti strange.
      
      There must be something in your development environment that you're not including in the code, because this should just work.
    • I just uploaded a new version. Could you try it?
    • Before I start, let me say that I got it to work, and the 3D is IMPRESSIVE.  Here's the details.
      
      1. I haven't checked what you changed, but this time, it died in Engine.cs with a HardwareAccelerationBlockedBySecurityReason exception.
      
      2.  I removed the throw and replaced it with a break, which allowed the main screen to come up.
      
      3.  Once I got the page, I right clicked to bring up the Silverlight menu, selected the permissions tab, and enabled your app because by default all access is denied.
      
      Once I did that, the main screen is very messed up(choppy), but once I selected a scene, it came up, and I was able to do the panorama around it.
      
      This is some really nice stuff you've created here, I'm hoping to get more into it as time goes on.
      
      Thanks for the help as well.
    • You're welcome :)
    • Glad this was resolved.  For others who might encounter this; one more data point to consider:
      
      Vista/Win7 (with Aero [read: WDDM)) - you automatically get hardware acceleration if the flag is set in the HTML markup.
      
      XP - you will need to explicitly opt into providing these permissions.  It sounds like this is what happened to Wolverado but I could be wrong.
    • PS
      Two things:  (1) absolutely amazing work, David! and (2) if you wanted to, you could programmatically detect the failure to opt-in for hardware acceleration and provide an event/warning/whatever for users of the engine.  But I don't mean to sign you up for additional work, end users can easily do this too.  :)
    • Uhuh:) The exception is already there ^^
      When hardware acceleration if off, an exception with explicit message is thrown.
    • oops :)
    • Had a similar problem with the code. I solved it (not really nice, but it workt) so that I could debug it. If you right click on your project (hope you also use Visual Studio ;-) ) choose "Properties". Choose the "Silverlight" tab and check the option "Enable running application out of the browser" (if not already checked). Now the button "Out-of-Browser Settings..." is enabled. Click it and check in the opening mask "Use GPU Acceleration" and "Require elevated trust when running outside the browser". After choose the next Tab "Debug" and choose "Out-of-browser application".
      After that I didn't get any security exception and you can debug your project out of browser. Don't know if it helps you... (oh, and sorry for my bad english :-) )
  • Hardware Acceleration Error
    2 Posts | Last Post May 20, 2011
    • Hi,
      
      I am able to compile and run this project, but I am getting "Your video card do not have any hardware acceleration." Error in Babylon.Engine Class at line 70 : "SynchronizationContext = SynchronizationContext.Current;"
      
      Regards
      Rushi
    • Have you set the EnableGPUAcceleration option on your web page (the one that host the silverlight plugin)?
  • How best can I reach you?
    2 Posts | Last Post May 16, 2011
    • Where can I find your email David? I will send you my project.
    • davca @ microsoft . com
  • How best can I reach you?
    1 Posts | Last Post May 15, 2011
    • Where can I find your email David? I will send you my project.
  • How to use importer.ImportAsynch
    2 Posts | Last Post May 15, 2011
    • Hey David I love your stuff. I'm attempting to Load a .obj of a model that I've been working on and am having some issues. Maybe you could help me.
      
       importer.ImportAsync(objStream, GetMaterialStream, GraphicsDeviceManager.Current.GraphicsDevice, ImportationOptions.Optimize);
      
      I call this method in the load of the drawing surface but when it returns in the handler the Model is always null. I think its because I'm not sure what to put in for the Func<string, Stream> parameter of this method.
      The parameters I am using are as follows.
      
      objStream:
      Stream objStream = Application.GetResourceStream(new Uri("/FootBallViz;component/SoccerBallsmall.obj", UriKind.Relative)).Stream;
      
      GetMaterialStream
      ??? -- Don't know what to put for this? -- so I put null...
      
      Device:
      GraphicsDeviceManager.Current.GraphicsDevice
      
      ImportationOptions:
      ImportationOptions.Optimize
      
      
      So when the handler gets called it always returns null. (I know its not due to my model because it is actually being loaded into the stream.
      
       void importer_OnImportCompleted(Model obj)
              {
                  
                  model = obj; //model always == null
              }
      
      Also, is there some kind of "getting started" documentation?  I would love to read through it.
      
      Thanks! And great work!!
      
      - David :)
      
    • Hi David;)
      the best place to start is http://babylontoolkit.codeplex.com
      You can go to the downloads tab and download a project sample.
      
      If you do'nt manage to make your code work, do not hesitate to send me your project and I will look for you where the problem is :)
11 - 20 of 24 Items   
« First   < Prev   1  2  3    Next >   Last »