Jump to content

ParaToxic

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by ParaToxic

  1. Oh sorry I didn't mention that I use Leadwerks Engine 2...:/
  2. Hey guys after a long break I want to create a new little game and learn a bit about scripting in lua. I want to create a 2D HUD entitie with a script that for example draws "Press the F key to..." if I collide with a Collider. But I realized that I cant use the AddHook function inside of an object. How can I use drawing functions like DrawText in the objects script ?? Thanks
  3. Look the idea is to set a pivot to the head of the character with entityparent which moves and rotates with the head animation while idle/walk.... but I want to adjust the percentage of rotation the camera moves so I position the camera to the pivots position and rotate each axis but multiply it with my percentage value. That is because some animations are very strong in the X or Y axis so I want to adjust it. I could skip the pivot and take the rotation of the head bone itself but it gives me very bad values, with global parameter 1 or 0 it makes no difference....
  4. Hey guys I have a problem in my gamecode but I don't even know why.I placed a pivot ( a cube) to the head of a character and fixed it with entityparent.Now I position in the Update function the camera to this cube pivot with positionentity which works perfect but the rotateentity function don't work.When I try to give the camera the same rotation as the pivot it doesn't rotate... For tests I also fixed the camera to the pivot with entityparent which works fine but without the camera doesn't roate... I don't know why maybe somebody can help me RotateEntity(IEngineSystem::Inst()->GetCamera(),EntityRotation(this->m_headpivot)); Thanks
  5. Hey I have a question.I want to animate a character with a idle animation but want the head not to wobble so hard as it is doing now in the animation.So I thought I first animate the whole character mesh with the idle animation and then Animate only the Head with Frame 0 or 1 ( the neutral position) with a blending value of 0.7 oder 0.8. But it doesn't work. No matter which value I use. Even with 1.0 the head is still wobbling . How can I solve that ? This don't stop the head : Animate(trooper,frame,1.0f,0,true); Animate(head,0,1.0f,0,true);
  6. Hey there I have a little question.I have an animated character and I want place the cam to the head of the character and rotate it with the mouse.The problem is that the picked bones rotationorigins are not at 0 ( you know what I mean ) , so when I try to rotate it in the X axis it turns diagonal or something like that. Is there a way to rotate it with the correct origins of the camera ? I mean when I make a simple egoshooter camera with mouse input and say RotateEntity(Vec3(mx,my,0)); it turns the camera perfect with the mouse.Now I want the same result, but now I need to turn the Head which local axis aren't at 0,0,0 We speak here about Leadwerks 2 functions Thanks
  7. Very nice game, very good idea and runs very smooth and fine big plus from me
  8. Hey ya, I have a question.Does anybody has some code to visualise the rotation of an entity like in the editor with that arrows but for C++ , maybe with the DrawLine and UnProject... functions ?? Is that possible, because I need it so much for debugging rotation of invisible objects as well as visible. Thanks
  9. Hey guys I have a question.I would like to bind my camera to a head which is animated.But the animations for running and so one have a big amplitude in the rotation, so the rotation of the camera is to big and it looks very unnatural. I would like to disable the function that the camera is rotated with it's parent or maybe only 10% of the oroginal rotation, is that possible ?? Thanks
  10. Thanks but I got it now Had to use Native.register but put the Dlls in the JDK bin folder
  11. Hey ya, I wan't to use java for a schoolproject with leadwerks and looked at the tutorial for that kind of stuff. Well I have some problems to get the Graphics command work in my sample. I just use the same code as in the tutorial but use System.loadLibrary("engine"); to load the engine because with Native.register I get the following error: Unable to load library 'engine': Das angegebene Modul wurde nicht gefunden. Then I have a main function like that; [size=4]public static void main(String[] args)[/size] { int a = LE.Initialize(); System.out.println("result:" + a); LE.Graphics(600, 800, 32, 0, 4); } But with the Graphics function I get the Error: Exception in thread "main" java.lang.UnsatisfiedLinkError: Leadwerks.LE.Graphics(IIIII)I at Leadwerks.LE.Graphics(Native Method) at lo.main.main(main.java:17) Java Result: 1 Hmmm, can somebody help me with that, it's very important for me get it working Thanks
  12. Wow I think my guess in THE DREAM wasn't too bad Do I get LE3 for free now ) haha
  13. Hey I would like to ask you where I can find the shader code for example changing the light model ( I think it's phong now ) ? I can't find it in the mesh.frag shader, but I saw in the Lighting folder for example in the DirectionalLight.frag file , that there are some modifications, which looks like that what I'm searching for.But now the question is, which vertexshader do that lighting-pixelshaders use ? I need to add the Tangent and Binormal variables to create a anisotropic material. EDIT: I forget, it's a deffered renderer So is it possible to get the tangent in the lighting shader ? Caus' I need the normal ( is available ) and the tangent -> compute the binormal. Thanks
  14. THE DREAM !!! Let's say tomorrow will be the day of the release, I gona work as a projectionist
  15. Would be cool when it works with the camera.I don't realy know how it will works with the order of shaders.I mean for example the antialiasing shader should be applyed at the last pass and before all the stuff the lighting shader has to be applyed... maybe some functions to add the postprocessing effects before lighting, or after some basic shaders and so one
  16. Hey I would like to ask something about the renderer in LE3 . Is it possible to add custom shaders / buffers and passes to the pipeline ( or the framework, but I haven't heard something about a framework yet) ? I mean when I would like to add a new shader, let's say a bokeh postprocessing shader and now I wan't to add a new buffer to the frameworks renderer and let the shader render some passes .... is that possible ? How does the framework or rendering pipeline looks like in that spot ? Thanks
  17. Thanks I git it now Well the TurnEntity function doesn't work here, the result is the same as with 'RotateEntity, so the TurnEntity(...Vec3(1,0,0)) causes only a 1 degrees rotation and not 1 degrees per frame. When I call first the animate function an then the rotateentity function it works well....so thanks
  18. The same code ? Can you send me your project?
  19. Look at that.I tried with the soldier mesh and the animation sequences: #include "engine.h" #include <iostream> #include <string> const int ScreenWidth = 800; const int ScreenHeight = 600; const char* MediaDir = "D:/Leadwerks Engine SDK 2.5 V2"; const char* AppTitle = "Anim"; void ErrOut( const std::string& message ) { std::cerr << message << std::endl; } // ------------------------------- int main( int argn, char* argv[] ) { // Initialize if( !Initialize() ) return 1; SetAppTitle( AppTitle ) ; RegisterAbstractPath( MediaDir ); // Set graphics mode if( !Graphics(ScreenWidth,ScreenHeight) ) { ErrOut( "Failed to set graphics mode." ); return 1; } // Create framework object and set it to a global object so other scripts can access it TFramework fw = CreateFramework(); if( fw == NULL ) { ErrOut( "Failed to initialize engine." ); return 1; } // Set Lua framework object SetGlobalObject( "fw", fw ); // Set Lua framework variable BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); // Get framework main camera TCamera camera = GetLayerCamera( GetFrameworkLayer(0) ); PositionEntity( camera, Vec3(0,2,-2) ); // Create cube TMaterial material = LoadMaterial( "abstract::cobblestones.mat" ); TEntity mesh = LoadMesh("abstract::soldier.gmf"); int seq = LoadAnimation(mesh,"abstract::animidle.gmf"); TEntity child = FindChild(mesh,"Bip01 Head"); SetBloom(1); SetHDR(1); SetSSAO(1); // Create ground TMesh ground = CreateCube(); ScaleEntity( ground, Vec3(10,1,10) ); PositionEntity( ground, Vec3(0,-2,0) ); PaintEntity( ground, material ); // Add some light TLight light = CreateDirectionalLight(); RotateEntity( light, Vec3(45,45,45) ); // Spin cube until user hits Escape while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) { Animate(mesh,AppTime()/70.0,1.0,seq); if(KeyDown(KEY_UP)) TurnEntity(child,Vec3(1,0,0)); UpdateFramework(); RenderFramework(); Flip( 0 ); } } return Terminate(); }
  20. Thanks for the answer.I mean it isn't the problem of the child.When I get the child and move it around without the Animate function everything works fine but with the Animate function it doesn't effect anything..
  21. Look at my code: [/size] TEntity mesh = LoadMesh("abstract::mesh.gmf"); ..... Update Animate(mesh,AppTime()/40.0,1.0,0); TurnEntity(FindChild(mesh,"Bip_Head"),Vec3(1,0,0)); It doesn't work for me :/
  22. Well it doesn't work I deleted all rotation keys for the head bone but I still can't rotate it
  23. Hey ya, I would like to ask if it is possible to rotate a bone of a animated mesh white the animation. I have positioned and rotated my camera to the Head bone of a character and wants to rotate it while the running/idle animation ... but I doesn't work, I can only do that when the character isn't animated ( so without the Animate() function ). Can somebody help me ? Thanks
  24. Hmmm now I have an other problem. When I insert 4 items I have the size of 1 and just one key bind ?! How is that possible ? Look at the code: [/size] SetKeyBind(m_forward,ReadINI_Int(filename,"Keys","move_forward")); SetKeyBind(m_backward,ReadINI_Int(filename,"Keys","move_backward")); SetKeyBind(m_strafe_left,ReadINI_Int(filename,"Keys","strafe_left")); SetKeyBind(m_strafe_right,ReadINI_Int(filename,"Keys","strafe_right")); IConsole::inst()->Debug("SIZE 1 : %i",m_keybinds.size()); And the SetKeyBind Function: void IHumanInterface::SetKeyBind(int &var,int key) { m_keybinds.insert(std::make_pair(boost::ref(var),key)); } Working now, had to swap the keys of the map
×
×
  • Create New...