Hi,
I wonder how to stop rendering a specific object for vision sensors, especially when the sensor is under 'color-coded handles' mode.
I have tried 'Hidden during simulation' and changed the visibility layers, but neither works for the rendering. Hope for your reply!
Best,
Kz
Hidden in Rendering
Re: Hidden in Rendering
Hello,
as of CoppeliaSim V4.6, I would use following approach:
as of CoppeliaSim V4.6, I would use following approach:
- set the vision sensor to explicit handling
- in a child script, in the sensing section, call sim.handleVisionSensor(yourVisionSensorHandle)
- if you need to hide/show an object at some point, simply appropriately adjust the visibility layer for that object before/after the call to sim.handleVisionSensor, with sim.setObjectInt32Param(objectHandle, sim.intparam_visible_layers, l)
Re: Hidden in Rendering
Thanks for your reply! I'm wondering what values should I set the visibility layer to hide/show. By default, will all vision sensors always only render the objects in the first layer and ignore other layers? Thanks!
Best,
Kz
Best,
Kz
Re: Hidden in Rendering
To give a more clear example, I attached two images below:
image 1
image 2
Image 1 comes from a normal RGB camera, and Image 2 comes from a handle-coded camera. You can see there are two large shadows above the boxes where these two cuboids should not be rendered. I have set 'Hidden during simulation' = True and set visibility layer = 2, but it still happens.
Best,
Kz
image 1
image 2
Image 1 comes from a normal RGB camera, and Image 2 comes from a handle-coded camera. You can see there are two large shadows above the boxes where these two cuboids should not be rendered. I have set 'Hidden during simulation' = True and set visibility layer = 2, but it still happens.
Best,
Kz
Re: Hidden in Rendering
Do something like:
Cheers
Code: Select all
function sysCall_sensing()
sim.setObjectInt32Param(objectToToggle, sim.intparam_visible_layers, 0) -- hide
sim.handleVisionSensor(visionSensorHandle)
sim.setObjectInt32Param(objectToToggle, sim.intparam_visible_layers, 0xffff) -- show
end