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.

FPSC Classic Scripts / Dynamic shadows

Author
Message
Pus In Boots
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location: S.M.I.L.E. industries
Posted: 11th Apr 2007 14:00
I've been sitting on some ideas lately which have lead me to the question of shadows that correspond with a dynamic entity. I've heard there is a way of doing this by changing a value in a built game file, but I need specifics. How do I do this?

I know I keep changing my signature, so what?
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 11th Apr 2007 14:42
Once you have built your game / level etc

Go into the built game folder within C:\Program Files\The Game Creators\FPS Creator\MyGames\

Then open the 'setup' config file within this folder and change the following line under [GAMERUN] to:

dynamicshadows=1

Now save the 'setup' config file to keep the changes and load your game.

This will give you dynamic shadows for all dynamic entities which are not animated i.e. dynamic shadows currently don't work on things like characters or spinning fans etc.

Be aware that if you have a lot of dynamic entities in a given area for physics purposes etc, adding dynamic shadows will have a performance hit on your game. This is due to the fact that changing the dynamic shadows value will add the effect to any dynamic entity in your game where possible by default. So either choose where you are going to place dynamic entities with this in mind or don't use the feature at all if you want a lot of physics in the game.

It would probably be worth finding out if a dynamic shadow can be determined for an entity in it's .fpe somewhere e.g. 'castshadow value' as this would give you a greater level of controlling the effect.
Pus In Boots
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location: S.M.I.L.E. industries
Posted: 11th Apr 2007 14:47
Can't be used for characters, huh?

Well, thanks for that. This should come in very handy. Also, it makes me want X10 even more!

I know I keep changing my signature, so what?
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 11th Apr 2007 16:42
Indeed

I purchased the 'Hands on DBPro' volume 2 and looked into the whole shadows thing and I think the lack of dynamic shadows for animated entities is due to the following:

For an object to be able to cast a shadow, the model first needs to be turned into a mesh then the mesh needs to be specified in the 'set shadow shading statement'

The manual goes as far as creating a unique realsitic shadow which matches the model from which it is cast. It then goes on to mention that the next problem is when the model is animated, the shadow is fixed and not animated. It only moves around with the object but doesn't match it's animations and leaves this open for you to have a think about.

It's likely dynamic shadows dont show up on animated enemies at all in FPSC because it would look unrealistic to have a character running around with a static shadow and has been therefore been designed that way.

I agree with you that it does make the prospect of X10 more appealing when you see that this kind of thing is not an issue and even has things like soft shadows going on. I would be disappointed if X9 didn't receive updates which address this kind of thing purely for X10 sales but then I would say that.

I think that the best approach might be to wait until the next major release of the FPSC X9 source code and then have a real community effort to try and address some of these things. I'm not saying this will be easy but with texts like 'hands on DBPro' volume 2, the source code should start becoming a little more accessible. There are some really good features explained in this book like the 'Set reflection shading on' command which enables true reflection rendering and loads of other things people have wanted in their games.

The currently available source code is for v1.0 now which is just too far out of date to invest any time, unless merely browsing. Otherwise it's just a case of wait and see what TGC / Lee has in store for future releases.

Alternatively there is some information in one of TGC's newsletters explaining how to get FPSC levels into DBPro so this could be the way to go for anyone that wants to have a more hands on approach to the coding side of their development.

Of course if your loaded then maybe just buy all the gear, FPSC X10 / DBPX10 and save yourself some hassle. I'm not giving up on X9 for a while yet though.
TGPEG
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 22nd Apr 2007 21:47
Quote: "the model first needs to be turned into a mesh then the mesh needs to be specified in the 'set shadow shading statement'"


I didn't really understand most of that, but yes, I completely agree with everything you just said.
Anyway, FPS Creator just crashes whenever I set the Dynamic Shadows property to one in the setup file. Is it my PC, or is it because I'm an idiot and I've forgotten something?

Your signature has been deleted due to the fact that it was far too humourous to possibly show.
http://www.fpsinsane.co.nr/ -New FPSC Forums By Jenkins
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 24th Apr 2007 03:00
Quote: "Is it my PC,"


Difficult to know what to say here as I can't recall experiencing a crash for this reason although most of us could each write a book on FPSC crashes 101.

It's most likely to be a graphics card issue I would say, although I think that shadow volumes have more impact on the CPU rather than the GPU for calculation purposes.

All I can advise is check your graphics card against the recommended spec e.g. does your card support shaders / shadow volumes etc and then maybe start by only having 1 object in your room dynamic, test it with dynamic shadows on and then build up. If you get a crash only using this feature on 1 room object then I would say it's likely to be hardware orientated.

Quote: "or is it because I'm an idiot and I've forgotten something?"


Not if you've done exactly as stated in my first post.

Good luck with this
spex_guy
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: coming to a forum near you!!!
Posted: 16th May 2007 04:41 Edited at: 16th May 2007 04:41
Quote: "I've been sitting on some ideas lately which have lead me to the question of shadows that correspond with a dynamic entity. I've heard there is a way of doing this by changing a value in a built game file, but I need specifics. How do I do this?"


Yeah, I am wanting to know the same thing. I saw the thread on a shadow tutorial, http://forum.thegamecreators.com/?m=forum_view&t=69876&b=23

Regards,
spex

Go here!
http://forum.thegamecreators.com/?m=forum_view&t=94201&b=19
Makes the sense of my location!

Login to post a reply

Server time is: 2024-11-23 17:56:10
Your offset time is: 2024-11-23 17:56:10