www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on May 09, 2013, 06:50:54 pm

Title: Small Request for the Docs
Post by: AGP on May 09, 2013, 06:50:54 pm
I spent an hour, about a week ago, wondering why my shadows weren't showing up. It turned out I had called setAdditionalColor on my floor to lighten its texture. If you could add a mention of how setAdditionalColor affects the ShadowHelper to the docs, I'd appreciate it.
Title: Re: Small Request for the Docs
Post by: EgonOlsen on May 09, 2013, 10:02:47 pm
Where should i put this? The ShadowHelper itself already has a method setAdditionalColorMode(), which was meant to be used to suppress the effect that an additional color might have if it overrides the actual lighting in its intensity. But putting it into the docs for setAdditionalColor() doesn't seem right, because it mixes engine core functionality with util-stuff.
So...where would you have expected such a hint?
Title: Re: Small Request for the Docs
Post by: AGP on May 10, 2013, 08:28:36 pm
At setAdditionalColor(). Nothing wrong with a mention. It's just the docs. By the way, the ShadowHelper doesn't seem to consider object opacity. The following two lines produce a completely opaque shadow.

Code: [Select]
eyeLaser1 = new Polyline(points, new java.awt.Color(255, 0, 0, 155));
eyeLaser1.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);
Title: Re: Small Request for the Docs
Post by: EgonOlsen on May 10, 2013, 08:40:09 pm
By the way, the ShadowHelper doesn't seem to consider object opacity.
No, it can't do that. It's all about comparing depth values and opacity doesn't change anything on these depth values. Do shadows work with Polylines? I never tried that...
Title: Re: Small Request for the Docs
Post by: AGP on May 10, 2013, 08:45:54 pm
They do.
Title: Re: Small Request for the Docs
Post by: EgonOlsen on May 10, 2013, 08:47:30 pm
fascinating...