Code Monkey home page Code Monkey logo

the_lightmapper's People

Contributors

artyif avatar dacre-denny avatar naxela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the_lightmapper's Issues

Error Appears when i try to build a lightmap

I dont know why but when I try to build a lightmap it gives me this error

location: <unknown location>:-1
Error: Traceback (most recent call last):
  File "C:\Users\Funky\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\thelightmapper\addon\operators\tlm.py", line 23, in invoke
    build.prepare_build(self, False)
  File "C:\Users\Funky\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\thelightmapper\addon\utility\build.py", line 70, in prepare_build
    prepare.init(self, previous_settings)
  File "C:\Users\Funky\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\thelightmapper\addon\utility\cycles\prepare.py", line 24, in init
    configure_meshes(self)
  File "C:\Users\Funky\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\thelightmapper\addon\utility\cycles\prepare.py", line 89, in configure_meshes
    bpy.ops.object.select_all(action='DESELECT')
  File "D:\SteamLibrary\steamapps\common\Blender\2.83\scripts\modules\bpy\ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect

location: <unknown location>:-1

I'm using the latest version of blender (steam)

disgusting result (high and production quality)

i dont know why but sometimes when i use high and production quality i get this result

image

sometimes I always get this result on these settings, sometimes I don't get it.
sometimes the map is just white, but if I choose the quality is low and the medium is always good.
image

Refactor addon

Refactor addon for separate moduling:

  • Can be easier implemented in Armory3D
  • Can easily include other renderers (LuxCoreRender in the future)
  • Background (subprocess) and Distributed (network) rendering

Add option to ignore material

Add option to ignore material, even if it's part of an object marked for lightmapping. - Useful in case of emissive surfaces and surfaces with interior parallax geometry, so they don't have to be separated.

Bug: Empty Material slot results in Error

Unbenannt
This setup results in this error:

Warning: 1 x Draw Window and Swap: 14.8811 ms, average: 14.88110000 ms
BAKING:!
Traceback (most recent call last):
  File "C:\Users\SK\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\The_Lightmapper-master\Addon\Operators\build.py", line 55, in modal
    bake_run.bake_ordered(self, context, None)
  File "C:\Users\SK\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\The_Lightmapper-master\Addon\Utility\bake_run.py", line 62, in bake_ordered
    utility.check_compatible_naming(self)
  File "C:\Users\SK\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\The_Lightmapper-master\Addon\Utility\utility.py", line 63, in check_compatible_naming
    if "_" in slot.material.name:
AttributeError: 'NoneType' object has no attribute 'name'

location: <unknown location>:-1

Crash with Blender 2.83

After installing the add-on on Blender 2.83 and clicking the "Build Light for selected" button, the process crashes with this message:

File "C:\Users\Thomas\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\HDR_Lightmapper_init_.py", line 449, in execute
HDRLM_Build(self, context)
File "C:\Users\Thomas\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\HDR_Lightmapper_init_.py", line 1585, in HDRLM_Build
mainNode = nodetree.nodes[0].inputs[0].links[0].from_node
IndexError: tuple index out of range

It works with 2.82.

Error during addon activation

I try to install on blender 2.90.1 your addon in the version 0.4.4.3 and 0.4.3.4 but I have this error for both

image

For information, I already use the version 0.3.2.0 , it's great, thanks

`.exe` suffix is used for OIDN, even on Linux

When attempting to use Intel's OpenImageDenoise on Linux with Release 0.3 of The Lightmapper, the following error appears in the output log:

Denoiser search: /home/username/Downloads/oidn-1.2.3.x86_64.linux/bin/oidnDenoise.exe
/bin/sh: 1: /home/username/Downloads/oidn-1.2.3.x86_64.linux/bin/oidnDenoise.exe: not found

In Linux, executable files typically don't have any extension and are simply marked as executable. This is the case for OIDN, where the executable is simply named oidnDenoise. Although the user could simply rename the file to oidnDenoise.exe for a temporary workaround, it'd be nice to properly support Linux executables.

How to use it

