View Full Version : [needed] water interaction + anim
keltos01
09-06-10, 10:05 AM
http://a.imageshack.us/img545/1934/66969762.jpg (http://img545.imageshack.us/i/66969762.jpg/)
the AA gun moves following the arrow's direction, but it doesn't stop rotating...
I need to make an object move when my boat submerges. And appear when we surface...
where do I find a water interaction controller and how do I link it to my model's animation ?
thanks
keltos
Look in the flooding holes or the dive planes. They both change their status when submerged/surfaced.
ETR3(SS)
09-06-10, 04:05 PM
Silverwolf may be the one to go to for advice as well. A lot of his mods do what you're describing.
keltos01
09-08-10, 06:26 AM
Where is the controller linked to the planes ? the one that starts the animation as you dive ?how is it linked to the planes ?
what I managed so far is to rotate the gun backwards and then to lower it in the hull, but the animation loops ingame :damn:
keltos
keltos01
09-08-10, 04:02 PM
http://a.imageshack.us/img291/9185/encounterx.jpg (http://img291.imageshack.us/i/encounterx.jpg/)
surfacing : the guns come up :)
Going to periscope depth :
http://a.imageshack.us/img690/5819/60996587.jpg (http://img690.imageshack.us/i/60996587.jpg/)
you can see the AA guns lowering themselves into the hull.
http://a.imageshack.us/img716/2909/encounter.jpg (http://img716.imageshack.us/i/encounter.jpg/)
underwater : AA gun stowed away !
one gun to check though but it works !! :) :)
I copied the bak plane node from the hull with its label, set the parent id of both AA guns to that of the added backplane, set the plane to visible=no, moved it to 0,0,0 so it would be centered and the AAs at their right places.
the view here above is when surfacing the sub : the AAs are there
This I couldn't figure out alone : thanks to Silverwolf and Peabody who told me what to do ! :up:
keltos
keltos01
09-09-10, 06:30 AM
where does the bow/rear planes animation come from ?
it's not in the submarine.dat , I can't find their ids in any of the files but for the .zon (damage)
it is also linked to a water interaction node somewhere... where ???
anyone knows ?
keltos
keltos01
09-09-10, 06:32 AM
http://a.imageshack.us/img530/7717/wstcontroller.jpg (http://img530.imageshack.us/i/wstcontroller.jpg/)
Uploaded with ImageShack.us (http://imageshack.us)
found a WaterSurfaceTransition controller in the particles !
type 10/-1
seems to activate the particles when the Y value becomes negative thus when submerging !
keltos
keltos01
09-09-10, 11:03 AM
found a WaterSurfaceTransition controller in the particles !
type 10/-1
seems to activate the particles when the Y value becomes negative thus when submerging !
I tried to link the anim to the WST controller, no dice : no rotation when submerging.
I tried linking it to the AA node, and the anim to the aa node as well : rotates all the time...
and the planes don't have a WST node or anything similar !!! :damn:
what makes the planes rotate when we submerge ?
what controller is it ???
keltos
peabody
09-10-10, 01:06 AM
where does the bow/rear planes animation come from ?
it's not in the submarine.dat , I can't find their ids in any of the files but for the .zon (damage)
it is also linked to a water interaction node somewhere... where ???
anyone knows ?
keltos
How did you determine it is connected to a "water interaction" node?
The animation for the dive planes comes from the subs.sim file. Well that is where the dive plane is defined, where the actual animation comes from I do not know.
Do this:
On your Jyunsen B.sim file go to Unit_Submarine and on the Rear_Diveplane replace the diveplane with
[0]= Japan_FLG.
Now save it and copy to the mods folder, enable it, start a quick mission with the sub on the surface. Your flag will be on the 'wrong' side of the pole. Now without moving the sub just select a depth so the sub will dive and you can watch the flag animate the same way the Diveplane would have.
I don't know if the animation is hardcoded or comes from another file, but as far as the sub is concerned it comes from the .sim file. Where the .sim file gets the information I don't know.
Now of course you can go back and change it back the Rear Diveplanes.
Peabody
keltos01
09-10-10, 02:28 AM
[QUOTE=peabody;1489374]How did you determine it is connected to a "water interaction" node?
I did not
I found the Water Surface Transition Controller in the particles nodes, it says that when the sub goes below the surface, = depth<0, it starts the particles.
I then tried to link my AA gun animation to that WST controller, and the controller to the A01 node in turn, hoping it would start the animation when I submerge. it did not.:nope:
The animation for the dive planes comes from the subs.sim file. Well that is where the dive plane is defined, where the actual animation comes from I do not know.
me neither and it bugs me ! maybe grrr hardcoded grrr ?
Do this:
I will try it
On your Jyunsen B.sim file go to Unit_Submarine and on the Rear_Diveplane replace the diveplane with
[0]= Japan_FLG.
Now save it and copy to the mods folder, enable it, start a quick mission with the sub on the surface. Your flag will be on the 'wrong' side of the pole.
ok
Now without moving the sub just select a depth so the sub will dive and you can watch the flag animate the same way the Diveplane would have.
:o
I don't know if the animation is hardcoded or comes from another file, but as far as the sub is concerned it comes from the .sim file. Where the .sim file gets the information I don't know.
ok I'll look some more unless someone here knows...
Now of course you can go back and change it back the Rear Diveplanes.
;)
keltos
Peabody
peabody
09-10-10, 10:33 AM
[QUOTE=peabody;1489374]
The animation for the dive planes comes from the subs.sim file. Well that is where the dive plane is defined, where the actual animation comes from I do not know.
me neither and it bugs me ! maybe grrr hardcoded grrr ?
Do this:
I will try it
On your Jyunsen B.sim file go to Unit_Submarine and on the Rear_Diveplane replace the diveplane with
[0]= Japan_FLG.
Now save it and copy to the mods folder, enable it, start a quick mission with the sub on the surface. Your flag will be on the 'wrong' side of the pole.
ok
Now without moving the sub just select a depth so the sub will dive and you can watch the flag animate the same way the Diveplane would have.
:o
I don't know if the animation is hardcoded or comes from another file, but as far as the sub is concerned it comes from the .sim file. Where the .sim file gets the information I don't know.
ok I'll look some more unless someone here knows...
What I was getting at is you want to link the guns animation to the diveplanes animation, and as far as the sub is concerned you have found them. They are in the .dat file, the node names are what you put into the .sim file for the diveplanes.
Peabody
Madox58
09-10-10, 05:51 PM
The dive planes animation is a Hard coded thing, yes.
You can add a 3rd dive plane to the forward or rear planes.
The controller only looks for the number of planes.
It does not restrict that number as far as I recall.
(I could be wrong! And alot of times I am!)
:haha:
BUT!
Once the Sub levels?
Up go the planes!
If the Planes rotate to a Surface position?
So would the Gun.
Now, the water transition and water interaction controllers.
Water interaction only happens once.
Water Transition happens every time the controller meets it's settings.
Some SH3 mods that do the water drain effect had to use work arounds because Water Transition is only in SH4.
(Well probably SH5 also but that's another can of worms!)
Water Transition can be linked to anything you want.
Not just a particals effect.
It's a controller that says when to start and under what conditions.
The particles only stop because THEY are set to stop.
The controller is not telling them to stop.
Only when to START!
peabody
09-10-10, 06:41 PM
The dive planes animation is a Hard coded thing, yes.
You can add a 3rd dive plane to the forward or rear planes.
The controller only looks for the number of planes.
It does not restrict that number as far as I recall.
(I could be wrong! And alot of times I am!)
:haha:
BUT!
Once the Sub levels?
Up go the planes!
If the Planes rotate to a Surface position?
So would the Gun.
Actually I did get this working on a different sub than we are talking about in this thread. So I think something is different between the two subs.
But anyway, it did NOT happen in my test the way you say it should.
I submerged the sub to 25m and the guns moved to their new location and stayed there. I raised the sub to 20m, the guns still stayed put. I went to 60M, the guns never moved. I then surfaced the boat and the guns did not move until the sub was completely surfaced and the dive planes level then the guns went back to their original location.
Now having said that I do have to admit the animation played backwards. We want the gun to go into the deck when we submerge and come back up when surfaced.
Even though I did set a KeyFrameAnimStart blah blah location. It actually started in the ending position and animated up to the start position as I submerged and then went back down into the hull when I surfaced, so I can't be sure until I change the numbers whether it will work right or not.
Peabody
Madox58
09-10-10, 06:46 PM
Cool!
All you need to do then is reverse the animation.
Right?
peabody
09-10-10, 09:41 PM
Cool!
All you need to do then is reverse the animation.
Right?
I hope so. But as you know things don't always work the way you expect them to.
Peabody
keltos01
09-12-10, 04:53 AM
http://img844.imageshack.us/img844/6285/30091342.jpg (http://img844.imageshack.us/i/30091342.jpg/)
diving : guns come out
http://img841.imageshack.us/img841/7976/98924303.jpg (http://img841.imageshack.us/i/98924303.jpg/)
surfacing : notice the guns still on deck
http://img256.imageshack.us/img256/9092/11488263.jpg (http://img256.imageshack.us/i/11488263.jpg/)
Uploaded with ImageShack.us (http://imageshack.us)
surfaced : the guns are stowing themselves in the hull.
animation works kindo but still backwards : guns come out underwater and get stored when surfaced ;) but we are making progress !
Peabody found a missing piece from the .sim, that made the anim start !
keltos
keltos01
09-13-10, 05:38 AM
http://img837.imageshack.us/img837/1262/62680539.jpg (http://img837.imageshack.us/i/62680539.jpg/)
still have some issues with the guns :
for some reason the AA view rotates and looks away from the barrel which looks like it"s behind you
I couldn't rotate the aft AA towards the stern
apart from that :
they come out/ get stored as you surface/submerge the boat.
keltos
keltos01
09-13-10, 08:02 AM
http://img844.imageshack.us/img844/5792/66003655.jpg (http://img844.imageshack.us/i/66003655.jpg/)
Uploaded with ImageShack.us (http://imageshack.us)
animation fine tuned so that they come out and go to their proper height above deck.
k
keltos01
09-13-10, 08:58 AM
cam problem :
http://img718.imageshack.us/img718/7523/camk.jpg (http://img718.imageshack.us/i/camk.jpg/)
for some reason now when you go to the AA station the view rotates 180°
here above : gun view and in the insert the guns position :damn:
keltos
keltos01
09-13-10, 04:37 PM
http://img201.imageshack.us/img201/8914/guni.jpg (http://img201.imageshack.us/i/guni.jpg/)
Uploaded with ImageShack.us (http://imageshack.us)
http://www.youtube.com/watch?v=1Ok_xl8hRi4
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.