I have light above a table and balls that move on the table. I also have lines to show the trajectories of the balls. Here is a screenshot:
The balls have a self-shadowing effect (good), they are casting some nice shadows onto the table (good), but the lines are also casting shadows (bad). Initially, this made sense, because the node hierarchy looked like this:
render └── table ├── ball1 │ └── ball1_trail ├── ball2 │ └── ball2_trail ├── ball2 │ └── ball2_trail └── etc...
Since I was calling
table.setAutoShader(), all of the child nodes would be set too, which includes the line trails
To avoid shading the trail lines, I created the following node hierarchy:
render ├── trails │ ├── ball1_trail │ ├── ball2_trail │ └── etc. └── table ├── ball1 ├── ball2 └── etc.
Yet after setting
table.setAutoShader(), the trails still cast shadows upon the table, as shown in the picture. This is despite the trail nodes being in a totally separate node. I think what I’ve learned is that since the autoshader has been applied to the
table, all objects cast shadows on it, regardless of whether autoshader has been applied to them. Does anyone have a solution to this problem? I would like to be selective about which objects are capable of casting shadows.