Jump to content

marchingcubes

Members
  • Posts

    88
  • Joined

  • Last visited

Posts posted by marchingcubes

  1. Hi,

     

    Thanks, that is good to know, but it is unclear if that will solve the issue anyway

     

    The real problem is the apparently incorrect polymesh collisions I am seeing - I dont want to implement workarounds with custom collision types if this is indeed just a bug that will get fixed soon, plus, even if i do create a new collision type it would still need a 'Collision.Trigger' response.

     

    All the built-in types that have a 'Collision.Collide' response calculate correct intersection, but block movement through the colliding object which is not what I need.

  2. Hi,

     

    Doesn't really work at all as 'Character' Collision Type does not trigger a collision event with 'Debris' Collision Type objects. It is possible I could define my own collision type if I had the C++ version of the engine, but I only have the Lua-based Indie version.

     

    Trigger seems to be the only possibility for Character physics interaction that does not prevent movement of the character through the object.

  3. Hi,

     

    I don't have too much to do right now, so I have done some work on this for you.

     

    I have a blender project, leadwerks .mdl, .tex, .mat and an animation script in a zip which should get you a working windmill.

     

    I have only done the most basic and crappy UV mapping, with a test grid, so you will have to redo this with your real texture, however as you can see in:

     

    http://marchingcubes.com/windmill.mp4

     

    this windmill with animation works just fine in leadwerks.

     

    Take a look at the blender project in:

     

    http://marchingcubes.com/windmill_marchingcubes.zip

     

    it should pretty much export cleanly with correct animation, using the leadwerks blender exporter - to something that can be dropped into leadwerks, and attaching the supplied windmill_animation.lua script should make it go nicely, with controllable speed (you may wish to break this out into a Script.variable you can set graphically from the ui)

     

    I did have to trim 2 frames off the complete 360deg animation to get it to 'wrap' smoothly in leadwerks without noticeable 'jitter' at each revolution, but this is done for you in the blender project, so hopefully you can just re-UV and texture and your windmill will be good to go.

     

    Hope that helps

  4. Hi,

     

    Conceptually it is pretty simple to set up a rigid model animated with bones in blender, but in practice many operations are required, and there are quite a few blender-specific things to know.. I don't really have space here to do a full tutorial, but i'll try to cover the salient points.

     

    First you must combine your separate meshes into a single one, and then create a vertex group for each separate part, with the appropriate vertices from your composite mesh assigned. Then create a skeleton, with bone-names following the vertex groups. once the skeleton is bound to the composite mesh, the bones in the skeleton will move the correspondingly-named vertex group.

     

    So i created 2 vertex groups, 'sails' and 'tower' and 2 bones (also called 'sails' and 'tower') I selected the vertices in the sail assembly, and assigned them to the 'sails' vertex group, inverted the selection and assigned the rest to the 'tower' vertex group.

     

    Then i selected the model, and the armature, and ctrl-p to parent/assign armature to mesh. At this point, entering pose mode and rotating the 'sail' bone will rotate the sail assembly in the mesh.

     

    I created 2 keyframes, one at frame 1 with a z-axis rotation of 0 and one at frame 31 with a rotation of 360 degrees, set my scene start and end frame to 1 and 31,

     

    The default quaternion interpolation for bones doesnt work well for simple, single-axis rotations, so setting the bones' rotation mode to euler xyz first is often necessary.

     

    Also, keyframe interpolation needs to be set to linear, as well as channel extrapolation for this type of 'continuous' rotation to be seamless.

     

    There are also some issues with actions and making sure they stay in your .blend file across save/reload (its important to click the 'F' button for actions you wsh to keep in the action editor).

     

    As I said earlier, its difficult for me to cover everything, so you will probably need to look for tutorials/documentation on the internet before a lot of this becomes easy, but I have set up your windmill with a skeleton, and attached it to this message. Hope it helps.

     

    http://marchingcubes.com/Windmill_w_skel.blend

    • Upvote 1
  5. Hi,

     

    Since the beta version I had been testing seems to be giving me trouble in some areas, I thought I would just go back to the stable build.

     

    However, when I do so, and try to load my maps, I get:

     

    Error: File version 31 not supported.

     

    This isn't a huge deal for me right now, as I can stay on the beta without too much inconvenience, but damn.. I understood the beta was not guaranteed to be 'bug free' but no mention was made of it making my projects unusable with the stable version.

     

    If others are considering opting into the beta, perhaps they should know this may be a problem before doing so

  6. Just to throw my opionion into the mix - Whether it's 'rare' or not, it would be my preference that user data loss *never* occur, unless unavoidable, and if it is to occur, the user should be informed before it happens and given the option to delay if necessary.

     

    All my scripts performing AI functions etc. are renamed and aren't trashed by updates, but in the case of a script like App.lua - where you don't really have the option to rename it and still have it work, overwriting it with no warning, and no post-overwrite message to say it was overwritten seems like bad policy.

    • Upvote 3
  7. EDITED WITH ADDITIONAL INFO

     

    Hi,

     

    I'm experiencing odd behaviour - I have a simple mesh object I created to conform to the shape of a river in my level, with an invisible material set. What I want to happen, is when my player initially collides with this object, the 'in water' state is set, and when the player stops colliding with the object, he is 'out of the water'

     

    As I recall, this seemed to be working fine some time ago, but (possibly in a recent beta update) I now notice that the boundaries I expect to trigger the collision are incorrect, however this behaviour seems inconsistent depending on the collision type set for the object.

     

    If I set the object as 'Scene' Collision Type, and set it just above the river bed so the player can walk over it (player could obviously not walk 'through' it with this Collision Type) , and set Shape to 'Polymesh', everything works as I expect. As soon as my character 'steps onto' the object, he enters swim mode, and when i swim off the object, he resumes walking.

     

    If I switch the Collision Type of the object to 'Trigger', then the enter/exit water behaviour is triggered significantly outside the boundaries of the object - Initially I thought it was using the 'Box' AABB type shape, but now it looks more like there is some transform on the shape when set to Trigger.. the collision shape appears significantly offset. Is it possible that when 'Trigger' is used, some object transforms are not being applied in the engine.

     

    here are some screenshots. The first is the project, showing the shape of the 'river' object, and the second has white spheres where collision with the object named 'waterbox' occurred.. it is offset from the polymesh shape, and appears so have straight edges.. this was the only way i could think of to visualise exactly where the collisions were occuring in-game..

     

    trigger_polymesh_wierdness2.jpg

     

    trigger_polymesh_wierdness.jpg

     

    I would expect 'Polymesh' physics shapes to work with 'Trigger' collision type, the same as the other collision types.

     

    Significantly, the 'Show physics' in the editor window always shows the boundaries I expect (the polymesh) for both Collision Types, it is just not matching what is happening when the game is run.

  8. Have you got an animated shader as a material? Leadwerks uses the GPU to apply the animation transforms, so if you have a standard material, you won't see movement.

     

    And, if you are on linux, the model viewer, at least for me, is extremely buggy.. no way to tell what is happening unless you view the model inside the engine itself.

     

    It also seems that, when using the blender exporter i need to have the skeleton selected in pose mode (not the object itself) before export or things go wrong with multiple actions.

    • Upvote 1
  9. This is a problem for me too, with my 'outside' levels - i'm currently experimenting with tree construction and placement, and the shadow falloff distance is far too short for my purposes. in the two shots below, as i approach my trees, the shadows arent at all visibile until i am practically right next to them.

     

    shadow1.jpg

     

    shadow2.jpg

  10. Hi, Thanks for replying

     

    I have managed to sort most of my issues out - seems updating my 3rd-person camera position/rotation in the UpdatePhysics callback vs UpdateWorld caused a lot of issues, now everything seems smooth. (My project is in the 'Otter Demo' post in the showcase section of the forum)

     

    I am still able to 'push' objects through the terrain, and in some cases the physics mesh doesn't seem to conform nicely to the terrain level.

     

    I have a bad feeling i lost the 'crash' video i made, so I will need to replicate it. I will post it here when I can do that.

  11. Yeah, water is something I am definitely waiting for. I tried shadmar's water shader which was posted in another thread, which looked good from a distance, and mostly worked, but my model seemed to flicker badly and render wrong when it was in the water, hopefully 'official' water will not suffer from this.

    • Upvote 1
  12. This is a short video of what I am currently working on in Leadwerks.

     

    Its supposed to feature a Beaver as the main character, but I havent finished the models yet, so used what I had (an otter)

     

    Its all programmer-art, but I have to say its been really easy and fun putting this together in Leadwerks.

     

    http://marchingcubes.com/otter4.mp4

    • Upvote 6
  13. Hi,

     

    I have a character with a set of animations, and my controller's animation section uses the Animation Controller Script. this lets you have a set of looped animations, anf pretty much 'just works' for walk cycles etc. You will need to change speed/blend to match you animations rate.

     

    http://www.leadwerks.com/werkspace/page/documentation/_/script-reference/animationmanager-r693

     

    it looks like:

     

    function Script:UpdateWorld()

     

    if self.parentEntity.script.isAttacking == true then

    self.baseAnimMgr:SetAnimationSequence(self.AnimAttack, 0.05, 200)

    else

    if self.parentEntity.script.playerMovement.z ~=0 or self.parentEntity.script.playerMovement.x ~=0 then

    if self.parentEntity.script.enteredWater == true then

    self.baseAnimMgr:SetAnimationSequence(self.AnimSwim, 0.05, 200)

    else

    self.baseAnimMgr:SetAnimationSequence(self.AnimWalk, 0.05, 200)

    end

     

    else

    self.baseAnimMgr:SetAnimationSequence(self.AnimIdle, 0.005, 200)

    end

    end

     

     

    Hope that helps

  14. Hi,

     

    I tried SetAngle(), but that just rotates the sprite around the axis perpendicular to the camera - it can't correct the 'horizontal flip'

     

    I guess I could use DrawText/DrawImage but i want to animate these 'messages' - they will be more like comic-style 'BIFF', 'POW!' type things so its easier to place and animate them with sprites.

  15. Hi,

     

    I want to use sprites, parented to the camera in billboard mode to display messages to the player. However I notice that textures applied to sprites are 'flipped' horizontally - e.g. an image with text on it has 'backwards' text when this texture is applied to the sprite.

     

    Its easy enough to flip my images horizontally, but it seems like this is a bug - Is there a reason for the sprite texcoords being set up like this?

     

    I am on the Steam Indie Beta version for Linux.

×
×
  • Create New...