BabylonJS / BabylonToolkit

Home of the community maintained Unity & Unreal exporters for Babylon.js
179 stars 47 forks source link

Project not building on Unity 2020.3.6 #25

Closed LuchoTurtle closed 3 years ago

LuchoTurtle commented 3 years ago

Hey there, Mackey! Thank you very much for contributing to this toolkit, I wager all the Babylon community highly appreciates it!

I'm trying to use the toolkit to create a small, low-poly styled map and I'm wishing to import it to Babylon.js running on the browser. I was trying to use Unity as the editor, and seeing your tool is kind of the de facto exporter from Unity to Babylon, I was trying to give it a whirl.

I followed the steps on this thread that but I can't seem to get it working with the latest Unity 2020.3.6 - it always says that the project failed to build.

What I changed on a fresh project

I followed the steps of the video, which included:

I'm a bit lost on what I can do to make this work. Any pointers?

Thank you!

MackeyK24 commented 3 years ago

I made a demo for light baking, but i go thru the whole initial project setup.

Take a look at the video in this thread

https://forum.babylonjs.com/t/require-extension-cvtools-babylon-mesh-is-not-available/17592/9

LuchoTurtle commented 3 years ago

Hey there! Yeah, I've linked the demo you sent on my initial comment hehe. Either way, with your new version, it seems to be working. Although I've added terrain and a few trees and parsing the scene content seems to run indefinitely 🤔

LuchoTurtle commented 3 years ago

Okay, it seems that the problem is related to the Terrain component itself. I can't seem to get a preview working with Terrains, even ensuring that the Bake Light option is toggled on in all components 😦

MackeyK24 commented 3 years ago

Let me try with Unity 2020.3.6f1

LuchoTurtle commented 3 years ago

Cheers! If you want to, I can give you my project! It's a clean project with the aforementioned settings changed :)

MackeyK24 commented 3 years ago

So i just tested with 2020.3.6f1 my default Candy Land scene to test terrain and splatmap shader for all the patterns in the terrain.

Unity Shot

Screen Shot 2021-05-05 at 11 08 41 AM

Babylon Render

Screen Shot 2021-05-05 at 11 08 17 AM

Looks great

MackeyK24 commented 3 years ago

Send me your scene, i try take a look at when i can

LuchoTurtle commented 3 years ago

@MackeyK24 Thanks a lot! Here's a downloadable link. It only has terrain and a cube. It builds just fine but the parsing of the scene content goes on forever when I check on the browser.

Thanks a lot for the help and sorry for being such a bother! :/

MackeyK24 commented 3 years ago

Please move this issue to the forums so others with the same problem can see the solution.

If you check the console, there is an out of memory error with ammo.js.

Screen Shot 2021-05-06 at 8 53 02 AM

You terrain is really tall... 600 you might wanna lower that in general.

You can control which AMMO STACK you would like to include in your project. It default to a 128MB ammo build. I raise that to 256MB for Ammo Stack

Screen Shot 2021-05-06 at 8 56 03 AM

And you final scene

Screen Shot 2021-05-06 at 8 57 06 AM

LuchoTurtle commented 3 years ago

Thanks a lot! I'll post it on the forums for everyone to see! Sorry for bothering!