Jump to content

darrenc182

Members
  • Posts

    55
  • Joined

  • Last visited

Everything posted by darrenc182

  1. I have a quick video that shows what I have been able to do with recast and detour. The first part of the video shows a character, you all might recognize him, as he first see the player, shoots at him and then tracks him down to try and finish the job. The second part of the video is basically the same thing, however there is blue mesh on the ground. The blue mesh is the navmesh that shows where the soldier can go. The barrel in the scene, breaks up the navmesh and blocks the most direct path for the soldier to go. The soldier as a result has to take a less direct route. The video can be found .
  2. That's what I was going to ask. I did see additional source code and header files that are not in the depreciated zip files available for download. I just don't know how to use them with detour and recast.
  3. Does anyone know how to use Detour to handle dynamic obstacles? I've been looking online in Mikko's blog however I did not get any information about it. I saw a video in this forum that was using spheres as dynamic objects and showing Detour performing path adjustments when the path is being blocked. The video I am referring to is here: . Any and all help will, as always, be greatly appreciated.
  4. Here is my code for creating a decal. Decal = CreateDecal(pick.surface, TFormPoint(Vec3(pick.X,pick.Y,pick.Z), NULL, pick.entity), 1.0f, 0); EntityParent(Decal, pick.entity); PaintEntity(Decal, LoadMaterial("abstract::dev_decal.mat")); UpdateMesh(Decal); AddMesh(Decal, pick.entity); time = AppTime(); sprintf(key, "%f", time+5000); SetEntityKey(Decal, "killtime", key); SetEntityCallback(Decal, (byte *)UpdateBulletDecalCallback, ENTITYCALLBACK_UPDATEPHYSICS); And here is the code for freeing the decal once the specified time has been reached. void __stdcall UpdateBulletDecalCallback(TEntity entity) { float time, time_value; str key_value; key_value = GetEntityKey(entity, "killtime"); time_value = flt(atof(key_value)); time=AppTime(); if(time>time_value) FreeEntity(entity); }
  5. I am setting the parent of the entity, but I'm not removing the parent until the user quits and I need the decal to disappear before then since these particular decals are bullet holes.
  6. Thanks for the reply Metatron. How do I remove the decal when the time passes. I make a call to FreeEntity when the set time expires, but that doesn't remove the decal.
  7. Decals won't disappear when freeing the entity. This use to work fine and it was the way I erased bullet decals after a certain amount of time. Does anyone know why the decals no longer disappear after the decal's entity is freed? Also is there a way to remove a decal after a certain time frame? I will post some code if needed upon request. Thanks in advance for all help and suggestions.
  8. Well now I know Lumooja is almost completely out to lunch, since the math doesn't work. I thought you were serious about FORTRAN being faster then C/C++ in I/O writing, but I couldn't wrap my brain around it since you can embed assembly language into C/C++ for the most optimization and therefore the fastest possible code for reading and writing to disk. I guess in the end it depends on what functions you use for your tests, but I can't see FORTRAN being faster than C/C++ and even if it was I don't see it being faster by much.
  9. I think your choppiness is due to how quickly you update the frame that needs to be play per clock cycle. You may need to update how you are determining when to play the next frame. The code I use to determine when to play the next frame in a sequence is below: next_frame = (AppTime() - animationStartTime) / frameSpeed; next_frame = fmodf(next_frame, m_fEndFrame - m_fStartFrame) + m_fStartFrame; frameSpeed is set to 30.0f which is how many frames to play per second. animationStartTime is updated by AppTime every frame m_fStartFrame and m_fEndFrame are the start and end frames for the current sequence. This setup works well for me and I use it for all my animations. Also I keep my blend to 1.0. I think you may be misunderstanding how the blend parameter works. From what I understand it determines how strong or fast the transition from one sequence to another must take place. I set mine to one because I want to go from one frame to another right away. I think that a blend parameter of less then one would work best in a slow motion scenario. This makes sense to me if you are playing the animation twice as slow as normal. In my case that would be playing the animation at 15 frames per second instead of 30 and setting the blend parameter to 0.5. Well hopefully that helps you out a bit.
  10. Why do you need any of those implemented into the engine?!?! Why can't you just include them in your game code?!?! That's one of my big problems with this engine. Things that are packed into the engine like Lua and Newton should be separate and included by the user. This allows for the engine creator to focus on what he/she does best, which would be the graphics in this case, and would allow for other people do what they do best. I would like to see the engine do terrain carving and switch to using voxels for rendering terrain. I don't really care about Anti aliasing because I think that can be done by the user and I remember hearing that when using deferred rendering anti aliasing doesn't yield great visual results. Cascade shadows is essential in this engine when working with terrain.
  11. Thanks macklebee. I was able to get rid of that message box.
  12. I'm not calling any of those scripts in my code. Does the engine call those scripts automatically and load them if the script is found?
  13. I am wondering how I can get rid of a message box that pops up when loading a scene in 2.32 and 2.4. The message box says can't open scripts/class. I do not use the leadwerks built in lua script and therefore I don't need any scripts made by leadwerks. Is there anyway to disable it or turn off?
  14. What about using a shader to do the vertex processing. You could use a vertex displacement mapping shader as a reference.
  15. I don't see how you could parent a mesh's vertices to a body. I think you would only be able to parent a mesh to a body. Now you could always define a mesh with the vertices that need to get parented to the body. I guess the only other option would be to do it manually. Instead of using ParentEntity and letting the engine do all of the work, you can get the body's matrix and apply it to the vertices every clock cycle or whenever it is needed. Those are my thoughts on the subject. Rick if you don't mind me asking what do you need to do this for?
  16. +1 for this request. A must have that would definitely help speed up content creation.
  17. I am having trouble implementing vehicles using the raycast vehicle implementation with Leadwerks Engine 2.31. Below is how I am creating the vehicle: pos = EntityPosition(vehicle); if(!CreateEntity(vehicle)) return false; PositionEntity(vehicle, pos); SetBodyMass(vehicle, 5.0f); EntityType(m_Entity, 3); wheel[0]=LoadModel("abstract::hmmwv_tire.gmf"); wheel[1]=LoadModel("abstract::hmmwv_tire.gmf"); wheel[2]=LoadModel("abstract::hmmwv_tire.gmf"); wheel[3]=LoadModel("abstract::hmmwv_tire.gmf"); tire_pos[0] = EntityPosition(FindChild(m_Entity, "Tire01"), 0); tire_pos[1] = EntityPosition(FindChild(m_Entity, "Tire02"), 0); tire_pos[2] = EntityPosition(FindChild(m_Entity, "Tire03"), 0); tire_pos[3] = EntityPosition(FindChild(m_Entity, "Tire04"), 0); m_vVehicle=CreateVehicle(m_Entity); int tire1 = AddVehicleTire(m_vVehicle,tire_pos[0], 5.0f, 0.0f, 20.0f); int tire2 = AddVehicleTire(m_vVehicle,tire_pos[1], 5.0f, 0.0f, 20.0f); int tire3 = AddVehicleTire(m_vVehicle,tire_pos[2], 5.0f, 0.0f, 20.0f); int tire4 = AddVehicleTire(m_vVehicle,tire_pos[3], 5.0f, 0.0f, 20.0f); The variable vehicle stores the vehicles chassis mesh. When the vehicle is created it does one of two things. The vehicle's chassis either falls half way through the floor of my level or it bounces all over the place. This image illustrates what I was talking about with the vehicle falling half way through the floor. This second image shows the physics bodies for the vehicle and the vehicle's wheels. This final image shows the start position of the vehicle when it is created. This is the position that is received from the PositionEntity(vehicle, pos) function call. Here is the update code for updating the vehicle every clock cycle. TVec16 chassisMatrix; SetEntityMatrix(wheel[0],GetTireMatrix(m_vVehicle,0)); SetEntityMatrix(wheel[1],GetTireMatrix(m_vVehicle,1)); SetEntityMatrix(wheel[2],GetTireMatrix(m_vVehicle,2)); SetEntityMatrix(wheel[3],GetTireMatrix(m_vVehicle,3)); SetSteerAngle(m_vVehicle, 25.0f, 0); SetSteerAngle(m_vVehicle, 25.0f, 1); I would really appreciate any and all help with this problem because it's been kicking my butt for a long time. I don't know if it's a problem with my implementation or if it is a limitation of the vehicle implementation within the engine. Like I said any and all help to correct this problem will be greatly appreciated. Thank you in advance.
  18. Hey Josh, I just had a few ideas. What if you included GMF file export for the character shop program and maybe give the program to licensed Leadwerks engine users/owners?!?! I was also wondering if you could include the ability for the user to select what animations they want to include in their animation sequence when saving/exporting from the program?
  19. I'm getting that value and values like it from a GMF model's vertex. Is there any way to identify these values programmatically and set them to zero so I can do other calculations? Never mind, I am able to round if off to zero.
  20. I have been wondering what this vector value means 5.3425065e-006? How can values like this be handled?
  21. I am using RakNet with 2.31 and I have a master server, master client, dedicated server and client set up for my multiplayer component. I have no idea how to use the netwerk library.
  22. I believe backface culling is done automatically by the engine before any triangles are rendered unless the material being used for the surface says otherwise. I would think that view frustum visibility testing should be done before any occlusion testing since it is cheaper then polygon occlusion testing and I believe that every model is occlusion unless otherwise stated. Octrees will be used in 2.32 but I don't remember in what capacity. Anyway hope that helps out a little bit.
  23. I finally got the performance I need. I had more polygons that what was needed for the level's geometry. I just have to keep the polygon levels down and I should be fine. Thanks for all the info guys.
  24. darrenc182

    Picking up speed

    I've been using luabind since LE 2.28. I think it's great because it supports multiple object instances without getting all "confused". You can also define specific functions for each class. Luabind has treated me pretty good.
×
×
  • Create New...