Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baked Lightmaps support #3127

Closed
UncannyAlley opened this issue Jun 14, 2022 · 9 comments
Closed

Baked Lightmaps support #3127

UncannyAlley opened this issue Jun 14, 2022 · 9 comments

Comments

@UncannyAlley
Copy link

Hi is it possible to implement baked lightmaps into the super duper webaverse. Pretty pretty please kind hackers.

@gonnavis
Copy link
Contributor

gonnavis commented Jun 14, 2022

Do you mean this type of baked lightmaps? https://threejs.org/examples/?q=lightmap#webgl_materials_lightmap
Because of we are using three.js, so it should be supported, just need to design some apis in such as .scn files.

@avaer
Copy link
Contributor

avaer commented Jun 15, 2022

I think a proper export of GLB might support it already. The THREE.js standard material shaders support it.

https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.lightMap

@pigloo
Copy link

pigloo commented Jun 16, 2022

I've been unable to export a glb with lightmap from blender directly to weba, however it can be achieved by exporting a glb with an second set of UVs for the lightmap/aomap, as well as baking and saving the textures to external image files, you can then traverse the model in three.js and apply the lightmap/aomap to the specific material texture slots, its not the smoothest workflow though.

@UncannyAlley
Copy link
Author

Thanks so much for the replies. Apologies only seeing them now. Yeah I have just been using vket cloud and they do a cool job of connecting the lightmaps to the models. Although they have Unity as a front end so doing it from there.(im not sure how they do it)

Webaverse is just too damn cool. The team shld be so freakin proud!

@madjin
Copy link
Contributor

madjin commented Jun 24, 2022

I'm testing this out tonight, so far it's not that ez pz lol
https://hubs.mozilla.com/labs/ez-bake-lightmapping/

I'd much prefer is a WYSIWYG workflow like needle tools: https://twitter.com/marcel_wiessler/status/1539737926854221824
I will test such tomorrow 😄

@madjin
Copy link
Contributor

madjin commented Jun 24, 2022

I think three-gpu-pathtracer stuff like what bai has been experimenting with could be potentially used for ultra EZ mode 1 click lightmap / AO / GI baking
image

@madjin
Copy link
Contributor

madjin commented Jun 24, 2022

brave_WmXNrh52UR
brave_K3gNDb9Hq6

Testing an archviz sample file made with MOZ lightmap, seems like it doesn't work. Admittedly that workflow was really difficult for artists to adopt anyhow. Going to test threejs route via needletools now.

@lalalune
Copy link
Contributor

lalalune commented Jun 26, 2022

Hey @madjin @UncannyAlley I did a bit of research on this.

It looks like Webaverse does support the AO channel, which is part of standard GLTF export, and should support MOZ_lightmap but the way the GLTFLoader works has changed, so we had to change this a bit too.

@lalalune
Copy link
Contributor

@avaer @UncannyAlley @madjin solved in #3170

@lalalune lalalune closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants