You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The display of the light with the facet spot set to true seem to be done in function of the camera and not of direction of the light, leading to completely wrong rendering:
/**
* Name: QuadraticLinearandConstantatenuation
* Based on the internal empty template.
* Author: baptiste
* Tags:
*/
model QuadraticLinearandConstantatenuation
global {
init {
create GAMAGeometry2D number: 1 {
location <- {world.shape.width / 2, world.shape.height / 2, 0};
}
}
}
species GAMAGeometry2D {
aspect default {
draw sphere(10) at: location color: #white border: #gray;
}
}
experiment Display type: gui autorun: true {
float minimum_cycle_duration <- 0.01;
float quad;
float constant;
float linear;
int angle;
parameter "Quadratic attenuation" var:quad <- 0.0001 min:0.0000001 max:0.001 slider:true;
parameter "Linear attenuation" var:linear <- 0.001 min:0.0000001 max:0.1 slider:true;
parameter "Constant attenuation" var:constant <- 0.1 min:0.0000001 max:9 slider:true;
parameter "Spot light angle" var:angle <- 0 min:0 max:360 slider:true;
output {
layout #split;
// display using spot lights
// we set the ambient light to 0 to see better the directional lights (as if we were at night time)
display SpotLights type: 3d background: rgb(10, 40, 55) {
camera 'default' location: {-87.5648,126.2534,134.3343} target: {50.0,50.0,0.0};
light #ambient intensity: 0;
light #default intensity: 0;
light "1"
type: #spot
location: {world.shape.width * cos(angle) + world.shape.width / 2, world.shape.height * sin(angle) + world.shape.height / 2, 20}
direction:{cos(angle + 180), sin(angle + 180), 0}
intensity: #red
show: true
linear_attenuation:linear
constant_attenuation:constant
quadratic_attenuation: quad
dynamic: true;
species GAMAGeometry2D;
}
}
}
move the camera
See error
Expected behavior
The spotlight is displayed as a cone where the apex is at the light location and the base is pointed towards the light direction, moving the camera should affect its appearance
The text was updated successfully, but these errors were encountered:
Describe the bug
The display of the light with the facet spot set to true seem to be done in function of the camera and not of direction of the light, leading to completely wrong rendering:
https://github.com/gama-platform/gama/assets/6374469/ae1732bb-4fb7-4a10-acaa-363da513df52
on this video you can see the direction of the spotlight moving along with the camera of the display, while the processing of the lightning itself is correct (see the lightning on the ball that is not changing during the whole video)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The spotlight is displayed as a cone where the apex is at the light location and the base is pointed towards the light direction, moving the camera should affect its appearance
The text was updated successfully, but these errors were encountered: