Jump to content

flachdrache

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by flachdrache

  1. 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 - 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
  2. 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
  3. 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)
  4. flachdrache

    Relay

    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
  5. Cool ... make a benny hill mod, please.
  6. 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.
  7. I wouldnt say its all your fault josh - as a user we need to expect that the software is configured properly. In case of a backup i too would expect the default setting would be "all-and-everything". Got me tempted though and i might have to put a bbord up myself, just to work with it. I hope its not too bad for lw beginners ... at least there is the wiki, the set of tutorials, the user-manual and the C api manual from sep2010.
  8. Well, i meant to use "PointEntity" with an array of stuff you would like to look at while going on - not manually using the mouse. I thought i road something about "movie-camera" - my tired eyes. thx macklebee to pick that up.
  9. 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()
  10. 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.
  11. 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". :)
  12. Would be great - the thug is a great stereotype kind of a guy.
  13. 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 )
  14. 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.
  15. Lots of tweaking needs to go into this tho - e.g. these are straight recordings of them sessions afaik.
  16. Hmmm, an underwater game is a very good reason to implement some sort of infinite terrain - some kind of underwater s.t.a.l.k.e.r maybe.
  17. iirc is the "ProcessScene" code, you are using, outdated and does not handle terrain entitys ( or waterplanes etc. ) - comment out the very last part which frees nonProcessed ( not marked ) entitys. I suggest to use the "gameLib" ( dont know which version for 2.28, however ) since it will keep a lot of trouble away of yours. PS : some forum people still using 2.28/2.27, beside the lua enabled, current version.
  18. I was just thinking out loud how practical my approach is by loading floors, walls etc. into a empty dummy model in terms of physics ... ill take another look into it later. Dont know whats going on with your material file though. I guess it should be enough to load/create the transparent obejct in the transparency world and just render it like that. Dont know with shader mods atm - one could render the whole inside offscreen i.e. green-screen and copy it over the scene - but again how practical can it be. A material unable to receive dir lighting shadows would work too i guess. PS : if the material has noDraw=1 but shadows=1 - it is invisible but casts shadows. So, from the outside view it makes no sense to me that the shadows inside the building, casted by light inside the building is not visible from outside. It might should be noDraw, shadows, transparent = 1 ... and No iam not aware of a switch like "transparent".
  19. Hmmm, going through the scripts i think the conclusion is a exzessive use of the lua "scene definition" - i mean its currently half-baked. One could load all the static objects into the "house-object" too and be sparse with physic objects or make them destructible for the player_controller - which means to rewrite/change my approach. However, the objective would be pretty much drag & drop then. PS : the front material seams to be correct in my script but i dont create the object in the transparency.world - refraction shader showed me. ^^
  20. For the preview i actually planned it that way, that the walls are removed too - where the walls where removed can be seen on the floor but i like the see-through idea. I just test in the editor - how one has to sort the transparency.world outside the editor i can only guess atm. Another idea is to just hide the mesh - make it allways ambient_midnight or high noon, so the sun isnt in the way that much. I didnt played many such games ( only jagged alliance and fallout iirc - which are iso ) but i guess they had a lot of such issues in the design to solve.
  21. Here is the lua render - and these are separate model, assembled witin a dummy lua model. In this case its only the roof texture which gets replaced by a glass texture after close enough to the object if fw~=nil then object.model:Hide() pick2 = CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2, 25.0),0,0) object.model:Show() if pick2~=nil then SetWorld(fw.transparency.world) object.model:Paint(LoadMaterial("abstract::dirtyglass2.mat"), 1) SetWorld(fw.main.world) else -- [fixme] rePaint original material ... -- and scale materials alpha value by distance object.model:Paint(LoadMaterial("abstract::gTown_1_1024.mat"), 1) end end http://www.devmex.com/leFiles/blendRoof.png PS : lightmaps could be viewed from outside still.
  22. I experimented ( a lot ) with it - keeping a barely visible roof with no direct lighting texture0="abstract::dirtyglass2.dds" clamp0=0,0,0 //seethrough color=1,1,1,0.55 blend=1 //but cast shadow //nodraw=1 castshadows=1 depthmask=1 depthtest=1 cullface=1 overlay=0 zsort=0 specular=0.4 bumpscale=0.1 gloss=0.4 shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag" shadowshader="abstract::mesh_shadow.vert","" However, shadows casted in the house aint visible from outside too. [edit] changed nodraw commnad
  23. Two things from a german - one does not need to know everything but one need to know where to find the right answer. Dont downgrade your reality or youll end up somewhere completely different as initially planned. PS: Vector and matrix math seams to be the only game programming related math i continuously find in the interwebs.
  24. Nice ... , seams like iam not the only one who has to do some new, unknown stuff on the way - great to see that there are so many different game_types people are working on. I like to add a "shoot`em up" and an action-rpg (FPS) to the list then. Currently i setup a testApp to experiment with "camera & cutScene" with the hope to archive some knowledge about movie FX.
  25. So, i dont want to know how far it is or whatever - but i would like to know how many people actually are working on a computer game using leadwerks. And, if you like to add, which type of game. PS: Iam allready aware of the fact that at least three people, working on such, usually aint visiting the forum on a daily basis.
×
×
  • Create New...