Jump to content

Export Problem in Unity for BabylonJS!


marc.
 Share

Recommended Posts

Hey guys!

I have a export problem in Unity for my architecture visualization(for web).

Everytime I export from Unity for BabylonJS I only get 1 picture where are missing some details like the backgroung or the windows.

Here you can see what I want to export: 

 

Here are the results of the rendering from the BabylonJS exporter for Unity: 

- http://prntscr.com/bi7ufs
- http://prntscr.com/bi7vbc
- http://prntscr.com/bi7vrp

And here are my current settings in the BabylonJS exporter for Unity:

http://prntscr.com/bi86rc

Can me anyone help with this problem? :c

Link to comment
Share on other sites

On 20.6.2016 at 6:08 PM, Deltakosh said:

Hey!

It's tough to help you without the original Unity scene.

We are not supporting everything from Unity so you may be using some unsupported shaders or lights for instance

Hey!

Thanks for the quick answer! :D

But is it possible to code a camera to move the island 360° and to export with BabylonJS(with C#)? :D Or have I export only the object? :D And here is my scene: https://mega.nz/#F!Gx0FiTQB (Password: !-2ljIzYtC9jtPF-7bei4kA ) 

Thank you so nice support! :D

Link to comment
Share on other sites

Oh thanks! :D 
Can I export the buttons to or is it not possible because I have 3 buttons. 1 for disable or enable the tree(who is animated), 1 button to disable or enable the roof of the house and the last button to disable or enable the information board. :) 

Sorry for all these stupid questions. :c I'm 14 years old but I'm interested and I want to learn this. :)

Link to comment
Share on other sites

Hey Deltakosh! I've never used JavaScript before. :(  But I'm trying to learn it now. :D 

And how can I fix the missing details(the geometry, the shader and the background[the background has not the real color]) ? :) 

In that scene( http://prntscr.com/bjn8m8) I've only disabled the camera and all C# scripts because the lights are the directional lights and they are supported. 

Can it be that the glas of the house model is not supported because I've created it for a test in Cinema4D(the island too) and exported everything.

 

Link to comment
Share on other sites

Hi marc,

you cannot export buttons from unity.

just like unity you have to create gui in babylonjs using canvas2d.

here is the tutorial link https://doc.babylonjs.com/tutorials/Using_the_Canvas2D      .

do practice on that for some time it is easy .

and for mirrors in babylonjs please make the mesh visibility to 0.3 like that so the mesh behaves like a glass.

Link to comment
Share on other sites

Hey! I have done it in Blender and exported it, but when I want to program it for Web it wont work. :c 

That's what I've written: 

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <title>Test</title>
      <style>
      html, body {
          overflow: hidden;
          width: 100%;
          height: 100%;
          margin: 0;
          padding: 0;
      }

      #renderCanvas {
        width: 100%;
        height: 100%;
        touch-action: none;
      }

      <script src="Babylon.js"></script>
      </style>
   </head>

   <body>
   <canvas id="renderCanvas"></canvas>
   <script language="javascript" type="text/javascript">
   var canvas = document.getElementById("renderCanvas");
   var engine = new BABYLON.Engine(canvas, true);


   BABYLON.SceneLoader.Load("", "housemodel.babylon", engine, function(newScene){
      var Scene = newScene;
      Scene.executeWhenReady(function(){
         engine.runReaderLoop(function(){
            Scene.render();
         });
      });
   });
   window.addEventListener("resize", function(){
       engine.resize();
   });


    return scene;
   </script>
   </body>

</html>

So that's the model I've exorted for BabylonJS:

http://prntscr.com/blbmg8

And here is my file structure: 

http://prntscr.com/blclzu

I want to rotate the model 360° with a blue background, a vignette and a button to get informations about the model. 

Please help me. :c 

Link to comment
Share on other sites

I'm using now the newest version but nothing is changing. 

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <title>Test</title>
      <style>
      html, body {
          overflow: hidden;
          width: 100%;
          height: 100%;
          margin: 0;
          padding: 0;
      }
      
      #renderCanvas {
        width: 100%;
        height: 100%;
        touch-action: none;
      }
      
     <script src="Babylon.js-2.4.0"></script>
      </style>
   </head>

   <body>
   <canvas id="renderCanvas"></canvas>
   <script src="http://cdn.babylonjs.com/2-1/babylon.js"></script>
   var canvas = document.getElementById("renderCanvas");
   var engine = new BABYLON.Engine(canvas, true);
   
   
   BABYLON.SceneLoader.Load("", "housemodel.babylon", Engine, function(newScene){
      var Scene = newScene;
      Scene.executeWhenReady(function(){
         Engine.runReaderLoop(function(){
            Scene.render(); 
         }); 
      }); 
   });
   window.addEventListener("resize", function(){
       Engine.resize();
       return scene;
   });
   
   
    
   </script>
   </body>

</html>

Here the console: 

Unbenannt.png

Link to comment
Share on other sites

Your screen copy shows that you are accessing your index.html directly from the filesystem. You should access your page from a webserver else any other resource (what you want to download) won't be loaded from your index.html page.

Link to comment
Share on other sites

Hey Jerome! :D Thanks for that answer I'm asking for an server at my company(the company for that I have to do it[i have school

internship]).  Can me anyone help me how to import a acrobat camera in my code? I have no idea. :c

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...