Martin-Pitt / awesome-frontend-games

This is a curated list dedicated to games developed using web technologies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinitown

Martin-Pitt opened this issue · comments

This doesn't have any gameplay but deserves a special/notable mention because of the interesting workflow.

https://twitter.com/glecollinet/status/935181463967985664

The author used Unity as an editor and exported the scene.

They did not use the WebGL Export from Unity; Instead building an engine using Three.js, which they had edited within Unity and exported using a custom script.

https://twitter.com/glecollinet/status/935460330871971841

We use Unity as our scene editor and exporter. City blocks are pre-assembled in Unity then exported to Three.js via a custom script. Rendering and logic happen on the JS/WebGL side.
What we like in Unity: lightmap baking, the ability to use any third-party asset from the store, FBX import, integration w/ other tools (e.g. Substance Painter, Houdini...).

Do you have any recommended article or online course for learning how to use Unity as a scene editor for a Three.js application?

@5ervant Hmmm, a lot of the work is done manually by individuals to get the exporting done.

You might be also able to find something that helps you from the AssetStore.
There should be a few things on github here, a search for 'unity exporter' on github revealed a bunch of projects, but they were confusing, unmaintained or had little to no documentation.

It's a lot of DIY. I think I have seen an article somewhere, but I don't think there would be any online course on such a niché topic as there are quite a few other alternatives instead:

Looking around the biggest thing that stood out to me was using gLTF as a format though. It's purpose is specifically as a format for 3D scenes as well instead of only models.

So what you could look into is gLTF exports from Unity, and then loading those gLTF scenes into Three.js. gLTF is the recommended workflow for loading 3D models into Three.js anyway, read more here: https://threejs.org/docs/#manual/en/introduction/Loading-3D-models

The KhronosGroup's UnityGLTF importer/exporter looks like a good bet:
https://github.com/KhronosGroup/UnityGLTF