Battlezone Universe

Battlezone Universe => Archive Vault => Public 1.3 Beta 3 Archive => Topic started by: anomaly on May 03, 2008, 01:47:54 PM

Title: Shadows question
Post by: anomaly on May 03, 2008, 01:47:54 PM
Was there ever added an odf setting that keeps shadows from being rendered for a unit? 
Something like noShadows = 1, and it would mean that no shadows appear from a unit with that setting when shadows are set to high.  Or perhaps a setting in the xsi like how you can add __h or __2 for other effects.

The reason being that I noticed shadows will never render correctly if part of a model is more than ~25-30 meters above the ground.  So for stock buildings like the scion gun spire and that single barrel gun tower wall piece (both well over 30m) this means that they always show part of a shadowy garbled 3d clone next to them.

I'm not really requesting this feature since I'm sure it would be difficult messing with the graphics coding, just wondering whether it had already added at some point.
Title: Re: Shadows question
Post by: GSH on May 03, 2008, 01:52:32 PM
ChangeLog_pb2.txt, approx line 1159

Quote
Added

[GameObjectClass]
CanSelect = true // can select with point-and-space
NoShadow = false // never renders a shadow if true.

   CanSelect's default is true if not specified. Requested by
Commando.  NoShadow's default is false (i.e. have a shadow) if not
specified (compiled, but not really tested).

-- GSH
Title: Re: Shadows question
Post by: General BlackDragon on May 03, 2008, 03:18:03 PM
 :-D

Or turn shadows to "low" in graphics, and it'll use BZ1 style simple shadows.
Title: Re: Shadows question
Post by: Commando on May 03, 2008, 03:33:31 PM
Is the issue related to object height?  I never thought height could be the cause.  I know disabling one of the shadow settings seems to eliminate the issue.  I think it is the volume setting.
Title: Re: Shadows question
Post by: anomaly on May 03, 2008, 06:34:55 PM
Height is the issue for the shadow being rendered 3d and in mid air.  Other things like intersecting polygons and reversed normals can cause other things like a shadowy "curtain" being drawn from the object to the ground (or the 3d clone in mid air if its too high up) and which sometimes cancels out the shadowed areas.

But, yeah, as far as I could tell, the game draws a line from a vertex on the model away from the sun and, ideally, to the ground.  However, if the line doesn't reach the ground within 25-30 meters, it just sticks it in mid air.  Funny they made it like that considering some stock units easily exceed that limit.
Title: Re: Shadows question
Post by: bigbadbogie on May 03, 2008, 06:40:15 PM
i never saw that until i started playing the 1.3 patches - hmm
Title: Re: Shadows question
Post by: anomaly on May 04, 2008, 01:14:25 AM
Quote from: bigbadbogie on May 03, 2008, 06:40:15 PM
i never saw that until i started playing the 1.3 patches - hmm
Well, stencil shadows never worked for me until 1.3, maybe the same for you?

Do you guys think it would be a good idea to use that setting in the spire odf, and any others that need it, to be released with pb4?  I mean, I can't see anyone complaining that they no longer get to see garbled shadows.
Title: Re: Shadows question
Post by: bigbadbogie on May 04, 2008, 01:35:58 AM
or the shadows could actually be fixed - thats a better option
Title: Re: Shadows question
Post by: Nielk1 on May 04, 2008, 11:48:48 AM
I don't think anyone uses stencil because it is a well known fact it is broken.

PB4 is at the point where it will receive no more features and graphics code fixes can only really be done now by changing to a new directX and shunning many of the BZ2 players because of their outdated video cards.
Although it might be fixable for the current DX level, it is utter hell and the graphics code is something GSH tries to avoid.
Title: Re: Shadows question
Post by: anomaly on May 04, 2008, 03:26:34 PM
Quote from: bigbadbogie on May 04, 2008, 01:35:58 AM
or the shadows could actually be fixed - thats a better option
Well, if you've been paying attention at all for the past 7 years you'd know that GSH really doesn't want to touch the abomination that is the bz2 graphics code.  So I knew that wasn't an option.

Quote from: Nielk1 on May 04, 2008, 11:48:48 AM
I don't think anyone uses stencil because it is a well known fact it is broken.
It's really not that broken for stock play.  Aside from the gun tower, gun spire, a few really tall structures, and maybe the bomber (forgot to test that) every stock unit displays shadows correctly. At least for me. 
Title: Re: Shadows question
Post by: Nielk1 on May 04, 2008, 04:20:46 PM
Its bad for animated things too I think...