Open Jorkdekok1 opened 5 months ago
I have worked on rendering the 2 sided thorus, changing the size depending on the distance to the object and the occlusion. I was already working on changing the location of objects depending if the animal is near the object and I made script that moves the object 180 degrees when it is near the object but comes back when the animal is not near the object.
Two-sides thorus https://github.com/Jorkdekok1/CAR-system-Neurophysiology/assets/126770475/b87ec6cd-6525-4634-a644-634c2da2fafb
scaling depending on distance (I scaled to the power of 3) https://github.com/Jorkdekok1/CAR-system-Neurophysiology/assets/126770475/13757a5b-f9b7-4865-bf11-d73bce8e09e0
teleportation https://github.com/Jorkdekok1/CAR-system-Neurophysiology/assets/126770475/5b38c1f9-c8ef-488a-be0d-a7f67f55af58
I am struggling a bit with understanding statemachines with bonsai nodes. So I made the teleportation with 2 phyton transforms and an expression transform in between. I define the location of the object 2 times (to calculate the distance to the object and to teleport) so the script still has to be approved upon to make the object run away every time it is close to the object.
While trying to make to make the script where the object moves away dynamically, I thought about two possible avenues to take. I made one script that does not work yet, but it could move an object when the animal is located within the area and stops to move the object when the animal is not located in the area (the group workflow called iteration). The script does not work yet because it iteration is continuously updated therefore the object will reset to the original staring location. It does not matter if I define i = 0 within the python script because then the variable is also continuously updated
I made another script that does work but also does not implement a dynamic update location (so the object moved not when the animal is close but when it is in a certain area; dynamic location node). In this script I log when the animal is in the ROI and put in into a behavior subject (a binary signal that accumulates; close_to_object node). Then I move the object away or let the starting location through with the moving object node. I cant generalize the script by connecting the close_to_object with the combine latest that provides the actual location of the object because then the close_to_object node is defined in terms of itself. (see third picture)
Priority (in order): object 2 different colours on different sides. Thorus to see the change in the object depending on the location size of object depending on distance. occlusion (one object behind another). As the animal approaches the object runs away (if distance 20cm, move left) fog (radius around animal and show thing within radius with lower contrast, other parts high contrast)
Different types of manipulations