Hello, thank you for the addon !

  1. How can i change lightmap resolution ?
  2. Can i bake whole scene into one lightmap?
  3. How can i use OIDN? i get error -
    image
  4. Clean lightmap cache not working, i should manually clean graph node for every object
  5. Filtering is not working too (
    image

Error on Linux Install: NameError: name 'pip' is not defined

I have the some error on linux install:
`Traceback (most recent call last):
File "/home/anfeo/.config/blender/2.83/scripts/addons/The_Lightmapper_master/Addon/Utility/cfilter.py", line 13, in
import cv2
ModuleNotFoundError: No module named 'cv2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/anfeo/blender281/2.83/scripts/modules/addon_utils.py", line 351, in enable
mod = import(module_name)
File "/home/anfeo/.config/blender/2.83/scripts/addons/The_Lightmapper_master/init.py", line 31, in
from . Addon import Operators, Panels, Properties, Preferences, Utility, Keymap
File "/home/anfeo/.config/blender/2.83/scripts/addons/The_Lightmapper_master/Addon/Operators/init.py", line 3, in
from . import build, clean, explore, encode, installopencv, gui, xBake, selection, additional, lighttools
File "/home/anfeo/.config/blender/2.83/scripts/addons/The_Lightmapper_master/Addon/Operators/build.py", line 3, in
from .. Utility import bake_run
File "/home/anfeo/.config/blender/2.83/scripts/addons/The_Lightmapper_master/Addon/Utility/bake_run.py", line 2, in
from . import denoise, objectconfig, lightbake, cfilter, encoding, ambientbake, utility
File "/home/anfeo/.config/blender/2.83/scripts/addons/The_Lightmapper_master/Addon/Utility/cfilter.py", line 16, in
pip
NameError: name 'pip' is not defined`

Refactor the addon

Currently, most is just stashed inside the utility file - Refactoring the addon is necessary in order to allow better development.

copy node

its create the same node every time when i click "build light"
image
image
after it when i press "build light" again it turns into black
image

nodetree.nodes[0] in utility.py pointing at wrong node

From my understanding, this term should always be pointing at the Material Output node. It does so most of the time correctly. But for some materials it points to a seemingly arbitrary node of the node tree. I modified utility.py starting at line 536 a bit to see what is going on:

for slot in obj.material_slots:
                    nodetree = bpy.data.materials[slot.name].node_tree
                    nodes = nodetree.nodes
                    print(slot.name)
                    #mainNode = nodetree.nodes[0].inputs[0].links[0].from_node
                    ab = nodetree.nodes[0]
                    print(ab)
                    ac = ab.inputs[0]
                    ad = ac.links[0]
                    mainNode = ad.from_node

This is the output, the first couple are for materials where no issues occur and then there is an error:

slot56_slot1_temp
<bpy_struct, ShaderNodeOutputMaterial("Material Output")>
slot60_slot1_temp
<bpy_struct, ShaderNodeOutputMaterial("Material Output")>
slot104_slot1_temp
<bpy_struct, ShaderNodeBump("Bump")>
Traceback (most recent call last):
  File "C:\Users\SK\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\The_Lightmapper-master\Addon\Operators\build.py", line 52, in modal
    utility.bake_ordered(self, context, None)
  File "C:\Users\SK\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\The_Lightmapper-master\Addon\Utility\utility.py", line 1409, in bake_ordered
    configure_objects(scene)
  File "C:\Users\SK\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\The_Lightmapper-master\Addon\Utility\utility.py", line 545, in configure_objects
    ad = ac.links[0]
IndexError: tuple index out of range

location: <unknown location>:-1 

Rebuilding the regarding Material -> deleting the nodes and placing them in the exact same way again, fixes the issue for this Material!
Here a .blend where this occurs, the error should simply occur when you press Build Lightmaps.
https://drive.google.com/open?id=1Ys3pMuyKMM3GweP6X-hXO5H5gAo5lOJF
b2.81 Win10

Lightmap Path Properties Only Mode

Hello, thank you for the awesome light-mapping addon!

I was wondering if it would be possible to disable the addon from overriding materials and instead just add an object property with the file-path of the associated lightmap.

Using the gltf addon you can export custom properties like that file path, unfortunately the current way the tool applies lightmaps can mangle gltf materials so that material overwrite needs to be disabled (yes I know that would mean no more previews).

By adding this option you can preserve exported materials and make lightmap associations more clear to import from a hobby rasterizer or small engine without affecting basic gltf materials.

Hopefully this can also be saved as a user preference to avoid accidentally breaking the materials in other files in this workflow.

Thanks!

Add video tutorials

Add some video tutorials about how to get started with lightmapping surfaces and lighting conditions.

UV unwrap broken

In the options for the individual objects, there are UV option. You can choose Smart, Lightmap, or Copy. Smart and Lightmap unfortunately produce the same broken result, where some faces are squeezed into zero-width/height faces on the UV map. Copy works fine. Win10 b2.81a

Add seam blending

Investigate ways to blend seams together, or make them less apparent

Headless mode possible?

Your toolset looks awesome. Would it be possible running it headless mode?
Something like this:
blender --background --python run_The_Lightmapper.py

Essentially I would like the script to import a gltf/obj file then do all of the magic that your tools do (unwrapping, baking etc) and then export a new gltf/obj file. I'll probably consume the output in babylon.js

Atlasing UV Maps

Find a way to begin map atlasing, preferably with atlas grouping based on object size and resolution

Denoising Failed

Hello,

first of all great add-on ! I think if this is will be pushed a bit it will drastically improve the hole process of baking !

I was experimenting with your newest version (added some code to link the baked lightmap node to a gltfSettings node to export it to glb and use it in three js) and figured that the denoising doesn't work anymore cause the denoised image can't be found. I tried to use the pipe from an older version but I don't really understand whats going on here.

image

Old version just gives a black image, new version gives this error
image

I couldn't find the file in the Lightmaps folder so I guess it wasn't saved.

Could you help me ?

Using command-line for AWS

Hello,

I really like your addon and I would love to bake the textures with AWS to accelerate the process. Is it possible to use the command line to open the .blend file, adjust some settings like quality, filtering, .., bake the lightmap and save it as hdr?

Thanks for you me advise :)

