Code Monkey home page Code Monkey logo

Comments (9)

Naxela avatar Naxela commented on June 28, 2024

Hi and thanks for using the addon! - If I understand you correctly you just want to bake the lightmaps without actually applying them to the materials in your scene? In that case, it's possible using the headless toggle:

image

That should work in case you want to export your scenes to external game engines, using gltf or similar

I hope this helps! - If not let me know

from the_lightmapper.

nicoraf avatar nicoraf commented on June 28, 2024

Hi @Naxela , thanks for your message. I tested it before raising the issue, with the latest version of Blender 3.2.2 . If I Select Don't apply materials, and then I click "Build lightmaps" , I don't see at blender any Image with with a name "MeshName_bake" .
Ideally I would expect to see the image and also the light UV map .
Thanks

from the_lightmapper.

Naxela avatar Naxela commented on June 28, 2024

Hi @nicoraf - All your baked images should be present in a folder located where your blend file is:

image

If you bake with headless mode turned on, do you mean that no lightmaps are saved in the lightmap folder - If you click Explore Lightmaps?:

image

Or do you just want to have the images loaded but not applied inside the blender file itself (Visible in the image editor for example)?

from the_lightmapper.

nicoraf avatar nicoraf commented on June 28, 2024

Yes we want to have the images embedded inside the blender file itself, but not attached to a material.

from the_lightmapper.

Naxela avatar Naxela commented on June 28, 2024

Oh now I understand - I don't think there's currently a way to do that while in headless mode. I can try to add the feature sometime during the weekend, but until then can you test if the following script work?:

import bpy, os

for file in os.listdir(os.path.join(os.path.dirname(bpy.data.filepath), bpy.context.scene.TLM_EngineProperties.tlm_lightmap_savedir)):
    if file.endswith(".hdr"):
        bpy.ops.image.open(filepath=os.path.join(os.path.join(os.path.dirname(bpy.data.filepath), bpy.context.scene.TLM_EngineProperties.tlm_lightmap_savedir), file))

Just copy paste the code into the scripting panel:

image

And your lightmaps should now be loaded:

image

I hope this helps

from the_lightmapper.

nicoraf avatar nicoraf commented on June 28, 2024

Thanks, we will wait you add this feature. We appreciate it.

So I guess the natural way will be to add a combination of check options so that "Build lightmaps", include the bake images embedded with the same name convention, but it does not modify the materials. However the UV mapping is also inside the Mesh objects.

from the_lightmapper.

Naxela avatar Naxela commented on June 28, 2024

Hi, I added this as an option in the latest commit (4bc6162):

After you've baked, just go into utilities, and select load lightmaps at runtime:

image

from the_lightmapper.

nicoraf avatar nicoraf commented on June 28, 2024

Hi @Naxela , thank you very much , we will be testing it and I will comment here again.

from the_lightmapper.

nicoraf avatar nicoraf commented on June 28, 2024

Hi @Naxela , we tested your changes and we have the following feedback.

When we select load lightmaps, it loads the lightmap image textures, but it only loads image textures with HDR format. We are interested to load PNG images and ideally to be able to choose between PNG and JPEG. One reason is because we prefer that format, but there is another reason is that to our understanding the GLTF exporter add on does not support HDR.

Another comment that is independent of 1). Although the approach of doing that in two steps work for us. Ideally we would prefer that the add on, directly have the images packed after backing, without modifying the materials.

Also maybe if possible , and makes sense to even never have the images in a subfolder, has to be able to have all the images inside blender, so later someone can export it to GLB format.

Maybe it could be added an option "Pack Backed Images", and another combo that we can choose the image format PNG, JPEG, etc ?

Thanks

from the_lightmapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.