Jump to content

TheConceptBoy

Members
  • Posts

    159
  • Joined

  • Last visited

Posts posted by TheConceptBoy

  1. 3 hours ago, Daemoc said:

    If you can instance static geometry with the same kind of mesh complexity without this issue it would have to be the skinning performance. Leadwerks supports hardware skinning, and while that GPU is not great, it not THAT bad.

    One other test you could try, although tedious, would be to attach static meshes to each bone rather than using a skinned mesh. Preferably with objects that match the same poly count as the skinned mesh. That would isolate the skinned mesh performance from physics.

    Also, the hand animation to head bob de-sync might be caused by world update and physics update calls? Are both functions under the same update?

    Come to think of it, I don't know if they are. So far this isn't a player class, its just some code in the loop I palced in main.cpp

    bool main(){
    
    
    
      while(true){
    	// player head bob and other player stuff
    
    
      }
    
    }

    I don't know if the while true is perhaps a suitable place for placing these sort of time critical things? That is where the player head bob code currently resides. Perhaps that is the cause of that particular issue and I should be creating a player class from the Actor  and programming the head bob inside of it's world update function?

  2. 1 hour ago, gamecreator said:

    So what exactly is the problem now?  I thought you said above that you could spawn more enemies once you switched to release.

    More yes. about 15 instances before the performance hit is bad enough to notice and bad enough to complain about if you paid for a game that ran like that. 

    I'd really like to say it's due to my old hardware  but at the same time a large part of my Steam library plays fine so. As the matter of fact. I can have a pretty packed level of static objects that run just fine. Add a few actors (since this is a zombie game) and it grinds below 15 fps. Engine should really be able to provide way more head room than than I believe.  

     

    I have to experiment some more.

  3. Just now, wadaltmon said:

    I remember you were talking about animation time not being 1-to-1 from Blender to LW. Maybe bone-based animation does not abide by delta time, but the physics system does.

    Well actually notice how even as the frame rate drops the hand sprint animation pretty much stays the same? Notice the head bob starting way too fast than what I based it off in the debugging (close resembled when I spawned some entities.)

  4. Just ran in release mode. Got the same result as you two, suddenly can spawn hordes of these things on my 10yo machine. What in the name of optimization is going on here? @wadaltmon lmao if Janko was here he'd have a stroke... 

     

    Also things like timers and counters are totally wrong in release mode, some are too fast. So Debug mode can't be relizably used then, otherwise I'm gonna have to re-code half of the game's time critical events.

    • Sad 1
  5. Further testing with leadwerks. I've got to be doing something wrong here.

    If you press "E" you will create instances of an enemy object, they will be positioned at the T pose character models. There is also a 3rd character with an Actor  that is used as the starting template to be Instanced from. There's absolutely no code inside these Actors and yet 6 barely objects in and the performance Tanks. I was looking to spawn anywehre betyween 15- 30 of these

    Would anyone mind taking a look? I've removed pretty much all objects, effects and anything that could possibly cause this. Some forum posts did say they that for repeated objects you should Instance them, which is what I did.

     

    GTX 750, Core 2 Quad Q8300. 8GB of RAM. Any other project test I've done in leadwerks, so far ran like butter. But this one, that involves Actors is severely laggy. I've got to be doing something wrong with handling actor instances.

     

    PS: This is a C++ Project so make sure yo Consult the Visual Studio Solution.

     

    EDIT: I have uploaded an updated project (Overrun_2). I speculated that the tanking performance could be due to the collision objects getting stuck inside one another and the collision solver is getting overloaded. So I've added a little offset to make sure NO instances are created inside one another or inside the dummy placeholder mesh. Unfortunately still the same results are observed.

    Overrun.zipOverrun_2.zip

     

  6. Ok, just found the reason why it wasn't workign so I'm posting it here for discover ability.

     

    The reason it worked first and did not work after is most likely because my naming changed in Blender and when I re-imported animations for the gun into Leadwerks, it couldn't find the right bone to play the animation for.

    Now these two answers have helped:

     

    So basically what I did is First Play the whole arm gun animation and then play the single bone animation. 

    pistol_9mm->PlayAnimation("shot", 0.05, 0, 1);
    pistol_9mm->PlayAnimation("shot_b", 0.01, 0, 1);

    shot_b is the chamber of the gun moving and shot is the recoil animations for the whole wrist.

     

    The chamber and the wrist are a part of two different rigs in Blender. One is parented so that when the wrist moves, the chamber moves with it, but that apparently doesn't mean that when you play the wrist animation, the chamber will play it's animation too. Only if both the gun AND the wrist are made from the ONE same rig with all bones connected to the same root, is when you'll get all bones playing the same animation all together.

     

    image.thumb.png.fa17e5c71ce56c394fede564036954ed.png

     

    Now from what I've interpolated based on the above mentioned threads, If you DO have a single rig for the entire mode, like a zombie that can play the run animation with the lower body and either a sprint or attack animation with it's upper body depending on the proximity to the player, then you will have to actually find the specific parent bone that starts the upper body and call it's animation like this.

     

    wholeBody_Enemy->PlayAnimation("sprint", 0.05, 0, 1);
    wholeBody_Enemy->FindChild("upperBody")->PlayAnimation("attack_swipe", 0.01, 0, 1);

     

    So you want to find that first bone that starts the upper body set of bones and fire an attack animation only for it.

    • Like 1
  7. 14 minutes ago, Josh said:

    In the future I think adding an animation event feature to call a class method when a specific frame is crossed would be a good idea. That is basically what the EndAnimation() method does, but it only occurs at one position.

    THAT would also work just as fine to be honest. 

    PS: and a MouseRelease please haha. You've got Mouse Hit which is a Press Down single event, Mouse Release would be nice too. Otherwise I'm creating booleans to keep track of releases atm

    Oh and looking through the engine files, there does appear to be something called: GetAnimationFrame. Any relevancy here?

    • Like 1
  8. Hey everyone. Got a question about playing back two bone animations on one mesh. I sort of asked this question on Discord yesterday and immediately I thought I figured it out and got it working. Problem is that I don't know how I got this working and now that I've updated the animation and re-imported it. It stopped working again.

    Last time I got it working basically on a Fluke and I'd like to understand the proper way of getting multiple animations running without one overriding the other. 

     

    Say I've got a Rig of a Raracter. A Zombie per-se. If I wanted the zombie Legs animation to be animated separately from the upper body, and have upper body animation to switch without affecting the leg animations, can this be done and how do you go about prepping the animation of the rig? Do the Two animations  need to be on two different rigs? Any sort of keyframe overlapping I should avoid?

    As mentioned earlier. It seemed like I got it to do just that, I am currently testing on a gun model + hands model with the chamber cocking back using one bone rig the hand using another. The It stopped working after I continued experimenting with it and I have no idea what it is that I changed that stopped the blending working.

  9. I believe we've already had a conversation about this actually. I kinda wish we had some options of checking which animation is playing or whether or on an animation IS playing at all. Right now it's just Play Animation, Stop Animation and a call back that only works if an actor is attached to that model. 

     

    Now is it logical to create and attach an entire new actor class to the pair of animated hands just to get that callback working?

  10. Just now, Josh said:

    There is a method in the Actor class that will be called automatically. This works in either C++ or Lua.

    So that's a Yes then? The Model has to have an actor class attached to it? My player Actor was attached to an empty model with a CharacterController physics that acts as a dummy and the pair of animated hands is parented to dummy. That's all. I don't suppose parenting a Model of the hands to that dummy will make the end animation function of the dummy's actor fire upon animation end?

  11. On another note. I noticed that there is an option to call up a hook / AnimationEnd function when a single shot animation finishes playing. Does it ONLY work if that model has an actor assigned to it? I have a set of First Person Shooter hands and my player already is an Actor  derived from the LW actor class.

  12. Been testing the 2nd method. Seems to be working like a charm. But it has a chance of crashing the engine and when I  reload LW, it loses connection to the project folder. I have to re-import the project in that startup window.

     

    EDIT: 

    Although to add to that crash comment I'm note deleting the old animation and just letting Leadwerks prompt me about the new import overwriting the existing one. So that could possibly point to where the bug lies - During the OverWriting process.

     

    A Couple of suggestions for this, I'd love to be able to:

    1) Select multiple Animation Loops to delete all selected Shift or Ctrl.

    2) Supply a .csv file with all animation loop times outlines there and have LW automatically pull animations for me. from that one long animation that contains ALL animations. Heck, if you can already do that, I'd love to know. 

     

    EDIT2:

    seems like it doesn't matter if I remove the existing mode prior to importing it again. Still causes a crash of the level editor.

×
×
  • Create New...