bnpr / Malt

Render framework for NPR.
https://malt3d.com
Other
952 stars 75 forks source link

How to generate lights with geometry nodes? #542

Closed pragma37 closed 6 months ago

pragma37 commented 6 months ago

Discussed in https://github.com/bnpr/Malt/discussions/540

Originally posted by **u3shit** December 26, 2023 I have a simple geometry shader to place some lights automatically (the actual shader I use is a bit more complicated, but this is the gist of it): ![scene](https://github.com/bnpr/Malt/assets/17014489/e599e6d0-b6a3-43da-a530-69c7e67300c2) ![nodes](https://github.com/bnpr/Malt/assets/17014489/08e97526-3473-4dd4-afbb-fdb1a4a007a1) When I render with eevee, I get the expected result: ![eevee](https://github.com/bnpr/Malt/assets/17014489/685d370b-3207-4e4a-90ad-2399a5299433) But with malt, I only get a single light at the position where the original light is: ![malt](https://github.com/bnpr/Malt/assets/17014489/68ad4edf-d659-4df5-95e0-04da843997aa) Interestingly, the light is brighter than what I get with just the original light, so I guess it successfully created 4 lights, it just placed them all at the same place where the original light was, instead of the vertices at the plane. Any idea what can I do, other than somehow converting this geometry shader into a malt render graph (I think that's the only place where I can manipulate lights)? I can't apply the geometry nodes modifier either, because blender doesn't support it. Blender 3.6.5 + Malt blender-3.6-last-version (d6b24fd6b68093846d5e736177287634112547d0), blend file: [blend.zip](https://github.com/bnpr/Malt/files/13772370/blend.zip)
pragma37 commented 6 months ago

fixed by f335963e170be68fa16e6d334561aa47e59663fc