4 ms·
Hi, I'm one of the developers. We use Unity as our main scene editor and exporter. We don't use the official WebGL exporter but a custom script that we wrote. I
by franck 9y ago
Hi, I'm one of the developers. We use Unity as our main scene editor and exporter. We don't use the official WebGL exporter but a custom script that we wrote. In this project, we use it to assemble individual city blocks, that we merge to a single geometry each. We actually don't use Unity shaders at all, they are also custom made.
- bhouston 9y agoThanks for the explanation. That makes sense. Neat stuff. Btw there is proprietary/coprighted unity shader code cut and pasted into this, someobe even copied the original comments from the unity shaders. For example search for "DecodeLightmapRGBM" in the below source code, which is from the demo - that code and others are copied: https://gist.github.com/bhouston/1c3c6835ca9766571f07ad0126d70f5a https://gist.github.com/bhouston/1c3c6835ca9766571f07ad0126d... Here is some unity source code to compare against: https://gist.github.com/nicloay/8d2ae254a77de58bb42b9009b4cfa1c3 https://gist.github.com/nicloay/8d2ae254a77de58bb42b9009b4cf...
- franck 9y agoThanks, good catch. That is a copy&paste that I mistakenly left in, it wasn't used anyway. I removed it now.
- aedron 9y agoJust curious, why do you do it that way? (i.e. not just exporting from Unity)
- franck 9y agoBecause the Unity WebGL exporter doesn't currently support mobile.
- skocznymroczny 9y agoDon't know about this specific usecase, but Unity exports are heavy. I mean, it compiles C# scripts to C++ and then compiles it and Unity C++ runtime to Javascript. I easily got download sizes in tens of megabytes when trying to use Unity export for simple demos. Meanwhile Three.js is very lightweight and more than enough for such projects.