-
Notifications
You must be signed in to change notification settings - Fork 26
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
Option to remove emission from prep materials #369
Option to remove emission from prep materials #369
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not live test, just code review. I see your other branches continue to reference needing to merge this first, let me know when you're ready for me to do a further review - but did a first pass just now.
Hence, just responding with "comment" for now instead of approve. Overall the change looks good, just needs a live test from me!
Looks like prepping on more complex OBJs returns the following error: Python: Traceback (most recent call last):
File "C:\Users\Mahid\AppData\Roaming\Bforartists\Bforartists\3.5\scripts\addons\MCprep_addon\tracking.py", line 806, in wrapper
res = function(self, context)
File "C:\Users\Mahid\AppData\Roaming\Bforartists\Bforartists\3.5\scripts\addons\MCprep_addon\materials\prep.py", line 252, in execute
res = generate.matprep_cycles(
File "C:\Users\Mahid\AppData\Roaming\Bforartists\Bforartists\3.5\scripts\addons\MCprep_addon\materials\generate.py", line 391, in matprep_cycles
res = matgen_cycles_principled(
File "C:\Users\Mahid\AppData\Roaming\Bforartists\Bforartists\3.5\scripts\addons\MCprep_addon\materials\generate.py", line 1578, in matgen_cycles_principled
texgen_seus(mat, passes, nodeInputs, use_reflections)
File "C:\Users\Mahid\AppData\Roaming\Bforartists\Bforartists\3.5\scripts\addons\MCprep_addon\materials\generate.py", line 1279, in texgen_seus
links.new(nodeSaturateMix.outputs[saturateMixOut[0]], i)
RuntimeError: Error: Same input/output direction of sockets |
Ight I was able to fix it with the following: if use_emission:
for i in nodeInputs[2]:
links.new(nodeSeperate.outputs["B"], i) |
FYI I just using the test runner on this branch, getting some errors, can you take a quick look?
|
Eevee still benefits from direct to camera shading as emitter, plus some people may use probes anyways. Also this fixes the redo-last for use emission, as currently the draw function immediately turns it back on once you've tried to uncheck it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to push a single change and then this is good to go. See comment below of one thing I've changed, to not disable emission in Eevee.
I'm going to merge it now.
MCprep_addon/materials/prep.py
Outdated
@@ -150,6 +155,12 @@ def draw_mats_common(self, context): | |||
row = self.layout.row() | |||
row.prop(self, "optimizeScene") | |||
|
|||
# EEVEE won't benefit from this anyway, so best to disable it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue against this, as having emission means it at least appears brighter even if it doesn't actually give off light. Plus, people can technically use light probes. What harm is there in having emission on in Eevee? I also find that I often switch from eevee to cycles when I first get to rendering as I wasn't thinking about it right away.
Changed the branch so reopening
Work on this feature began in Kaion, and now I'm just refining this feature.
This adds an option to prep materials to not add emissive nodes, which can help to reduce noise in Cycles and makes nodes less complex in EEVEE.