Jump to content

flachdrache

Members
  • Posts

    397
  • Joined

  • Last visited

Posts posted by flachdrache

  1. Well, i try to get a 8 wheeler vehicle lua script to work and keep failing with the given .gmf pipeline.

     

    Currently i want to verify the memory leak the default monster_truck.lua produces but le2.43 keeps overwriting the

    .phy collider mesh in its own, given, folder ... and it seams the garbage collector of le2.43 just does a better job.

     

    The bad thing is, i need to fully understand leadwerks implementation within its newton boundaries - since i need

    the 8 wheeler, a jeep and a motorcycle for the player to drive. Please understand my issue here ... its by design.

     

    Well, here`s the deal ...

     

    UU3D cant export multi-group .gmf models (to my knowledge) - only fbx2gmf.exe does keep its childs to be found.

     

    The models structure looks like :

     

    scene-root (mesh:Static_Mesh)

    - Mesh:body

    - Mesh:Tire_L1 etc. etc

    - Mesh:TirePivot_L1 etc. etc

     

    Yes, i added tires and tire pivots ... just to have them available. These are scene root childs which can be found to

    hide/replace the visual models - which does happen.

     

    Here is the block of script :

     

    pivot=object.model:FindChild("PL1") -- PL1 is a Mesh:TirePivot
    if pivot~=nil then
       Print("found PL1")
    
    	tireradius=pivot.aabb.h*2.0
    	object.vehicle:AddTire(TFormPoint(pivot.position, pivot.parent, model),tireradius,suspensionlength,springconstant,springdamper)
    	object.tire[0]=LoadMesh("abstract::vehicle_truck_stryker_Wheel.gmf", object.model)
    
    	pivot:Hide()
    end
    

     

    The "pivot" gets found and hidden, no matter if its my "Mesh:TirePivot" or my "Mesh:Tire".

     

    The instance of "TFormPoint(pivot.position, pivot.parent, model)" is what bugs me the most - the "model" in the line does have no reference

    but the very "class:CreateObject(model)" - which looks like a hack non the less.

     

    Even if the pivots got found and replaced by its visual, non physic, vehicle tires - the actual "AddTire" fails on me ...

    please take a look into the provided model source and help me understand this newton thing here ... a dummy vehicle SDK

    setup would be nice too and highly needed because of the model pipeline.

     

    thx.

  2. ... nah dann schreib halt "Lehnsherr" :P ... done pretty much everything in gamedesign, i dislike weightpainting and my timing is too bad for hand made character animations + i dont draw but rather construct ... which is as slow as it sounds.

  3. Nice to see someone with a identical history. As far as i can tell is torque3D a little more basic but already got some more advanced addons (extra cost though) which youll have to code yourself (or team up with someone which aint easy neither).

     

    Sind ein paar mehr deutsche hier - also würde ich mir einen anderen Namen zulegen. Mein politisches Interesse reicht nur für den Gedanke das weniger Mist in die Welt getragen werden sollte, aber du möchtest keine "Diktatur der Gutmenschen" heraufbeschwören.

     

    ... just a headsUp for us germans.

     

    You might like to find "Thinking in C++", which is free to read online iirc.

     

    hth

     

    PS: here is mine ... well you know, one day i had to post a link. :P

  4. The "Terrain shadowing bug" appears on middle and large terrain maps in the demo version but was fixed soon after its release.

     

    PS : i was referencing to a bug which was marked as solved, in the bugtracker around the 2.31 version, - great that this turned out to be a non issue. :)

  5. Water is still shadowless and mixing real footage with cgi is like advertising a product one doesn't have. Distant landscape looks still fantastic though.

     

    PS: Who told them soldiers to approach from that direction ?!

  6. Its the completeness which makes me curious - however, iam not too positive about navmeshes which actually dont using the bounding volume but the edges to navigate AI agents. How about wallwalking, access of nodes for setting flags like runningNeeded etc. ? If one has to work through unknown source in contrast of exactly knowing whats going on keeps me from investigating further atm. But Iam looking forward to see for my self in a near future i guess.

  7. Looks like one phy object ( the car ) tries to penetrate the other ( fence ) and that the tires are too small.

    For the first issue i would oversize and simplify the fence phy ( put it in a box if its just used as fence ) and might even send a message to the car that

    a. the car breaks the fence or

    b. the car has to reset all its forces with the "object:Collision" function.

     

    The second one i would say one can easily hang in mid air ( gameplay wise ) and that the tires from the monster truck do seam to help giving enough air between chassi and street so the car does not get stuck between two rocks :) - at least i would say remodel the tires with a higher polycount ... but josh might know better if higher polycount on the phy model is any good.

     

    Dont know if this can help but here are my defaut values

     

    local suspensionlength  =0.30
    local springconstant      =70.0
    local springdamper        =150.0
    ---
    
    object.model.buoyant = 0
    object.model:SetKey("collisiontype",COLLISION_CHARACTER)
    object.model:SetKey("mass",2.5)
    object.model:SetMassCenter( Vec3(0, -0.5, 0) )
    

     

    PS: If one drives over an allready broken-down fence the fence should be of no collision type.

     

    hth

  8. Hey Tyler - in fact my assumptions are partially based on some of the lua classes you posted.

    This event message dispatcher might work in the lua world alone, setting postprocessing fx and other client behavior might be controlled in source code.

     

    However, if the player steps on the firepit i dont see a reason why it shouldnt controll timing a fire emitter and such.

     

    I basicall want to put a timer entity in the scene which counts the seconds the game is running and if a behavior is at hand ( a new decal is spawned ) the message dispatcher class notes the event system that it should free this decal in 15 seconds ... how do i collect those data ?

     

     

    PS:

    The non-OO approach would be to "simply" have the entity send a message to itself - which free`s itself after a delay.

  9. Moin ...

    long time no see. :(

    Well, i want to give lua ragdolls a try.

     

    I started my "extracting" all bones by naming and assigning all bones to body spheres ( the skeleton is FPSC based afaik ).

     

    -- if we know that these childs are available, we can
    -- select some to build the pivot rig
    
    -- note that the distance between weighted joints in the mesh
    -- cant be stretched much and that the mesh root cant be moved
    -- nor scaled away from the "Bip01_Pelvis" joint
    
     local Bip01_Pelvis = Bip01:FindChild( "Bip01_Pelvis" )
     if Bip01_Pelvis ~= nil then
       Bip01_Pelvis:SetParent(Bip01)
     else
       Print("Could find skeleton Bip01_Pelvis")
     end
    
     local Bip01_Spine = Bip01_Pelvis:FindChild( "Bip01_Spine" )
     if Bip01_Spine ~= nil then
       Bip01_Spine:SetParent(Bip01_Pelvis)
     else
       Print("Could find skeleton Bip01_Spine")
     end
    
     local Bip01_Spine1 = Bip01_Spine:FindChild( "Bip01_Spine1" )
     if Bip01_Spine1 ~= nil then
       Bip01_Spine1:SetParent(Bip01_Spine)
     else
       Print("Could find skeleton Bip01_Spine1")
     end
    
     local Bip01_Spine2 = Bip01_Spine1:FindChild( "Bip01_Spine2" )
     if Bip01_Spine2 ~= nil then
       Bip01_Spine2:SetParent(Bip01_Spine1)
     else
       Print("Could find skeleton Bip01_Spine2")
     end
    
     local Bip01_Spine3 = Bip01_Spine2:FindChild( "Bip01_Spine3" )
     if Bip01_Spine3 ~= nil then
       Bip01_Spine3:SetParent(Bip01_Spine2)
     else
       Print("Could find skeleton Bip01_Spine3")
     end
    
     local Bip01_Neck = Bip01_Spine3:FindChild( "Bip01_Neck" )
     if Bip01_Neck ~= nil then
       Bip01_Neck:SetParent(Bip01_Spine3)
     else
       Print("Could find skeleton Bip01_Neck")
     end
    
     local Bip01_Head = Bip01_Neck:FindChild( "Bip01_Head" )
     if Bip01_Head ~= nil then
       Bip01_Head:SetParent(Bip01_Neck)
     else
       Print("Could find skeleton Bip01_Head")
     end
    
     local Bip01_L_Clavicle = Bip01_Neck:FindChild( "Bip01_L_Clavicle" )
     if Bip01_L_Clavicle ~= nil then
       Bip01_L_Clavicle:SetParent( Bip01_Neck)
     else
       Print("Could find skeleton Bip01_L_Clavicle")
     end
    
     local Bip01_L_UpperArm = Bip01_L_Clavicle:FindChild( "Bip01_L_UpperArm" )
     if Bip01_L_UpperArm ~= nil then
       Bip01_L_UpperArm:SetParent(Bip01_L_Clavicle)
     else
       Print("Could find skeleton Bip01_L_UpperArm")
     end
    
     local Bip01_L_Forearm = Bip01_L_UpperArm:FindChild( "Bip01_L_Forearm" )
     if Bip01_L_Forearm ~= nil then
       Bip01_L_Forearm:SetParent(Bip01_L_UpperArm)
     else
       Print("Could find skeleton Bip01_L_Forearm")
     end
    
     local Bip01_L_Hand = Bip01_L_Forearm:FindChild( "Bip01_L_Hand" ) -- points to "FIRESPOT"
     if Bip01_L_Hand ~= nil then
       Bip01_L_Hand:SetParent(Bip01_L_Forearm)
     else
       Print("Could find skeleton Bip01_L_Hand")
     end
    
     local Bip01_L_Finger0 = Bip01_L_Hand:FindChild( "Bip01_L_Finger0" )
     if Bip01_L_Finger0 ~= nil then
       Bip01_L_Finger0:SetParent(Bip01_L_Hand)
     else
       Print("Could find skeleton Bip01_L_Finger0")
     end
    
     local Bip01_R_Clavicle = Bip01_Neck:FindChild( "Bip01_R_Clavicle" )
     if Bip01_R_Clavicle ~= nil then
       Bip01_R_Clavicle:SetParent(Bip01_Neck)
     else
       Print("Could find skeleton Bip01_R_Clavicle")
     end
    
     local Bip01_R_UpperArm = Bip01_R_Clavicle:FindChild( "Bip01_R_UpperArm" )
     if Bip01_R_UpperArm ~= nil then
       Bip01_R_UpperArm:SetParent(Bip01_R_Clavicle)
     else
       Print("Could find skeleton Bip01_R_UpperArm")
     end
    
     local Bip01_R_Forearm = Bip01_R_UpperArm:FindChild( "Bip01_R_Forearm" )
     if Bip01_R_Forearm ~= nil then
       Bip01_R_Forearm:SetParent(Bip01_R_UpperArm)
     else
       Print("Could find skeleton Bip01_R_Forearm")
     end
    
     local Bip01_R_Hand = Bip01_R_Forearm:FindChild( "Bip01_R_Hand" )
     if Bip01_R_Hand ~= nil then
       Bip01_R_Hand:SetParent(Bip01_R_Forearm)
     else
       Print("Could find skeleton Bip01_R_Hand")
     end
    
     local Bip01_R_Finger0 = Bip01_R_Hand:FindChild( "Bip01_R_Finger0" )
     if Bip01_R_Finger0 ~= nil then
       Bip01_R_Finger0:SetParent(Bip01_R_Hand)
     else
       Print("Could find skeleton Bip01_R_Finger0")
     end
    
     local Bip01_L_Thigh = Bip01_Spine:FindChild( "Bip01_L_Thigh" )
     if Bip01_L_Thigh ~= nil then
       Bip01_L_Thigh:SetParent(Bip01_Spine)
     else
       Print("Could find skeleton Bip01_L_Thigh")
     end
    
     local Bip01_L_Calf =  Bip01_L_Thigh:FindChild( "Bip01_L_Calf" )
     if Bip01_L_Calf ~= nil then
       Bip01_L_Calf:SetParent(Bip01_L_Thigh)
     else
       Print("Could find skeleton Bip01_L_Calf")
     end
    
     local Bip01_L_Foot = Bip01_L_Calf:FindChild( "Bip01_L_Foot" )
     if Bip01_L_Foot ~= nil then
       Bip01_L_Foot:SetParent(Bip01_L_Calf)
     else
       Print("Could find skeleton Bip01_L_Foot")
     end
    
     local Bip01_L_Toe0 = Bip01_L_Foot:FindChild( "Bip01_L_Toe0" )
     if Bip01_L_Toe0 ~= nil then
       Bip01_L_Toe0:SetParent(Bip01_L_Foot)
     else
       Print("Could find skeleton Bip01_L_Toe0")
     end
    
     local Bip01_R_Thigh = Bip01_Spine:FindChild( "Bip01_R_Thigh" )
     if Bip01_R_Thigh ~= nil then
       Bip01_R_Thigh:SetParent(Bip01_Spine)
     else
       Print("Could find skeleton Bip01_R_Thigh")
     end
    
     local Bip01_R_Calf = Bip01_R_Thigh:FindChild( "Bip01_R_Calf" )
     if Bip01_R_Calf ~= nil then
       Bip01_R_Calf:SetParent(Bip01_R_Thigh)
     else
       Print("Could find skeleton Bip01_R_Calf")
     end
    
     local Bip01_R_Foot = Bip01_R_Calf:FindChild( "Bip01_R_Foot" )
     if Bip01_R_Foot ~= nil then
       Bip01_R_Foot:SetParent(Bip01_R_Calf)
     else
       Print("Could find skeleton Bip01_R_Foot")
     end
    
     local Bip01_R_Toe0 = Bip01_R_Foot:FindChild( "Bip01_R_Toe0" )
     if Bip01_R_Toe0 ~= nil then
       Bip01_R_Toe0:SetParent(Bip01_R_Foot)
     else
       Print("Could find skeleton Bip01_R_Toe0")
     end
    

     

    but thats it :P:D - i add HingeJoints between parent & childs from given Bip01_Skeleton and the "bodySphereRig" looks somewhat OK but i have no good way to let the bodyRig drive the mesh bones e.g.

    if i bind a model than the bodyRig becomes nonColiider because the parent isnt allowed to collide and if i allow the model to coliide ( setting mass and entityType to the model ) than the models own physic collider ( the phy file ) is in the way.

     

    erm ... halp ?!

    Tia. :)

     

    The model skeleton`s "sceneRoot" is bound to the model itself ... ?!

     

    -- Build the pivot skeleton
    -- make sure that we can have all pivots in the model
    
     local Bip01 = object.model:FindChild( "Bip01" )
     if Bip01 ~= nil then
       Bip01:SetParent(object.model)
     else
       Print("Could find skeleton Bip01")
     end
    

  10. Moin,

    i like to have all "fire an forget" effects handled client side alone e.g. decalTime and other time based effects.

     

    So far i think following objects would be needed

    a global timer
    message dispatcher
    eventSystem
    

     

    basically the idea is to set entity keys on new effects ( like a decal ). Like ... spawn decal, set timer, if decalTime over send message to free itself. I want to solve that in the OOP way but iam somewhat puzzled where to start ?! How do i collect / record new entitys added to the world from given moment ?

     

    any help appreciated

  11. I tested vehicles several times - since i know that you guys had/have issues with your implementation and i am in need of ai controlled vehicles myself ... but i only have the monster truck to "test" and the only issue i had ( to date ) was the overturn of the monster truck. The "overturn" issue got "fixed" by adding

    object.model:SetMassCenter( Vec3(0, -0.5, 0) )

    in the vehicle_monstertruck.lua script itself.

    Beside that i will controll some of the physic behavior within the collision function i guess e.g.

    function object:Collision(entity,position,normal,force,speed)
    end
    

    and thats the only advice i can give ( being a physic noob ) - dont let physics handle your game dynamics alone. Let that to chaos theory.

    If you take an older race game by sample - they used to zero out all physics behavior as soon as a obstacle got hit. There might have been some spring movement but forces where "pushed back" afaik.

    Iam a physics noob though and i have no idea how a setup for a motorcycle would look like but i guess there simply need to be some invisible pivots, bodys, springs, joints attached to the "playermodel" to controll its behavior.

     

    I would like to see more of this - to get a better idea myself. I posted this month ago but again - this might just have to do with forces similar to magnetism ... if one thinks about ai controlled opponents it really is handled like a donkey is following a carrot. ( setting a antiforce on coliision i mean )

     

    cant be of much better help here tho. ;o)

  12. Hmmm, so i could add actions to "dead" physical objects in the scene ?! A chain of commands for a big explosion of some fuel tank would be :

     

    while object.health > 0 do
     if object.health is decreased then
       object.health = object.health - object.decrease
     end
    else
     object:Destroy()
    end
    
    function object:Destroy()
    
     ... blabla
    
     GetEntityPosition(self);
    
     self.spawn_explosion;
     self.spawn_shakeCamera;
     self.spawn_explosionEmmiter;
    
     ... blabla
    end
    
    

     

    How complicated would the flowgraph get - i mean, its just one object but several events and

    would such flowgraph_eventbehavior be saved to file for being used again and again ( x times the same fuelTank = sameExplosion behavior ) ?

     

    thx

  13. For unknown reasons animated and static models do explode on me once in a while -

    i guess its because :

     

    x, fbx formats do export its sceneRoot in form of a single bone/joint

    an old, outdated fbx version just crashes converter apps on import

    an dae model has a scale value assigned to its rootBone which the importer cant handle

     

    beside the animated X models issue, which are using d3d indexed skinning (FPSC models) -

    i would like to have a list of which file format(s) "revision" should be used with the converter

    tools !

     

    ... should be used is a bit vague since the dae issue persists, fbx at least had a 2010 head revision

    which should be used for all animated models ?!

     

    PS : "specification" was the word. ;)

  14. Quick and dirty from fps lua script ...

     

    
    require("Scripts/linkedlist")
    require("Scripts/spline")
    require("Scripts/constants/keycodes")
    
    --Variables
    camerapitch=0.0
    camerayaw=0.0
    
    camerapitch=fw.main.camera.rotation.x
    camerayaw=fw.main.camera.rotation.y
    
    HideMouse()
    FlushMouse()
    FlushKeys()
    
    local dummy = LoadModel( "abstract::info_camera_node.gmf" )
    local node
    local currentnode
    if dummy~=nil then
    for node in iterate(dummy.reference.instances) do
    	if node:GetKey("starthere")=="1" then
    		currentnode=node
    		break
    	end
    end
    dummy:Free()
    end
    
    if currentnode==nil then
    Notify("No starting camera node found!")
    return
    end
    
    local nextnode=currentnode:GetTarget()
    
    if nextnode==nil then
    Notify("At least two camera nodes are required.")
    return
    end
    
    local tension=EntityDistance(currentnode,nextnode)*0.5
    local spline=CreateSpline(currentnode.position,currentnode.mat:K():Scale(tension),nextnode.position,nextnode.mat:K():Scale(tension),0.75)
    local splinelength = spline:Length()
    
    fw.main.camera:SetMatrix(currentnode.mat)
    
    local n=0.0
    
    while KeyHit(KEY_ESCAPE)==0 do
    
    if n>=1.0 then
    	currentnode=nextnode
    	nextnode=currentnode:GetTarget()
    
    	if nextnode==nil then
    		break
    	end
    
    	tension=EntityDistance(currentnode,nextnode)*0.5
    	spline=CreateSpline(currentnode.position,currentnode.mat:K():Scale(tension),nextnode.position,nextnode.mat:K():Scale(tension),0.75)
    	n=0.0
    	splinelength=spline:Length()
    end
    
    p=Vec3(0)
    t=Vec3(0)
    
    if nextnode~=nil then
    
    	--less smooth
    	n = n + ( 0.01*AppSpeed()/splinelength*10.0 )
    	spline:Interpolate(n,p,t)
    
    
    
    	--Camera look
    	gx=Round(GraphicsWidth()/2)
    	gy=Round(GraphicsHeight()/2)
    
    	dx=Curve((MouseX()-gx)/4.0,dx, 0.01*AppSpeed() )
    	dy=Curve((MouseY()-gy)/4.0,dy, 0.01*AppSpeed() )
    
    	MoveMouse(gx,gy)
    
    	camerapitch=camerapitch+dy
    	camerayaw=camerayaw-dx
    	camerapitch=math.min(camerapitch,89)
    	camerapitch=math.max(camerapitch,-89)
    	fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1)
    	--
    
    	if KeyDown(KEY_SPACE)~=1 then
    	fw.main.camera:SetPosition(p)
    	fw.main.camera:AlignToVector(t,3,0.01*AppSpeed() )
    	end
    
    	--was
    	--MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2)
    end
    
    fw:Update()
    fw:Render()
    
    Flip(0)
    end
    
    ShowMouse()
    
    

  15. Hmmm, magnetism comes to mind - scale velocity towards bodys. Iam in doubt with searching for just "quaternion camera" .. but it might gives a better idea. Report back if you find something about using the xbox360 controller for this if you dont mind - iam completely lost on that part. :unsure:

  16. FYI :

    there are plenty of "blender game engine" samples - at least for 2.4x.

    Search for "matrix scene" or that jump&run "Apricot". However, i havent seen any highDef inGame scene within blender yet + getting into a new engine its always better to choose something with a strong community imho.

     

     

    I know i should have added a "no blender game engine discussion". :) :)

  17. Hi,

    there are some pretty nice (GPL) models (animated) i would like to use - especially the thug model.

    Anyone can take the time convert these old max characters to fbx, dae or gmf for me ? - please do so. :)

     

    link :

     

    catmother

     

    the thug ( a hero and a cut-scene cherry pop ) is in the "cm-gfx-20030922.zip" file.

     

     

    PS : while we are at it - the hitman from codename47 can be found here. ( just riggid though )

  18. For me i dropped the idea ( which would bre great ) because of random knee (etc) juggling and having not the skills / tools to clean those out. Would be some great asset though. Its using all the same skels iirc - no fingers or toes tough.

     

    [edit] stupid reason i guess - aint much noticable on running or other faster motions.

  19. Makin videos ( desktop recordings ) of inEditor and inGame - free apps preferred :

     

    using CamStudio = doable

    using Frontcam = ok

     

    both might be older than the current version ( on my XP machine ) and they can record

    Le apps - however, far from optimal .

     

    other solutions + suggestions ... cheap, cheap

×
×
  • Create New...