Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / stencil shadow bone fx

Author
Message
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 7th Feb 2010 16:16
How to use this fx file found in dbpro effects folder?

When using normal dbpo shadows, bipped objects shadows show the bipped itself. Apperantly this stencil shadow bone fx solves this but how to use it?
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 8th Feb 2010 10:08
any help?
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 20th Feb 2010 05:09
After a bit of testing, it seems that DBpro automatically uses this shader when the "set shadow shading on" command is used on a bone animated model. It also seems to load a separate copy of the shader(s) for each model which casts a shadow. As to why it doesn't seem to work for you I don't know, could you post a simple (animated) model which displays the problem?

Note: If anyone is interested in how I concluded this, just ask and I will gladly post a demo.
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 20th Feb 2010 08:53
I used a fpsc model, try any of them.
I also found another thread about a problem that when using internal shadow shader, bipped shadows are shown instead of the mesh and somebody adviced the guy to use this shadow bone fx.
So thats why i ask how to use it.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Feb 2010 10:41
What is a "bipped" shadow?
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 20th Feb 2010 11:44
Quote: "I used a fpsc model, try any of them."
I just tried it and it worked as expected (though it didn't look too good - screenshot attached). What is the model/make of your graphics card?

Quote: "I also found another thread about a problem that when using internal shadow shader, bipped shadows are shown instead of the mesh and somebody adviced the guy to use this shadow bone fx.
So thats why i ask how to use it."
The shader you are referring to actually is one of the "internal" shadow shaders (there are two).

It is my understanding that the shadow shading commands were added specifically for FPSC, so I find it strange that it wouldn't work with FPSC media. Try to use a non-FPSC model and see how that goes, as I have run into some problems when applying shaders of any kind to FPSC characters.

Quote: "What is a "bipped" shadow?"
I was wondering that myself.
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 20th Feb 2010 14:21 Edited at: 20th Feb 2010 14:24
What i mean you can see in the attached photo.

I use specalist model from fpsc.

bipped shadow means, the shadow of the bipped(3d max bones) inside the mesh.

It calculates the shadow from the bipped not from the mesh, it should be otherway around.



EDIT: I manually rotate upper torso according to where player wants to look and lower body angle smoothly follows where i want to look, can it be the problem that i manually mess with the limbs?
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Feb 2010 15:48
I'm none the wiser. What is "the bipped"?

Also, I'm not sure what the red outlined areas and arrows are telling us.

Are you merely telling us that the shadows of the body don't move as they should when the bones move?
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 20th Feb 2010 16:06
@GG
He means a Bipped as the bone structure used to animate a human like figure.

If it hasn't exploded yet, I haven't touched it.
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Feb 2010 16:44 Edited at: 20th Feb 2010 16:44
Quote: "Also, I'm not sure what the red outlined areas and arrows are telling us.

Are you merely telling us that the shadows of the body don't move as they should when the bones move?"

and look closely at the shadows, they are distorted (for lack of a better word) around the torso.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Feb 2010 17:59
Quote: "He means a Bipped as the bone structure used to animate a human like figure."


I've never heard of such a word used in that context till now. Biped perhaps, but not "bipped". It seems I've learnt a new word. Here's an example of what you mean I suppose:

Bipped skeleton

Although I still don't know what's special about a "bipped" skeleton as opposed to a standard boned mesh.

Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 20th Feb 2010 18:33
Quote: "I've never heard of such a word used in that context till now. Biped perhaps, but not "bipped". It seems I've learnt a new word. Here's an example of what you mean I suppose:"


Even the website you posted says it is BIPPED and not biped.

Quote: "- Skinned and texturized low-poly skeleton warrior model
- additional models of rusted shield and ancient sword
- Bipped skeleton
- strike animation included "



You learnt something new already, and now teach me something new about this stencil shadow bone fx
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Feb 2010 18:43
That's why I posted the link!!!! Did you read my post? I said:

Quote: "Here's an example of what you mean I suppose"


Quote: "and now teach me something new about this stencil shadow bone fx"


I would if I could. At least I understand your problem now, which helps.

As it happens I've just been playing with the "tiny.x" model that comes with the MS DX9 SDK and, guess what, it's full of bips .

For example:



Quote: "You learnt something new already"


Yes. Thanks.
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 20th Feb 2010 21:02 Edited at: 20th Feb 2010 21:05
Quote: "I manually rotate upper torso according to where player wants to look and lower body angle smoothly follows where i want to look, can it be the problem that i manually mess with the limbs?"
Why don't you simply remove the code which rotates the limbs and see for yourself?

Quote: "You learnt something new already, and now teach me something new about this stencil shadow bone fx"
It seems that I did, however you didn't answer a few of my questions.

By the looks of it those shadows are not being cast by a skeleton of any kind (notice they are quite thick), If the shadows were cast by the "Bipped" (bi-ped) then they would look like a starwars drone.
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 20th Feb 2010 22:08 Edited at: 20th Feb 2010 22:10
revenant:

look at this post, this guy has the same problem as i do and the solution is unclear in that post too, and they suggest using evolved shaders.

http://forum.thegamecreators.com/?m=forum_view&t=152942&b=1

Quote: "Why don't you simply remove the code which rotates the limbs and see for yourself?"

I did, it has nothing to do with it.
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 21st Feb 2010 08:30 Edited at: 21st Feb 2010 08:32
Ok, I looked at the thread you mentioned and it seems his problem was partially due to the export properties he used when exporting the models from 3DSMax, however this doesn't seem to apply to you since you are using FPSC models.

Since I have never run into the shadow overlapping problem that he was experiencing, I figured that I would test it on my machine. In the attached screenshot, you can see that it worked as expected (though it still doesn't look great).

One thing you do have in common with him is the fact that he didn't specify the model/make of his graphics card, I am guessing you have an ATI card? If so, I don't know how (or even if there is a way) to get the shadows to render properly.

It would also seem that Brendy boy didn't realize that the stencilshadowbone.FX shader is the shader which is automatically applied to bone animated models (considering that he didn't suggest a way to actually apply the shader to a model).

The stencil shadow shader(s) are heavily dependent on the model's vertex normals being correct, which is one of the problems that I have found with FPSC character models. To see this in action, just use the set object normals command on a FPSC character model. A while after I was messing around with that stuff I have learned some things about object FVF formats which might be able to sort some of that out, but I haven't tried it.

In case you don't know where to look for Evolved's shaders, his site has moved to http://www.evolved-software.com/

Edit: Forgot to attach the screnshot.
Duke E
17
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Feb 2010 22:15 Edited at: 22nd Feb 2010 22:18
Solved this now at least for my Blender models exported with "Y Axis up" and "Left handed system". What the exporter does is flip the bone normals (not the skin normals). And the shadow normals are taken from the bones when stencilshadowbone.fx is used, not from the skin faces.

The self shadowing and overlapping shadow problem has to be solved in the shader (see shader code). I have tested combos with different exports and inverted scaling of the models to no avail .

This is the edited stensilshadowbone.fx shader. (The enormous amount of changes are commented )
(The "stensilshadowbone.fx" shader is located in the "Compiler\effects\" directory. Make a backup!)



Note 1... It is necessary recompile any project after this change as this shader is injected in to the exe file on compilation.

Note 2... If stencil shadows on Non bone animated objects are used simultaneously with this change then overlapping "non bone" shadows can be inverted when the bone animated object shadow intersects. Also on primitive DBP created objects. Could probably edit stencilshadow.fx in the same way, but i just inverted the primitive objects with scaling. Most of my non bone objects where made with the same exporter options and did not cause any problem.

Hope it can help someone, maybe it is relevant for Max models also in some cases.

Some after/before pictures on my model.


Regards
Aubergine
16
Years of Service
User Offline
Joined: 19th Jan 2010
Location:
Posted: 23rd Feb 2010 12:52
Hey duke, thanks for this. Although it didnt work as is, it just gave me an impression to play with the following and it worked
I changed this:


Into this:
Duke E
17
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 23rd Feb 2010 16:11
@Aubergine

Nice,

The skin faces of the model must have been flipped somehow, i tried that first also until i figured my exported bones where inverted. Glad i could help in some degree.

Been really irritated not being able to have my models stencil shadows animated, used a static mesh as the shadow origin but knew it should work somehow. Just have to have time to sort it

Regards

Login to post a reply

Server time is: 2026-07-28 19:07:12
Your offset time is: 2026-07-28 19:07:12