I modeled and rendered a 3D scene using Marmoset Toolbag
and exported it to a Viewer file
. This will give me a .mscene
file and a html
file. All I have to do is to put them in the same folder and open a html
file with a browser that has webgl
activated and it works. It works using FireFox
for example.
However, when I wish to load it to my grid
in my WPF app, it just says errors, like _ Script error: error in the page's command_ (error message is my translation sorry). Error code: 0. Line: 0, Character: 0. I always say to continue but in the end All I get is a blank page.
This is the code I wrote to open it up:
private void ShowDumbbellMethod()
{
var targetGrid = (parent as BrowseWares).ViewerGrid;
var viewer = new WebBrowser();
viewer.Source = new Uri("C:\\Users\\agoston\\Documents\\Visual Studio 2015\\Projects\\HP_hf_shop\\HP_hf_shop\\HTML\\dumbbell.html");
targetGrid.Children.Add(viewer);
}
The URI
points to my project for now.
How to get this to work? All I saw on the internet was webgl with WebControl
dated back to 2013.