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 Product Chat / [x9] Can this be solved?

Author
Message
mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 1st Mar 2012 12:08
I'm working on a game project, but maybe I need to cancel it and save the design for the future, because I'm afraid that this propblem I have is an engine limitation. Don't know if it can be fixed, but I ask here to see if someone knows something that I don't.

I have a level. It's on a graveyard where I want zombies to attack the player from the dark. I have set my level using fog, but when the zombies is in the fog, they are still visible. This worked good at firdt when I tried out the same project in FPSCX10, this could be done setting the ambient light value to mayby 10, and full fog, and a large fog range, then the zombies did not show thru the fog. But FPSCx10 was'nt good enough due to massive problems with models, not showing at all or incorrect. Therefore I made another go in x9.

I can do this by setting the ambient light level to 0 (the zombies wont show in the dark, but then it's pitch black, so the player cannot see anything either. I have tried putting a light in the level and it works like I want it to. But I would need the light to follow the player, so that the area around him/her is always lit.

Can this be done somehow?

Best regards

www.memblockgames.com
maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 1st Mar 2012 14:13 Edited at: 1st Mar 2012 14:15
stupidly (against x10) x9´s fog-system doesnt work together with shaders, so when entities are with shaders, they ignore the dim of the fog. erase shaders off the entities and fog works properly. as in fog/mist you wont recognize reflectings from the far, its not that devastating, but from near would be nice to get the shaders back. unfortunately that doesnt work in x9. i wrote to bond1 if there is any solution pointing at the system of his medusa-model out of one of his packs (changes shaders on the run ingame), but i got no answer until now.

so delete shaders and got the fog-effect... for now until anyone gets that to be done (scene commander eventually will take a look at for v119).

maybe x10 using some dx10-effect for the fog, maybe thats why it can handle this.

Leon Kennedy
17
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 1st Mar 2012 14:13
Actually, yes it can. With the flashlight script. Set the ambience to 0 so it's completely dark, drop the flashlight script in your game, and then only the places where the player is looking are lit up.

I don't know the thread off-hand, so do a search in the script area for flashlight and you'll find it.

Priest of the Church of Joe Wood

In memory of Nanee. 9/1/1993 - 5/16/2009. Rest in Peace, little girl.
mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 1st Mar 2012 16:20
Quote: "stupidly (against x10) x9´s fog-system doesnt work together with shaders"


yaeh! And x10 also has the ability to change the fog range. Imagine a game with fog reaching almost in front of your face, and suddenly just an enemy comes running at you. Imagine! Scary music, scary sounds, Now THAT would be cool! A scene like that can be created with x10, but unfortunally there are more problems than benefits with x10, like many models does not work in x10, and then I also feel it's a bit unstable Maybe it's because TGC failed with DBproX10 or something since it never was officially released :/

For now, the flashlight script is good Thanks Leon!

www.memblockgames.com
The Zombie Killer
15
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 2nd Mar 2012 06:19
@mnemonic
I know how to fix this, but I need to know two things first:
1. How do you even use fog I have no idea how
and
2. How many FPSC units away from the player is the fog.

Solution:



So if the fog is 50,000 FPSC units away from the player (500 segments) then you would replace "(fog distance)" with 50000, the above code must be placed into the main script of every character in the level for it to work though. And I don't know if this solution plays nice with limb scaling, but it should work.

-TZK

mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 2nd Mar 2012 12:04
Hi The zombie killer

First of all I'd like to say thanks, I will try this code out.

Answer to your question:

1. Go to File->Build game, open the tab Level settings and click to edeit the global script, under Level setup in the scriptwizard change Fog Active to 1 (you might also need to change the number below to the same value, this is only to make sure that the fog active value changes after clicking ok, so take an extra look when done)
Click ok to return to the editor.

2. Don't know, have no idea But I'll find out

www.memblockgames.com
The Zombie Killer
15
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 3rd Mar 2012 02:17


Here's an updated version, this should play nice with limb scaling. I also removed the "always," parts as they weren't required, I was tired that night so I didn't realize that I put them there. I wish I could just get to my main PC already to test this out and see how far away the fog is. Then again, could you provide me with a screenshot of the fog so I can take a guess at how many units it is?

-TZK

Login to post a reply

Server time is: 2026-07-03 05:21:38
Your offset time is: 2026-07-03 05:21:38