error property not found on scene.py:161

Hello, I recently installed this addon that is very useful to me and I have detected this error, which does not allow me to use the denoise neither from nvidia or from optix.

Sorry for my poor english.

image

Stacklist based filtering

Add filtering as stacked list, allowing multiple filters to be used in terms of postprocessing.

Additional filters to be implemented:

  • Brightness
  • Saturation
  • Contrast

More material checks

More material checks for unsupported material setups, such as materials prepared for Blender internal render (from 2.79)

Turn off all baked materials while baking

When baking, turn off all baked materials while baking on a selection based routine - Make a list of baked materials, re-apply after baking.

Baking while other objects has baked materials will provide faulty results in strong light conditions.

EXR Support

It would be nice if the addon could export to Open EXR as well. Many texture processing pipelines (such as ones using AMD's Compressionator) don't support .hdr files.

error install addon

when i was install the addon give me this problem.

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\DIO\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\The_Lightmapper-master\__init__.py", line 31, in <module>
    from . addon import operators, panels, properties, preferences, utility, keymap
  File "C:\Users\DIO\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\The_Lightmapper-master\addon\preferences\__init__.py", line 3, in <module>
    from . import addon_preferences
  File "C:\Users\DIO\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\The_Lightmapper-master\addon\preferences\addon_preferences.py", line 1, in <module>
    import bpy, thelightmapper
ModuleNotFoundError: No module named 'thelightmapper'

Changes to Material data causes error in ID decrementing

This seems to happen when a change is made to a material on a light mapped object. Not sure what change was made, but I think it was a name change. Once this error showed up, light baking broke for one of the materials in question. This error only seems to appear when Don't apply materials is checked.

image

Additionally, completely deleting all material data (orphan data included) and remaking them all from scratch seemed to not fix the issue. I suspect the only option here is to recreate the file.

Edit: For reference, I am using Blender 2.9

Can't make the OIDN working

Hi, i just recently found this addon, and really help, but my main problem is i can't get the OIDN denoiser working, how to use the OIDN? Where do i put OIDN Path?
I'm using windows 10, blender 2.83

Thank you

Encoding skip in background mode

Fix error where lighmaps aren't encoded during background baking (in UI), denoising works, filtering works, but error related to encoding with GPU, although should only be the case for LogLuv

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.