You can change the transparency of shapes in the 3D display by changing the transparency attributes in the style class based on a visibility attribute of the agent. For example, your agents could check their current position in 3D space and only return isVisible() true when the agent is in the plane of space you'd like to visualize. This will only show agents in the 3D display that exist on your defined plane, which can be any x,y,z orientation through the space. In your style class you will need to update the transparency in the getAppearance(...) method as follows:
public TaggedAppearance getAppearance(MyAgent agent, TaggedAppearance taggedAppearance, Object shapeID) {
if (taggedAppearance == null) {
taggedAppearance = new TaggedAppearance();
// Customize your agent style here...
AppearanceFactory.setMaterialAppearance(taggedAppearance.getAppearance(), Color.white);
}
if (trans == null) {
trans = new TransparencyAttributes();
trans.setCapability(TransparencyAttributes.ALLOW_VALUE_READ);
trans.setCapability(TransparencyAttributes.ALLOW_VALUE_WRITE);
trans.setCapability(TransparencyAttributes.ALLOW_MODE_READ);
trans.setCapability(TransparencyAttributes.ALLOW_MODE_WRITE);
trans.setTransparencyMode(TransparencyAttributes.FASTEST);
taggedAppearance.getAppearance().setTransparencyAttributes(trans);
}
if (agent.isVisible())
trans.setTransparency(0.0f);
else
trans.setTransparency(1.0f);
return taggedAppearance;
}
You could also adjust the transparency value from 0 to 1 to provide different levels of transparency, so that the agents of interest are purely opaque (0.0f) while agents in the periphery are very transparent (0.8f).