Wish - Vismach change background color
- zz912
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 509
- Thank you received: 81
05 Sep 2023 10:26 #279940
by zz912
Wish - Vismach change background color was created by zz912
I would like to ask the local developers to make it possible to change the background color in Vismach.
Thank you
Zdenek
Thank you
Zdenek
Please Log in or Create an account to join the conversation.
- Aciera
- Online
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
05 Sep 2023 11:16 #279942
by Aciera
Replied by Aciera on topic Wish - Vismach change background color
Attachments:
The following user(s) said Thank You: tommylight, zz912
Please Log in or Create an account to join the conversation.
- zz912
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 509
- Thank you received: 81
05 Sep 2023 12:02 #279948
by zz912
Replied by zz912 on topic Wish - Vismach change background color
Please Log in or Create an account to join the conversation.
- Aciera
- Online
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
05 Sep 2023 12:38 - 05 Sep 2023 12:43 #279957
by Aciera
Replied by Aciera on topic Wish - Vismach change background color
Part color in vismach is defined in the model file, some examples are:
tool = Color([1,0,0,0], [tool] )
rot_point_set = Collection([
Color([1,0.8,0,1],[CylinderX(-5,0.2,5,0.2)]),
Color([1,0.8,0,1],[CylinderY(-5,0.2,5,0.2)]),
Color([1,0.8,0,1],[CylinderZ(-5,0.2,5,0.2)])
])
If no color is defined the part defaults to white (I think) so you may have to add the Color definitions yourself. If you need help then please post the model file.
[edit]
syntax is Color([red,green,blue,alpha],[<your_part>])
Note that 'alpha' seems broken, so it's value is ignored.
tool = Color([1,0,0,0], [tool] )
rot_point_set = Collection([
Color([1,0.8,0,1],[CylinderX(-5,0.2,5,0.2)]),
Color([1,0.8,0,1],[CylinderY(-5,0.2,5,0.2)]),
Color([1,0.8,0,1],[CylinderZ(-5,0.2,5,0.2)])
])
If no color is defined the part defaults to white (I think) so you may have to add the Color definitions yourself. If you need help then please post the model file.
[edit]
syntax is Color([red,green,blue,alpha],[<your_part>])
Note that 'alpha' seems broken, so it's value is ignored.
Last edit: 05 Sep 2023 12:43 by Aciera.
The following user(s) said Thank You: zz912
Please Log in or Create an account to join the conversation.
- zz912
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 509
- Thank you received: 81
05 Sep 2023 13:43 #279971
by zz912
Replied by zz912 on topic Wish - Vismach change background color
You dont understand me.
My color of parts is white:
a_kryty = Color([1,1,1,1],[a_kryty])
But in visualization it has blue (or purple) "shadow".
Look at:
linuxcnc-2.9/configs/sim/axis/vismach/scara/scara.ini
My color of parts is white:
a_kryty = Color([1,1,1,1],[a_kryty])
But in visualization it has blue (or purple) "shadow".
Look at:
linuxcnc-2.9/configs/sim/axis/vismach/scara/scara.ini
Please Log in or Create an account to join the conversation.
- Aciera
- Online
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
05 Sep 2023 15:05 - 05 Sep 2023 15:11 #279985
by Aciera
Replied by Aciera on topic Wish - Vismach change background color
Ah, I see. Yes you can adjust that in these lines of 'vismach.py':
I haven't tried them all but if you change line 790 to this:
glLightfv(GL_LIGHT0+1, GL_DIFFUSE, (.4,.0,.0,0))
You will change the blue to a red shadow. (So adjust to your needs)
[edit]
Note there are two diffuse light sources ('GL_LIGHT0' and 'GL_LIGHT0+1') so you may have to adjust both.
I haven't tried them all but if you change line 790 to this:
glLightfv(GL_LIGHT0+1, GL_DIFFUSE, (.4,.0,.0,0))
You will change the blue to a red shadow. (So adjust to your needs)
[edit]
Note there are two diffuse light sources ('GL_LIGHT0' and 'GL_LIGHT0+1') so you may have to adjust both.
Attachments:
Last edit: 05 Sep 2023 15:11 by Aciera.
The following user(s) said Thank You: zz912
Please Log in or Create an account to join the conversation.
- zz912
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 509
- Thank you received: 81
06 Sep 2023 06:27 #280059
by zz912
Replied by zz912 on topic Wish - Vismach change background color
Attachments:
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.120 seconds