Free Support Forum - aspose.com

Converting u3d file to html does not work

Hy,
I am trying to convert u3d file to html by ASPOSE 3D for .NET, but it doesn’t work.
Output I get 3 files, .js file, .a3dw file and .html file.
When I open html page from the web browser, I get a blank page with a .png image with a white background.
I have also enabled the .a3dw mime type on the web server.
This is the code I use for the conversion:

string pathOut = Server.MapPath(".") + @"\demo.html";
string pathIn = Server.MapPath(".") + @"\U3D.u3d";

    // load the U3D file to be converted 
    var document = new Aspose.ThreeD.Scene(pathIn);
    // Create Instance of HTML Options 
    var options = new HTML5SaveOptions();
    // save U3D as a HTML 
    document.Save(pathOut, options);

@umberto.d

Would you please share your sample source file with us so that can test the scenario in our environment and address it accordingly.

Hy,
this is my source code to convert u3d file in html version.

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
using Aspose.ThreeD.Formats;
using Aspose.ThreeD.Shading;
using Aspose.ThreeD.Utilities;
using System.IO;

public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Aspose.ThreeD.License license = new Aspose.ThreeD.License();
license.SetLicense(Server.MapPath(".") + @"\Aspose.3D.NET.lic");
}

protected void btnCrea_Click(object sender, EventArgs e)
{
    lblMessaggio.Text = "";

    string pathOut = Server.MapPath(".") + @"\public\demo.html";
    string pathIn = Server.MapPath(".") + @"\Libreria3D\U3D.u3d";
    
    
    


    // load the U3D file to be converted 
    var document = new Aspose.ThreeD.Scene(pathIn);
    // Create Instance of HTML Options 
    var options = new HTML5SaveOptions();
    // save U3D as a HTML 
    document.Save(pathOut, options);


    

}

}

@umberto.d

Thanks for attaching the code snippet.

Would you please also attach the sample U3D.u3d file so that we can test the code accordingly and share our feedback with you.

U3D.zip (289.5 KB)

Hy, Asad.
This my test file u3d

@umberto.d

While testing the scenario at our side, we received an HTML file which was not blank. Please check attached screenshot and let us know if you obtain similar output? OR it is completely blank?
htmloutput.png (16.2 KB)

Hy,
The result obtained from the conversion is attacheddemo.zip (291.6 KB)

yes i am. no view
files.zip (82.3 KB)

.net core 3.1
windows 10
aspose.3d 20.9.0

In my file I get the same scenario as yours.
So the conversion doesn’t work.
Why does this happen?
I do not understand if your library does not work or if I am wrong in using it

@umberto.d, @chenwei

We have logged an issue as THREEDNET-759 in our issue tracking system for incorrect conversion of .u3d files to .html. We will further investigate the reasons behind this issue and keep you posted with the status of ticket resolution. Please be patient and give us some time.

We are sorry for the inconvenience.

Now what is the way to make HTML display 3D models? Or switch development environment? (mac/java?)

thank you . please !!!

@chenwei

The ticket has been just logged for investigation and we are afraid that we cannot share any feedback or alternate way at the moment. As soon as the ticket is reviewed, we will be able to further comment on the issue. We will post update in this forum thread as soon as the ticket is fully investigated. Please give us some time.

We are sorry for the inconvenience.