Gem icon indicating copy to clipboard operation
Gem copied to clipboard

[light] object does not render in second [gemwin] unless sent [debug 1(

Open rnkn opened this issue 1 year ago • 2 comments

Detail

My apologies if this is user error, but I can't figure out what's happening with this lighting.

I have found that the [light] object does not render in a second [gemwin] unless sent a [debug 1( message.

Here is my patch (also in plaintext at bottom):

Screenshot 2025-01-04 at 3 34 50 pm

Here's what I'm getting at step 1, 2, 3, & 4:

Screenshot 2025-01-04 at 3 36 05 pm

Enabling lighting only works in first [gemwin]:

Screenshot 2025-01-04 at 3 36 47 pm

Enabling debugging renders lighting in both windows:

Screenshot 2025-01-04 at 3 37 07 pm

Now lighting works as expected:

Screenshot 2025-01-04 at 3 37 21 pm

My assumption is that lighting in step 2 should work as it does in step 4. Is this my error, or a possible bug?

Thanks for your time.

#N canvas 747 46 628 760 12;
#X msg 85 44 create \, 1;
#X msg 133 74 destroy \, 0;
#X msg 175 113 dimen 360 360;
#X msg 183 153 offset 50 480;
#X obj 103 531 scaleXYZ;
#X obj 102 576 cube;
#X obj 120 456 loadbang;
#X msg 120 483 2;
#X msg 177 198 view 0 3 5 0 -20;
#X msg 177 239 view 5 3 3 -45 -20;
#X obj 266 609 light;
#X msg 196 320 lighting \$1;
#X obj 196 284 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X msg 399 498 debug \$1;
#X obj 399 454 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 264 496 translateXYZ;
#X msg 289 424 -2 2 2;
#X obj 287 395 loadbang;
#X obj 287 455 unpack f f f;
#X obj 100 419 gemhead 20;
#X obj 10 61 loadbang;
#X text 181 45 <- 1;
#X text 236 284 <- 2;
#X text 435 455 <- 3 \, 4;
#X obj 50 359 gemwin;
#X obj 136 359 gemwin;
#X obj 272 363 gemhead 10;
#X connect 0 0 24 0;
#X connect 0 0 25 0;
#X connect 1 0 24 0;
#X connect 1 0 25 0;
#X connect 2 0 24 0;
#X connect 2 0 25 0;
#X connect 3 0 25 0;
#X connect 4 0 5 0;
#X connect 6 0 7 0;
#X connect 7 0 4 1;
#X connect 8 0 24 0;
#X connect 9 0 25 0;
#X connect 11 0 24 0;
#X connect 11 0 25 0;
#X connect 12 0 11 0;
#X connect 13 0 10 0;
#X connect 14 0 13 0;
#X connect 15 0 10 0;
#X connect 16 0 18 0;
#X connect 17 0 16 0;
#X connect 18 0 15 1;
#X connect 18 1 15 2;
#X connect 18 2 15 3;
#X connect 19 0 4 0;
#X connect 20 0 2 0;
#X connect 20 0 3 0;
#X connect 20 0 9 0;
#X connect 20 0 8 0;
#X connect 26 0 15 0;

Gem Version

0.94.git 2971c2b8

Pd Version

0.55.2

Operating System

macOS

OS Version

15.2 Sequoia

Which CPU are you using?

arm64 ("64bit ARM"; e.g. Apple Silicon,...)

rnkn avatar Jan 04 '25 05:01 rnkn

it's certainly a bug.

it's rather low-priority for now, as there's a simple workaround (send the debug messages at startup)

umlaeute avatar Feb 11 '25 10:02 umlaeute

oh, and the object is rendered fine. it's just that it is black (on the black background), so it's hard to see. changing the background to e.g. 🔴 , will show it's outline...

it's basically the same as not putting a light into a scene that has lighting enabled:

[create, 1, lighting 1, color 1 0 0(
|
[gemwin]

[gemhead]
|
[cube]

umlaeute avatar Feb 11 '25 10:02 umlaeute