Making sheets transparent

makingsheetstransparent.png
When using isometric projection to render scenes it is important to provide means to display an object even when it is occluded by other sheets. Sheetengine will dim (in other words make transparent) any sheets that would hide an object if the object is configured accordingly. This is a usual technique to allow the users to see objects behind places where the camera can never reach. Use the following syntax to configure objects for dimming sheets:

obj.setDimming(dimSheets, dimmingDisabled);
Parameters are:
  • dimSheets: if true the object will make occluding sheets go transparent.
  • dimmingDisabled: if true sheets of this object will never go transparent, even if they occlude other sheets or objects.
You can also set dimming of individual static sheets:

sheet.setDimming(dimSheets, dimmingDisabled);
When using objects that can dim sheets that would hide them it is possible to fine-adjust the rate of dimming. This can be done by setting the dimmedAlpha property of sheetengine.drawing:

sheetengine.drawing.dimmedAlpha = alphaValue;
The value should fall between 0 and 1, 0 means total hiding, 1 means no dimming at all. By default it is 0.2.

Last edited Dec 11, 2012 at 9:40 PM by dobsonl, version 2

Comments

No comments yet.