How do you enable the Player stencil shadow?

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 902
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

How do you enable the Player stencil shadow?

Post by Veleran »

I have nt seen yet the player stencil shadows.I have also enabled the stencil shadows in the playersetup entity.
I use character selection,and have noticed there are different entries for enabling the stencil shadows in character.ini,and different in each player's Playersettup.ini.

Playersettup has
StencilShadow =

and Character.ini has for the player this entry:
;stencilshadows =
I set both to true and get no shadow.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

There are no options for stencil shadows in the PlayerSetup.ini, only in the Character.ini file which can overwrite the setting in the PlayerSetup entity.
You also have to enable them in the EnvironmentSetup entity (maximum number of lights to use) and in menu->options->video
Veleran
Posts: 902
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Post by Veleran »

I removed the ; and moved the line stencilshadows = true
in the character.ini above the line ; optional entries and it worked.

The shadow of the player is very big because the flashlight is very close to the player.

I have attached the spotight flashlight with arc 160 and z angle -96,
to the player's head bone and i need to offset the potition of the light upwards,so the shadow will be smaller.

Can you add a position offset to the flashlight,so can be in relative potition with the player?
Otherwise i would have to add an extra bone to the player above his head and attach the light there-
and rebuild from the begining the physique-motions etc-which i will propably wont do.
Veleran
Posts: 902
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Post by Veleran »

I found a solution.
First i set the player initial light attribute to 0 to turn it off.
Then i added in the level a dynamic spotlight pointing downwards.
I attached the DSpotlight to an attribute that is attached on the player pelvis bone.

The upper bone of the attribute is 30 units/texels above the player's head.
This way the shadows dont get too stretched.
The attribute is just two bones with no mesh,and wont be visible.
The good thing is that this light never goes off in each level you have placed it.

Note:If you attach the attribute to a player bone like the head which ussally animates and rotates,the light may not point downwards.
Attachments
Dspotlight_attached_to_Player.JPG
Dspotlight_attached_to_Player.JPG (13.76 KiB) Viewed 680 times
User avatar
loirubuon
Posts: 1
Joined: Wed Jul 30, 2008 8:39 pm
Location: Viet Nam

Re: How do you enable the Player stencil shadow?

Post by loirubuon »

He he, I do this success. You must set LevelViewPoint in PlayerSetup = 1, because stencil shadow only view in 3rd mode.
sorry so bad English :?
Post Reply