Page 14 of 14 FirstFirst ... 4121314
Results 261 to 274 of 274

Thread: Bot Siege

  1. #261
    Member Quandtum's Avatar
    Join Date
    Sep 2009
    Location
    MN, USA
    Posts
    1,953
    Originally Posted by J.F.Robot View Post
    i'm using constraints. it's the smooth transitioning i'd need to figure out actually.
    Oh, gotcha, sorry. There is a blendin parameter (either on the actuator or the call in the Python API, tweak on that). A value of 3-5 seems to be sufficient. I learned from this tutorial http://cgcookie.com/blender/2010/05/...racter-part-1/ , David did a good job, it was an enjoyable watch. What you are looking for is probably ~ 1/2 to 2/3 of the way through it if I recall correctly.

    Pay special attention to how he creates the action sequences and be sure to press the "F" down to fix it for 0 users (it's gotten me a few times).

    Hehe, again, sorry, is that closer?
    Gallery | Web | Downloads | Bot Siege - Web - Thread



  2. #262
    Member J.F.Robot's Avatar
    Join Date
    Jan 2011
    Location
    California, U.S
    Posts
    4,006
    closer. But an action Ipo doesn't seem to fare well with constraints So I've seen. (Even with the blending set high).
    However, I'm going to try something later today in that regards.



  3. #263
    Member Quandtum's Avatar
    Join Date
    Sep 2009
    Location
    MN, USA
    Posts
    1,953
    Originally Posted by J.F.Robot View Post
    closer. But an action Ipo doesn't seem to fare well with constraints So I've seen. (Even with the blending set high).
    However, I'm going to try something later today in that regards.
    Aye, add a driver to the constraint and have another bone control be used as input to the driver. Then animate the control in the action.

    I will work on writing this up with screenshots. It will take me a little while to write, but I will work on it now and post back. In the meantime, if you look @ the sentry, find a constraint where the influence is purple. That means it has a driver (for example the bone named "Head"). Then in a viewing pane set to "Graph Editor" (or switch to Animation preset), set the drop down on the header to "Drivers". When you select the "Head" bone it will select there. Then ensure the toolbar is viewable with the "N" key. You will see the "Driver" and "Modifiers" there. They key is set the type to "Averaged Value" and fill in the "Transform Channel" and "Modifer" (y = mx +b).

    Again, I will write this better with screens and post back. In a nutshell though we are animating the influence of the constraint and allowing the constraint to "release" it's influence. We simply keyframe only the control only then.

    EDIT: forgot to mention then, I don't animate or keyframe the "Head" bone, only the "Control.TrackTarget" bone which is driving the Transform Target.
    Gallery | Web | Downloads | Bot Siege - Web - Thread



  4. #264
    Member J.F.Robot's Avatar
    Join Date
    Jan 2011
    Location
    California, U.S
    Posts
    4,006
    Originally Posted by Quandtum View Post
    Aye, add a driver to the constraint and have another bone control be used as input to the driver. Then animate the control in the action.
    Hmm....never thought of that. Will try that one.



  5. #265
    Member Quandtum's Avatar
    Join Date
    Sep 2009
    Location
    MN, USA
    Posts
    1,953
    Originally Posted by J.F.Robot View Post
    Hmm....never thought of that. Will try that one.
    See if this helps: http://quandtum.weebly.com/2/post/20...n-blender.html

    I wrote it really fast and haven't proofed it yet, but hopefully it gets what is happening across. Find problems let me know I'll get it corrected asap.
    Gallery | Web | Downloads | Bot Siege - Web - Thread



  6. #266
    Originally Posted by Quandtum View Post
    @ kastoria : As a professional C/C++ programmer, the class aspect has a lot of appeal to me in terms of module reuse ... I try to be very re-use oriented..
    QFT

    The potential performance hit is good awareness. Comparing it direct against the logic bricks, I will already concede I am trying to use them as minimally as possible. Much like you, I want the detailed revision control that source control has to offer me. To me it's just a guideline, it's not a reason to be impracticable if there is known sizable downside.
    The bricks are not reusable or discoverable. I've seen some huge messes of spaghetti bricks with no way to easily scan or search though them. I don't want to even think about what it would take to copy a logic brick setup from one object to another! And the ability to have source control and change tracking is totally out the window.

    One of the main reasons I rarely check out finished games or check into broken BGE .blend files is because there is so much that you have to wade though to even figure out how it is supposed to be processed. Even when I was helping with your turret animation/tracking issue the first questions I had was how to move the toon, what was supposed to trigger animations, and where it was broken.

    The other consideration I had tho last night (maybe admittingly foolish one); I am aiming to attempt to have each model self contained and BGE ready....In other words, very candy-coated assets for new people to use to learn the BGE with, everything needed is contained.
    Very noble, I've never even thought about what it would take to make that happen.

    Now, one unrelated question... I have the blaster projectile mesh textured now. I parented an omni light to it to make the glow as they spawn. I am in GLSL mode, but I commonly see this 8 light limit business.
    I have never tried adding that many dynamic lights to a scene before. 8 sounds suspiciously similar to the OpenGL v1.x limit of 8 lights in the fixed-function pipeline. I'm really not sure how to support lots of lights in the BGE. Before you spend too much time digging, I would recommend making a post in the BGE discussion and support forum.



  7. #267
    Member J.F.Robot's Avatar
    Join Date
    Jan 2011
    Location
    California, U.S
    Posts
    4,006
    Originally Posted by Quandtum View Post
    See if this helps: http://quandtum.weebly.com/2/post/20...n-blender.html

    I wrote it really fast and haven't proofed it yet, but hopefully it gets what is happening across. Find problems let me know I'll get it corrected asap.
    Thanks but I already know how to use drivers.
    You can leave it up though if anyone else needs help though.

    Edit: Nevermind there's more to it. I'll be reading through.

    one thing I am noticing is drivers aren't really working in the BGE.
    Last edited by J.F.Robot; 29-Mar-13 at 17:28.



  8. #268
    Member Quandtum's Avatar
    Join Date
    Sep 2009
    Location
    MN, USA
    Posts
    1,953
    I may need to make a thread its own for this issue, but it's driving me nuts and I can't seem to solve it. The issue exists with the existing model posted on Blendswap as well, but it is slightly altered armature here (in attempt to fix the issue).

    Here is the control bone (pointed @ with "Local Y = 0"), it's in its created position, so has no local transform (I additionally double checked in the transform window). It is driving the "Influence" of the "Copy Transform" on the "Cannon_Left_FK" bone with an equation of Influence = (1 * Local Y) + 0, with Y = 0, Influence = 0. The following is correct.

    Click image for larger version. 

Name:	21.jpg 
Views:	40 
Size:	278.7 KB 
ID:	225366

    Now, I grab the "Control" bone and move it up it's Local Y by 1 unit. Local Y = 1 now and the "Influence" is correctly calculated. All is happy.

    Click image for larger version. 

Name:	22.jpg 
Views:	35 
Size:	277.6 KB 
ID:	225367

    Now, grab the control bone and clear it's position "ALT+G". Local Y = 0. Influence is now incorrectly calculated.

    Click image for larger version. 

Name:	23.jpg 
Views:	36 
Size:	278.9 KB 
ID:	225368

    Not a huge deal as this is not the intended use. However, even with actions animating that bone back to 0, the calculation is never corrected in the BGE. The reverse is also true, if I animate the "Control" from 0 to 1, the "Influence" appears to remain as 0.

    I found a thread or two, but none of them helped with this issue. I also tried to remove the "Copy Transform" and replaced it with a "Copy Rotation" and still no good. I tried replacing the bone with an Empty, that also failed.

    In or out of BGE, this driver doesn't want to update correctly. There's either something I don't know of, or I am making some mistake. Any ideas?
    Gallery | Web | Downloads | Bot Siege - Web - Thread



  9. #269
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    17,999
    I have had to use this before to get good results

    own.worldOrientation = target.worldOrientation = copy rot

    own.worldPosition = target.worldPosition+(offset vector) = copy location

    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



  10. #270
    Originally Posted by Quandtum View Post
    In or out of BGE, this driver doesn't want to update correctly. There's either something I don't know of, or I am making some mistake. Any ideas?
    I have found this to be the case before in a few situations with drivers. I suspect that it is either broken, not designed to work in this case, or there is some kind of special 'update' method that is not getting called.



  11. #271
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    17,999
    Only some constraints work in the BGE

    I get almost everything done with RBJ + 6dof and empties, and python,

    if they added vertex grouping support and vertex hooks... it would be nice
    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



  12. #272
    Member Quandtum's Avatar
    Join Date
    Sep 2009
    Location
    MN, USA
    Posts
    1,953
    Originally Posted by kastoria View Post
    I have found this to be the case before in a few situations with drivers. I suspect that it is either broken, not designed to work in this case, or there is some kind of special 'update' method that is not getting called.
    I saw a few issues in the tracker too for similar, some had work around but those haven't worked here. Still this helps, at lease sets me at ease that it is more likely not my fault.


    Originally Posted by BluePrintRandom View Post
    I have had to use this before to get good results
    own.worldOrientation = target.worldOrientation = copy rot
    own.worldPosition = target.worldPosition+(offset vector) = copy location
    I will play with this some more. There will still be an inherent problem is that I am animating the influence over time. So, if I went this way I would have to calculate some transition vector that is a function of influence over time. Still, I am going to try to work this angle more because...

    I am actually considering dumping all of the constraints and go pro FK. Doing this would allow me to program a more sensible AI targeting system that would actually lead the target and compensate for gravity. Walls and such can also be taken into consideration and it would be much more sophisticated.

    Lots of experiments, I thank you both. I'll let you know how it's going, it might take a while however.

    P.S. If I get frustrated, I am getting very eager to get the main character going again. I really want to start working on some game mechanics too. I did get the explosion script done this morning, it's pretty cool, crates go everywhere (and can be protected by walls or other objects).
    Gallery | Web | Downloads | Bot Siege - Web - Thread



  13. #273
    Member Quandtum's Avatar
    Join Date
    Sep 2009
    Location
    MN, USA
    Posts
    1,953
    Getting warmer.

    Originally Posted by BluePrintRandom View Post
    I have had to use this before to get good results
    own.worldOrientation = target.worldOrientation = copy rot
    own.worldPosition = target.worldPosition+(offset vector) = copy location
    Not quite that simple though. In this case we are actually trying to manipulate the armature "channels" and have to do it differently.

    Code:
        quaternion = armature.channels["Cannon_Right_IK"].rotation_quaternion
        armature.channels["Cannon_Right_FK"].rotation_quaternion = [quaternion[0], quaternion[1], quaternion[2], quaternion[3]]
    This seems to work. Will have to look to see how to perform a transition. I think the another issue for me is I need to deepen my understanding of quaternion and euler and how they compare.
    Gallery | Web | Downloads | Bot Siege - Web - Thread



  14. #274
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    17,999
    I don't use armatures to animate robotics, I use forces and 6dof and empties

    __
    _|_
    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



Page 14 of 14 FirstFirst ... 4121314

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •