Jump to content

Chiblue

Members
  • Posts

    589
  • Joined

  • Last visited

Everything posted by Chiblue

  1. I am finally working through building my collision controls into editor so I can use LUA to control the collisions of my entities... I have been looking at the engine_const script and are a little confused... can someone explain how these are used and why they are there, they do not represent enttiy types, I understand that these are used to define what gets rendered in the scene, but can we add our own, how are these attributed to the entities and is there a entity key for these constants?
  2. Nice idea, let me know when you have it working.... I will give it a try...
  3. I tried that but apart from using the scale option I could not change it, is there a way to add handles on each corner that I can drag?
  4. I am working with an AI engine in LE, and would like to use the editor to build additional AI controls... Firstly let me add I am not very experienced in editor, I can create basic object with properties and a GMF model, but this is were my experience stops.. I have built AI spawn markers that allow me to set the basic characteristics of the AI player, i.e. Team, aggresive, search, roam, attack, runaway... normal FSM functions... and have built a reasonable implementation of these within my project... The bigger issue I have is that I would like to create additional AI constrain objects, like zones and paths for patrols... The zones I would like to create a basic plane or box that I can position and size to contain the zone position I want... My problem with this is I can get a gmf file to represent my zone, but I cannot size it... The path object is more complex and I do not know were to start, I basically want to create a new path and link it to a AI spawn object, I may need a special object like AI spawn path (or something like that.), this would represent the origin, then I want to place markers that represent the path for the AI entity, then at each point I want to define behaviour, like look around, wait for some event etc... most fo this I can deal with but I would like to have the markers show linked in the editor and this is were I am struggling, what I woudl like to have is something similar to the line that visibly shows the nodes of the road linked... Can anyone offer any suggestions or point me to code that does this, I looked at the road lua and I am more confused by this than I get answers..
  5. I turned the log on to try and understand waht was happeing with the raycast... If I create a scene without any objects raycast works fine, but it seems that when I do one cast and hit an object, then do another which hits a different object it lags.. but not always... seems that from object to terrain lags... I understand this does not make sense, but this is the only pattern I have seen... and the log basically pinpointed that the lag is the cast, if I remove the case then I get no lag...
  6. Are you using Raycast, I have seen lags in raycast moving across objects, i.e. moving from one object to another... still trying to work out why... but just a consideration?
  7. I am not sure if the drop in fps was due to single camera or not, I did get the 1st and 3rd person working with 1 camera which did involve lots of show and hide entr entity for the different objects, I will look at this again today and if I still have issues will post the code. Thanks for the show hide entity for cameras that is helpfull...
  8. I tried that but my FPS drops from 300+ to 20-...
  9. I am working on building a 3rd Person Perspective into my project, I also want to have the ability to a overhead "birds view" camera option... So is it best to use a single camera and move it around to were you want it to shoot from, or is it better to run multiple camera and then activate or de-activate the one that is to be used... Oh and by the way, if multiple cameras are the way to go how do I activate a different camera using the same scene?
  10. Posted... See... How To Convert FPS Creator weapons to GMF
  11. NP, I will clean it up a little and post it on the resources page..
  12. Really? I think I would rather just get information on accessing the opengl referencies for the different objects within the LE...
  13. As a side note I have recently been working on some of the less than clean .x files available in other FPSC packs, specifically pack 9 and pack 6... these HUD.x models are basically a mess when you load them into UU3D they are a disaster once you try to use animation... the problem is that the HUD.X contains animation scaling frames... these mess up big time. The question would be then if they are so bad how does FPSC load them, well FPSC always loads the DBO file if one is available and these (in all I checked) have one, so a good hint on this is if there is a hud.dbo file in the folder, watch out, until UU3D has a viable DBO import filter you are stuck with the .X file... I have played around somewhat with these models in UU3D and found that in most cases if you selectively delete the scaling animation, also the set scale option in the bone properties... this really helps... The other problem you see with these packs specifically are the bone influences on the vertex... It seems that TGC used the same basic hand model for many of thier hud models... as the vertex are attached to the bone but are not in the correct location... this is simply a matter of repositioning these vertices and these will work ok.. to some extent you do have to do this using trial and error but I have now managed to load several of these into LE model viewer, Editor and C++. If you have a specific model you are trying to load please feel free to let me know and I will try and help all I can...
  14. This is not exactly a feature request and it may already be availabe but as LE does not natively support all open GL functionality, it would be very useful to get information on how to reference the open gl objects within LE, for example I recently needed to reference a loaded texture and thanks to the community I got the answer I needed... But this said, I am now working on a couple of other functions within my project were I need to access and be able to set different buffers, like the stencile buffer and it would be helpful if we have information available on how we can reference these... also things like entities, etc would be very helpful... This way we can extend our own implementations of LE by using native Open GL commands, I am sure, like the texture issue that these are available but some documentation would be very useful..
  15. personally I agree, I have developed in both directx (9) and now open gl and both have thier own skeletons. In my experience OpenGL appears to be more hardware intensive when I play games using dx my system will run at a high fps with all graphics option and a resolution of 1920 x 1200 but the only OpenGL games I have tried start struggling when you use high end graphic options even when running dual GTX 8800 oc in an SLi config. This is only my personal impression.
  16. I was hoping for to be dynamic... incase I add other entities that I want in the map... Also for fire by wire missiles (a little off yet) I want to create a panel that shows the flight and allows some control over the missile path...
  17. I built this function that works within a seperate pure opengl code... but when I put it into my LE project it oes not work... and I believe that the issue is that I am not rendering to the stencil buffer, does anyone have any suggestions how I can do this? glViewport(0,0,size.X, size.Y); glStencilFunc(GL_ALWAYS, 0x1, 0xff); glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); glColorMask(false, false, false, false); glDepthMask(false); drawCircle(0,0,size.X/2,30); glColorMask(true, true, true, true); glDepthMask(true); glStencilFunc(GL_NOTEQUAL, 0x00, 0xff); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); RenderWorld(ENTITY_TERRAIN); glStencilFunc(GL_EQUAL, 0x00, 0xff); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
  18. How does this work in Gamelib, the render command from the framework does not allow a list fo entities?
  19. So when I set my stencil buffer to the active buffer, and then call renderworld... makes sense, thanks... Probably a stupid question but, the entity_??? options are the entity types defined within the LUA script for constants?
  20. I am building a minimap in my project, I have the code working but my problem is trying to isolate the scene drawing function, All I want to project within the map is the scene from the editor file, and none of the ingame entities like players or vehicles... Can someone please tell me what engine function is used to build the basic scene and terrain for the camera render?
  21. Given the size of the project... I cannot provide it all, but these are the specific parts... Declaring the mesh..weapon class setup.. modelhud = LoadMesh(hudmesh); This code is called when a weapon is selected by the player.. TWeapon *weap = &weaponslot[currentweapon].weapon; EntityShadowMode(weap->modelhud,false); ScaleEntity(weap->modelhud,Vec3(weap->GameScale,weap->GameScale,weap->GameScale)); EntityParent(weap->modelhud, cam); PositionEntity(weap->modelhud,EntityPosition(cam,1),0); TVec3 rot = EntityRotation(cam,0); RotateEntity(weap->modelhud,Vec3(rot.X+weap->rotatex,rot.Y+weap->rotatey,rot.Z+weap->rotatez),0); TranslateEntity(weap->modelhud,Vec3((flt)weap->horiz,(flt)weap->vert,(flt)weap->forward),0); ShowEntity(weap->modelhud); EntityOcclusionMode(weap->modelhud,0); EntityType(weap->modelhud,11); CameraZoom(cam,weap->stdzoom); weaponstatus = ready; firingstep = 0; animwait = false; SetFPSAnimation("draw"); This is the code that rotates the camera... TPlayer *pla = scene.currentplayer; TWeapon *weap = pla->GetWeapon(); mx=Curve((flt)MouseX()-scene.cx,mx,4); my=Curve((flt)MouseY()-scene.cy,my,4); CenterMouse(); camrot=EntityRotation(cam); camrot.X+=my*scene.GetCurrentPlayer()->turnspeedY/camzoomcurrent; camrot.X=Clamp(camrot.X,mincamXangle,maxcamXangle); camrot.Y-=mx*scene.GetCurrentPlayer()->turnspeedX/camzoomcurrent; camrot.Z=0; RotateEntity(cam,camrot); RotateEntity(scene.GetCurrentPlayer()->campivot,camrot,1); This code was mainly adapted from the Gamelib.. so you will see many similarities.. Please let me know if you need any further explanation?
  22. After making lots and lots of mistakes and getting some very useful help from the LE community I thought I would post a how to for getting FPSC model packs into LE... First thing to note is that not all things are equal in the FPSC world so this exercise is one of trial and error... some model packs work some don't so note "You have been warned" The FPS Creator model packs for the most part use an animated mesh called Hud.x, this mesh contains weapon hands and ammo models and textures.. (although not always all 3).. There is a file in the folder called gunspecs.txt this is a config file used by FPS Creator to load the weapon animations, sound, gun flashes, smoke etc, etc.. so take a look at this.. The other things you will need for this basic set of steps are the hud.x, and the ammo??.dds, gun???.dds and hands???.dds, these names are sometimes different but always (well mostly) contain ammo, hands and gun.. The tools you need are a 3D editor that supports direct.X and GMF, UU3D is the one I now use after several different not so cheap trials, get UU3D and the direct X and GMF plugins... for the textures I use Corel Paint Shop Pro X2 with the DDS photoshop plugin.. to get UU3D and PSP X2 will set you back $100 or there abouts... but well work it.. So now you are armed with the tools... you are ready to start... These steps are my process so you can change them as you feel fit, but this works for me so use this and then try your own approach... 1. Take the folder for the weapon from the FPSC pack, I will use the G3 as this is my favorite FPS weapon... So in the FPS pack, copy the entire G3 folder into a working folder.. 2. locate the 3 textures for ammo, gun and hands and now using your graphics tool open them and resave them as DXT5 8 bit alpha.. sometimes they already are but this has tripped me up a couple of times... 3. Find the genmat exectuable in the LE tools folder and copy it to your G3 folder, and drag one of the DDS files onto it, this creates a basic material file for each... now open up each mat file and remove all but the first line i.e. texture0="ab... leave this line as is.... Replace the other lines with the following lines.. shader="abstract::mesh_diffuse_bumpmap_skin.vert","abstract::mesh_diffuse.frag" shadowshader="abstract::mesh_shadow_skin.vert","" and save the mat files, this has to be done for all 3 dds files.. 4. Open the hud.x file in UU3D ensure you select swap handedness in the options otherwise you are left handed... I always create both just to allow the player to pick which they prefer... kind of a fun little option.... 5. Now I will normall scale this to 1/4 normal size using the modifiers/scene/scale option... and then I will use the modifiers/scene/move and center the model... you will still have to scale the model in LE but I prefer to keep this scaling at a minimum, if you wish you can leave it as is and scale more... 6. Now you will need to apply the textures... on the right panel of UU3D there will be a materials option... expand this and you will see the required materials... they are mostly names ammo, hands and gun... although again not always... so double click or right click and select properties on the first texture... click the middle tab "maps" and in the difuse select bitmap and click and assign the dds file you just saved... do this for all 3 textures as appropriate.. 7. I will normally save the file as a UU3D native file so I can re-edit it later if I wish... your choice (you cannot open GMF files), next step save as HUD.GMF or whatever you wish.. in the GMF save options ensure you select to save animations and bones... 8. You are now ready to load the mesh into LE, using the loadmesh function, you will have to rotate the mesh 180, and position on the Y and Z to get it correctly positions... you will also hav to scale it... these are all trial and error, I will normally create a config file in the folder to record all these options, alternatively you can create a lua script... if you get this working I would like to see it... Well I hope this helps you get these models into your project... but remember not all packs work, some require lots of manipulation and even when you get them in strange things happen...
  23. Tried it still not working... It obviosly something to do with the camera culling the mesh but I don't know why the entire mesh when I have had culling issues previously. Just faces did not get rendered not the entire mesh, I will keep trying thanks for the help.
×
×
  • Create New...