Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Having a small problem with JFW_Base_Defense_Animated
Having a small problem with JFW_Base_Defense_Animated [message #186932] Tue, 24 January 2006 12:51 Go to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Ok, I have setup a working popup cannon using JFW_Base_Defense_Animated and it works ok except for one thing;

I have to have the cannons floating above the ground for them to 'spot' enemy units, if they are flush with the ground or only slightly raised (I tried using 0.1 above ground level as a test) they will only 'spot' enemys once they are within about 50cm.

When I have them floating above the ground by a lot ( I tried 1 and 5 above the ground level as further tests ) they pick up enemys correctly, at their sight range.

Can anyone suggest why this might be?


Oh, and just in-case it has any bearing on this problem, heres a shot of the model before and after deployment (this is just a test model to see if I can get the popup cannon concept to work properly, which has been successful except for the above problem)

http://www.lmsbc.com/dan/random/ss_014.jpg
http://www.lmsbc.com/dan/random/ss_015.jpg

and here is a video of the deploy animation in-case anyone is interested, played at half speed in gmax
http://www.lmsbc.com/dan/random/deploy_anim.zip


http://steamsignature.com/card/1/76561197975867233.png
Re: Having a small problem with JFW_Base_Defense_Animated [message #186941 is a reply to message #186932] Tue, 24 January 2006 14:14 Go to previous messageGo to next message
NeoSaber is currently offline  NeoSaber
Messages: 336
Registered: February 2003
Karma: 0
Recruit
I can think of two possibilities right now.

I don't know exactly how that script works, but for AI to function properly the model usually needs to be exported with all the important bones (turret, barrel, and muzzle) at 0,0,0 rotation. It can mess up sighting if those bones are out of alignment. If there is a way, export the model fully deployed and use the scripts to animate it into its undeployed state. That might help, but it still might not work since the bones will get rotated wrong by the animation.

Another possibility (and this one might be more likely given the situation) is that being so close to the ground is causing it to have an obstructed view of targets. AI scripts typically ignore things they can't hit, and the ground itself may be blocking it's line of sight. Since it works if you move the turret a few meters up in the air, I'd try moving the model down a few meters in Gmax. That way when you place it in Level Edit, the model's origin is technically several meters in the air, and might clear up any line of sight issues as the gun might use the elevated origin as its gun sight.


NeoSaber

Renegade Map Maker at CnC Source
Animator/Compiler/Level Editor/Object Rigger/Programmer for Red Alert: A Path Beyond
Re: Having a small problem with JFW_Base_Defense_Animated [message #187060 is a reply to message #186932] Wed, 25 January 2006 02:56 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Thanks for your suggestions, I tried moving the whole model down 5 meters, so that the origin was high up as you suggested, but this had no effect upon the line of sight issues.

As for the bones being exported not at 0,0,0 rotation, I don't think that is likely to be the problem since it works properly when you place floating above the ground (at least I hope it is not the problem!)


I also had an new idea of my own, I tried creating a muzzleb0 bone 5 meters above the cannon to act as a 'spotter' bone, but that also had no effect.


I assume the problem lies in the fact that the muzzlea0 bone is underground, and even though the ground is not set to two-sided it assumes it cannot see (and therefore shoot) through it... Is there any way around this?

I would like to get this idea working properly, if possible, so any futher suggestions are welcome. Perhaps jonwil might understand it better since he wrote the script and knows the renegade engine...


http://steamsignature.com/card/1/76561197975867233.png
Re: Having a small problem with JFW_Base_Defense_Animated [message #187113 is a reply to message #186932] Wed, 25 January 2006 12:53 Go to previous messageGo to next message
NeoSaber is currently offline  NeoSaber
Messages: 336
Registered: February 2003
Karma: 0
Recruit
Perhaps separate the important bones from the animation. Leave the muzzle, barrel and turret bones sitting where they need to be when the gun is deployed. Attach separate bones to them that the gun model would be attached to. You could then animate the "secondary" bones to deploy/undeploy the model, while the important bones always remain in a "ready to fire" position. The AI shouldn't be bothered if the 3D mesh is animating all over the place, as long as the important bones stay in the right spot.

NeoSaber

Renegade Map Maker at CnC Source
Animator/Compiler/Level Editor/Object Rigger/Programmer for Red Alert: A Path Beyond
Re: Having a small problem with JFW_Base_Defense_Animated [message #187196 is a reply to message #186932] Thu, 26 January 2006 05:52 Go to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
I had put some thought into that, but I am not sure I would be able to make them link properly without causing the animation to be odd... I will try it however, since it seems to be the only solution now. Thanks for your suggestions, I will let you know how it goes Thumbs Up

http://steamsignature.com/card/1/76561197975867233.png
Previous Topic: Achieving 100% video quality in 3DS Max?
Next Topic: muzzlea1 on weapon models
Goto Forum:
  


Current Time: Thu May 30 04:28:53 MST 2024

Total time taken to generate the page: 0.00799 seconds