# CG comping. Lightgroups vs AOVs

**URL:** <https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529>\
**Category:** Flame Questions\
**Tags:** cg, aovs, comp\
**Created:** [April 26, 2024, 10:06am UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529 "2024-04-26T10:06:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![leovfx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/leovfx/32/12472_2.png) [@leovfx](https://forum.logik.tv/u/leovfx)\
**Post date:** [April 26, 2024, 10:06am UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/1 "2024-04-26T10:06:39Z")

</div>

I find that when comping CG, you have to make the choice between using the light groups OR using diffuse/spec/sss etc

For instance, once you have adjusted the balance of light groups then you can no longer subtract the specular as it contains the original light group balance, and vice versa.

But I suddenly thought, I wonder if somebody very clever has found a way of using both.

Any thoughts welcome. Thanks.

---

<div class="post-metadata">

**Author:** ![leovfx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/leovfx/32/12472_2.png) [@leovfx](https://forum.logik.tv/u/leovfx)\
**Post date:** [April 26, 2024, 2:15pm UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/3 "2024-04-26T14:15:24Z")

</div>

Great. That solves it. 🙃

---

<div class="post-metadata">

**Author:** ![milanesa](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@milanesa](https://forum.logik.tv/u/milanesa)\
**Post date:** [April 26, 2024, 4:41pm UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/4 "2024-04-26T16:41:09Z")

</div>

Try this:

A = Original  
B = LightGroups Adjustment  
C = Beauty AOVs Ajustments  
D = A == 0 ? 0 : B / A ( if A equal zero then zero, otherwise B divided by A )  
R = C \* D (C multiplied by D)

R is your Result

The order of B and C don’t really matter

In Flame you may need to write a Matchbox for this.

---

<div class="post-metadata">

**Author:** ![richardamckeand](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@richardamckeand](https://forum.logik.tv/u/richardamckeand)\
**Post date:** [April 26, 2024, 5:47pm UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/5 "2024-04-26T17:47:29Z")

</div>

Not a full beauty rebuild, but…  
If you want to use them to tweak the beauty / result you can just subtract them, tweak, and add back. You’d probably do this after your initial rebuild using whichever set you prefer. As long as you’re not clamping the different light balance you mentioned shouldn’t break the comp.  
Or did you already try this? 🙂

---

<div class="post-metadata">

**Author:** ![milanesa](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@milanesa](https://forum.logik.tv/u/milanesa)\
**Post date:** [April 27, 2024, 6:51am UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/7 "2024-04-27T06:51:05Z")

</div>

I realize you may get away without a matchbox. The reason for the D expression is to avoid dividing by 0. You may be able to get around this by lifting the image ever so slightly by a very tiny amount, do the operation and the negating that change after… so regular Comp nodes my suffice. I’ll test tomorrow.

---

<div class="post-metadata">

**Author:** ![milanesa](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@milanesa](https://forum.logik.tv/u/milanesa)\
**Post date:** [April 27, 2024, 4:02pm UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/8 "2024-04-27T16:02:20Z")

</div>

Example Batch. Not including the division by 0 check… I leave that to you.

> **[parallel\_aov\_adjustments\_001.zip](https://drive.google.com/file/d/1cfWR1oLDowXoP6M5YGUDnL3g7fE691FT/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![leovfx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/leovfx/32/12472_2.png) [@leovfx](https://forum.logik.tv/u/leovfx)\
**Post date:** [April 28, 2024, 7:48pm UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/9 "2024-04-28T19:48:58Z")

</div>

> [@milanesa](#):
>
> Try this:
> 
> A = Original  
> B = LightGroups Adjustment  
> C = Beauty AOVs Ajustments  
> D = A == 0 ? 0 : B / A ( if A equal zero then zero, otherwise B divided by A )  
> R = C \* D (C multiplied by D)
> 
> R is your Result
> 
> The order of B and C don’t really matter
> 
> In Flame you may need to write a Matchbox for this.

Ah. Yes. This makes perfect sense. Thank you.

---

<div class="post-metadata">

**Author:** ![leovfx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/leovfx/32/12472_2.png) [@leovfx](https://forum.logik.tv/u/leovfx)\
**Post date:** [April 30, 2024, 8:30am UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/10 "2024-04-30T08:30:02Z")

</div>

@milanesa Getting lots of love for this tip at the company I’m at. Thanks.

---

<div class="post-metadata">

**Author:** ![leovfx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/leovfx/32/12472_2.png) [@leovfx](https://forum.logik.tv/u/leovfx)\
**Post date:** [April 30, 2024, 8:31am UTC](https://forum.logik.tv/t/cg-comping-lightgroups-vs-aovs/10529/11 "2024-04-30T08:31:20Z")

</div>

![Screenshot 2024-04-30 at 09.30.47](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/1/16f5ff6a5281b73dccae5e1bf6cec57580dbb4d7.jpeg)

Picture for anyone else looking to try this out.
