ascottk on 23/3/2005 at 07:47
Hi everyone. Hopefully you're not like me and become obsessed with T3ed. Anyway, I've managed to change some vision properties involving scripts, volumes (works on shallow-water volumes), and fog settings.
Here's how I did it:
1. First go to the level properties (F6) then set bDistanceFog and bFogZone in ZoneInfo to True. You could change fog color to whatever you like and set DistanceFogEnd and DistanceFogStart to 0 under ZoneLight.
2. If you have a dry canal or something of the sort and follow (
http://www.ttlg.com/wiki/wikka.php?wakka=ShallowWater) these directions, you'll have your water.
3. Make some scripts, one that changes vision when you go into the ShallowWaterVolume and one that changes back.
First script (I named in WaterEnter):
CONDITIONS
When linked volume(s) [MYSELF] are breached by [Category Player]
ACTIONS
Send trigger message [WorldMode] (Not sure this is necessary)
Activate screen tinting to RGBA [10] [150] [150] [25] (change if you like)
Change level fog range settings to Start: [10.00], End: [1800.00], over [0.50] seconds.
Set [BaseFOV] to [46.00] on linked objects of [PLAYER]
Reset script conditions and actions
Second script (WaterExit):
Just like the first except:
CONDITIONS
When linked volume(s)[MYSELF] are exited by [Category Player]
ACTIONS
Deactivate screen tinting
Change level fog range settings to Start: [0.00], End: [0.00], over [0.50] seconds.
Set [BaseFOV] to [85.00] on linked objects of [PLAYER]
Reset script conditions and actions
Attach those scripts to the ShallowWaterVolume and you could add the ForceFirstPerson and UnlockFirstPerson scripts too (Under cameraFunctions)
WARNING: when the fog settings on your level is set to zero, all you see is the color of your fog when you Toggle Flesh Render Output. If you want to tweak your lights then disable fog in the level properties.
Adding BubblesWARNING - This includes modifying the gamesys!
Follow (
http://udn.epicgames.com/Two/ExampleParticleSystems#Bubbles) UDN's Bubbles Emitter Tutorial. The bubbles here are too big. I made mine 2.0 MAX, 0.2 MIN on XYZ.
Add a RigidAttachment link from the Bubble to the PlayerGarrett archetype in the Actor Class Browser.
Attachment -> m_attachmentBone:
Attachment -> m_parentBone: lip_t_center
Hidden -> bDontPropogateHiddenFlagToChild: False
Highlight -> bPropagatesHighlight: False
Lifetime -> bDeleteChildOnDeath: True
Link -> m_GroupName: None
Link -> m_name: Bubbles
Spawn -> bDontSpawn: True
Add a flag called WaterEnterPlayer
Add a couple of scripts for when the player enter a volume
Volume Script
CONDITIONS
When linked volumes(s) are breached by [Category_Player]
ACTIONS
Set flag [WaterEnterPlayer] to [TRUE] expires . . . (etc.)
Reset script conditions and actions
PlayerGarrett Script (attach to PlayerGarrett Archetype)
CONDITIONS
When [WaterEnterPlayer is set to [TRUE]
ACTIONS
Spawn and attach object type of RigidAttachment Link(s) with name [Bubbles] to me
Do the opposite for exiting the water
When WaterEnterPlayer=FALSE
Delete linked object(s) [RigidAttachment:Bubbles]
Jadon on 23/3/2005 at 15:05
There's a script function (can't remember if its condition or action) that deals with physics I saw somewhere when fiddling with the script creator. Didn't have much time to mess with it with my program admission portfolio coming up but now thats past and I on spring break I might look at it more and see what it can do.
ascottk on 24/3/2005 at 02:35
The default BaseFOV is 85 so you can add a script to change the FOV to 120 ("Cradle Vision"). I changed my BaseFOV while in the ShallowWaterVolume to 150 so it's really distorted.
Just add to ACTIONS of "WaterEnter"
Set [BaseFOV] to [120.00] on linked objects of [PLAYER]
Add to ACTIONS of "WaterExit"
Set [BaseFOV] to [85.00] on linked objects of [PLAYER]
ascottk on 24/3/2005 at 04:03
I just looked up underwater vision distortion and (
http://www.scubageek.com/geek/articles/wwwvis.html) this site says:
Quote:
(i) refraction at the planar water/air interface causes objects to seem closer and bigger than they really are
(ii) the apparent magnification is a function of the angle of incidence at the interface, thus causing a 'pin-cushion' distortion at the periphery of vision
(iii) it reduces the binocular field of view from about 180 degrees in air to no more than 97.2 degrees in water, because of total internal reflection at the water/air interface (see the article entitled 'Total Internal Reflection').
So according to that, the BaseFov should change to 46 when underwater (multiply .54 with the default BaseFOV of 85).
Caseus on 9/9/2005 at 12:39
Bringing this one back....
As I was playing with this last night....
The vision distortion works great but I was wondering If anyone had figured out how to make Garrett seem like he is swimming when entering a Volume. I tried several scripts that elude to changing object weights but none seem to be able to apply physics of any sort to the Player_Character. A simple Gravity script would be nice. Perhaps it is just my weak scripting skill and not a fault of the game.
Just wanted to get this old thread out again to see of anyone has had any luck with a simulation of swimmable water.
ascottk on 9/9/2005 at 15:53
I haven't had a chance to experiment with this lately but I had an idea:
Quote Posted by ProjectX
the command simtime(scale(0.5)) slows down everything by half!
So scale down the simtime while under water (player), while speeding everything up outside the water (AI outside of water):
Quote Posted by ascottk
Actions>Properties>Set [AnimationSpeedMulitplier] to [0.50] on linked objects [MYSELF]
or
Actions>Properties>Set [AnimRate] to [0.50] on linked objects [MYSELF]
The AnimRate might be around 2.00 & the simtime to 0.5 if you want it to seem like water slows you down by half.
Just change the AnimRate to counteract the simtime
Gestalt on 9/9/2005 at 15:53
I've been experimenting a bit over the last few days, but haven't had much luck. I don't think the t3fly command can be used, since it just disconnects the character from the camera. I had a few ideas revolving around teleportation to deal with that, but I don't think they're too practical. Besides which, I didn't manage to get t3fly to work with non-debug versions of the game. I'm going to experiment with the buoyancy property next, I think.
Caseus on 9/9/2005 at 18:44
Wow, I was taking a different approach entirely..
With no luck however..
Read some tuts on UT2k3 and Using Zoneifo to apply Gravity and other Physics.
linkage: (
http://wiki.beyondunreal.com/wiki/ZoneInfo_(UT))
I also Tried Using Volumes like ShallowWaterVolume.
Still no go.. the properties don't seem to propagate to the player.
By default UT's Volume Properties propagate to the player automatically, aparently not the case with T3..
SO!!!
I browsed a bit, found a "PhysicsVolume" and thought "THIS IS IT!.. somthing is gonna happen!!"
Again tried first applying physics properties to it directly and then using modified scripts based on the above "WaterEnter" and WaterExit". Garrett does not react to any properties applied to the voluimes nor do objects tossed into them. So I've been unable to get Garrett or anything for that matter to react to a Volume or Zoneinfo property regardless of script or setting aside from changing the FOV and Displaying a bit of fog (How exciting!). :confused:
So at this point short of posting the dozens of scripts I've tried or completely rewriting the engine to include the darn swimmable water Im at a loss. But I will attempt some of the above mentioned tips and see what happens.
still hopefull...