Jump to content

ArBuZ

Members
  • Posts

    164
  • Joined

  • Last visited

Everything posted by ArBuZ

  1. Hi all! I wonderig will LE work on Asus EeePC 1201N ( http://www.liliputing.com/2010/02/asus-eee-pc-1201n-review.html ) It has nvidia ION GPU. Of course this is not going to be my primary machine. Jus for road trips (Summer time ) I want to always have the ability for coding I could write little chunks of code on it. And model some simple models.
  2. I dont know if it helps, but I can assure you that the exporter for max works perfectly. It supports all features related to exporting process( geometry, animation, skinning, materials, and even more!) And if you will find any usefull feture that exporter doesn't support, I will do my best to implement that feature.
  3. How do you export from 3ds max? I tried to export simple spher via my exporter and via fbx and all works fine. All mapping is correct(it looks like yours) and in the engine it shows correctly. Maybe the texture is the problem?
  4. Roland the error occurs in the main loop and not in the end of program. But I had such problems as you described and solved it as you pointed. Thanks. Rick, you are absolutly right about push_back command. Pointers solved my problem. Lumooja I like to use pointers but need to be more cearefull. And I dont see -> sign is so ugly I can live with it.
  5. I thought isReference is used to prevent this.
  6. First thanks for your time. Well, if I change it to Sound& myClass::GetSound(void) const then nothing plays at all. But!!! If I use TSound instead of LEO::Sound then everything works very fine! So I guess its LEO issue, isn't it?
  7. Nope. Even if comment out sound.Free() in the destructor, I get the same error
  8. Hi! I have some problems with using vectors. And for showing my problem, Ive made some simple example. I have my own class "myClass" This class has Sound attribute as protected member: class myClass { protected: Sound sound; public: myClass(std::string soundPath); myClass(); ~myClass(void); Sound GetSound(); }; myClass::myClass(std::string soundPath) { sound.Load(soundPath); } myClass::~myClass(void) { sound.Free(); } Sound myClass::GetSound() { return sound; } In main loop I try to collect "myClass" objects to a vector and access the sound for creating source via the vector. Here is the code: int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { Engine engine( "VectorTest", 800, 600 ) ; Engine::SetAbstractPath( "C:/Leadwerks Engine SDK" ) ; Engine::SetFilters() ; World world( CREATENOW ) ; if( !world.IsValid() ) { MessageBoxA(0,"Error","Failed to create world.",MB_OK); return engine.Free() ; } Buffer gbuffer( Engine::GetWidth(), Engine::GetHeight() ); Camera camera( CREATENOW ); camera.SetPosition( 0, 0, -2 ); Material material("abstract::cobblestones.mat") ; Cube mesh( CREATENOW ) ; mesh.Paint( material ) ; Cube ground( CREATENOW ) ; ground.SetScale( 10, 1, 10 ); ground.SetPosition( 0, -2, 0 ); ground.Paint( material ) ; DirectionalLight light( CREATENOW ) ; light.SetRotation( 45 , 45, 45 ); Source source; myClass myC("abstract::gunshot.ogg"); myClass myC2("abstract::reload.ogg"); std::vector <myClass> vec; vec.push_back(myC); vec.push_back(myC2); // Game loop while( !Keyboard::I****() && !Engine::IsTerminated() ) { if( !Engine::IsSuspended() ) // We are not in focus! { if (Keyboard::I****(KEY_SPACE)) { if (source.IsValid()) source.Free(); source.Create(vec[0].GetSound(),EAX); source.Play(); } // Rotate cube mesh.Turn( Vec3( 0.5f*AppSpeed() ) ) ; // Update timing and world Engine::UpdateTime(); World::Update( Engine::GetSpeed()) ; // Render gbuffer.Set(); World::Render() ; Engine::GetBackBuffer().Set() ; World::RenderLights(gbuffer); // Send to screen Engine::Flip(0) ; } } // Done return engine.Free() ; } This code gives me error on leFreeSound() command that I don't call. If I don't use vectors, and just get sound of any object it works fine. Please help me with this issue. Thanks in advanced. PS I know that Lumooja is a fan of vectors So please, I need your help
  9. Hmm, Im quet sure I have LE 2.31 now (At least I used updater to get it). Maybe it has been fixed for 2.32. I havent downloaded it yet.
  10. I'm not sure if this is related to current topic, but Entity::LoadAnimation() command in LEO returns boolean while it should return int - index of loaded sequence.
  11. Im not sure but try to pass pointer to void Level::ActivateTrigger(Trigger &trigger) function. void Level::ActivateTrigger(Trigger *trigger) and in the function use ->
  12. Hi. Just tried new LE version. The zone is great! The one thing that Iv noticed is some problem with lights. When I look at some light and then turn out from it the light switches off. And when I turn back to the light its turned off for a second or less and then it turns on. As I understand its some kind of optimization, but this is very noticeable. Also only with this scene I finally could see the bloom and HDR effects in action. And actually I can't understand how does it exactly works. Is there any info to read about them?
  13. I didnt understand your problem in detail, but SetEntityCallback(entity,NULL,ENTITYCALLBACK_COLLISION) - disables callback.
  14. one more way to calculate frame is calculate it based on animation speed in fps. For example you have animation that is made as 30 fps animation. Then frame will be: frame+=30*(Engine::GetTime()-prevAnimTime)/1000.0; Animate(frame); prevAnimTime=Engine::GetTime(); Then your animation will always be played 30 frames per second.
  15. Its a constant. any number you wish. Yep.
  16. Hi Shard! I think that in case of none loop animation you should calculate frame the other way: frame=StartFrame switch(state){ case reload: frame+=ANIM_SPEED*Engine::GetSpeed(); Animate(); if (frame>=EndFrame) state=anotherState; break; }
  17. Converting models is a such specific process. If you want to get really nice quality you have to work on each asset you want to see in the scene. Adjust materials number of surfaces, animations etc. I wouldnt leave this to default scene converter. But this is my opinion I'd really like to have Material editor in LE Editor. Ability to assign and adjust all materials of the models in the scene in real time.
  18. Tried many times with no success. Dwnload stops with error all the time. after downloading complete the file size is 60-80mb. Does updater work? Ive tried it but updating is very slow.
  19. Yes, you are right. After rotating and scaling it a few minutes I saw strange behavior. But itis not sudden changes. The child get smoothly distorted and back to normal shape while rotating (by the way I use LE 2.31) Any way Im glad that you've paid attention to this problem and now you know that it exists Hope this problem will be solved
  20. I don't want waste your time, but could you try this code in main loop: if (Keyboard::IsDown(KEY_T)) { //Axis2.SetRotation(Axis2.GetRotation().X+0.1, Axis2.GetRotation().Y, Axis2.GetRotation().Z); //Axis2.Turn(0.1,0,0); RotateEntityLocalM(Axis2,0.01,0,0); } if (Keyboard::IsDown(KEY_Y)) { //Axis2.SetMatrix(matrixMult(Axis2.GetMatrix(),GetTurnMatrix(0,0.01,0))); //Axis2.Turn(0,0.1,0); RotateEntityLocalM(Axis2,0,0.01,0); } if (Keyboard::IsDown(KEY_U)) { //Axis2.SetMatrix(matrixMult(Axis2.GetMatrix(),GetTurnMatrix(0,0,0.01))); //Axis2.Turn(0,0,0.1); RotateEntityLocalM(Axis2,0,0,0.01); } if (Keyboard::IsDown(KEY_G)) { //Axis1.SetRotation(Axis1.GetRotation(GLOBAL).X+0.1, Axis1.GetRotation(GLOBAL).Y, Axis1.GetRotation(GLOBAL).Z,GLOBAL); //Axis1.Turn(0.1,0,0); RotateEntityLocalQ(Axis1,0.01,0,0); } if (Keyboard::IsDown(KEY_H)) { //Axis1.SetRotation(Axis1.GetRotation(GLOBAL).X, Axis1.GetRotation(GLOBAL).Y+0.1, Axis1.GetRotation(GLOBAL).Z,GLOBAL); //Axis1.Turn(0,0.1,0); RotateEntityLocalM(Axis1,0,0.01,0); } if (Keyboard::IsDown(KEY_J)) { //Axis1.SetRotation(Axis1.GetRotation(GLOBAL).X, Axis1.GetRotation(GLOBAL).Y, Axis1.GetRotation(GLOBAL).Z+0.1,GLOBAL); //Axis1.Turn(0,0,0.1); RotateEntityLocalM(Axis1,0,0,0.01); } if (Keyboard::IsDown(KEY_) { Axis1.SetScale(Axis1.GetScale().X-0.01,Axis1.GetScale().Y,Axis1.GetScale().Z); } if (Keyboard::IsDown(KEY_N)) { Axis1.SetScale(Axis1.GetScale().X, Axis1.GetScale().Y-0.01,Axis1.GetScale().Z); } if (Keyboard::IsDown(KEY_M)) { Axis1.SetScale(Axis1.GetScale().X, Axis1.GetScale().Y, Axis1.GetScale().Z-0.01); } MouseNavi(camera,0.8,0.1,0.8,0.1); // Update timing and world Engine::UpdateTime(); World::Update( Engine::GetSpeed()) ; // Render gbuffer.Set(); World::Render() ; Engine::GetBackBuffer().Set() ; World::RenderLights(gbuffer); Draw::Text(10,10,"%f %f %f %f",Axis1.GetMatrix().A0,Axis1.GetMatrix().A1,Axis1.GetMatrix().A2,Axis1.GetMatrix().A3); Draw::Text(10,20,"%f %f %f %f",Axis1.GetMatrix().B0,Axis1.GetMatrix().B1,Axis1.GetMatrix().B2,Axis1.GetMatrix().B3); Draw::Text(10,30,"%f %f %f %f",Axis1.GetMatrix().C0,Axis1.GetMatrix().C1,Axis1.GetMatrix().C2,Axis1.GetMatrix().C3); Draw::Text(10,40,"%f %f %f %f",Axis1.GetMatrix().D0,Axis1.GetMatrix().D1,Axis1.GetMatrix().D2,Axis1.GetMatrix().D3); // Send to screen Engine::Flip(0) ; It works for me as expected. [EDIT] Last year I spent a week to solve this issue You can not control biped made with 3ds max with this bug.
  21. But why then my approach works perfectly? Try to comment Turn command and uncomment RotateEntityLocalM(...) in my project(I know that its hard to watch the code that you didnt write) It works!
  22. Just wondering has this problem been fixed or at least confirmed?
  23. Ive been having this problem in LE 2.2 (http://forum.leadwerks.com/viewtopic.php?f=37&t=3044) I guess the problem appears again. But it only appears if parent entity is scaled. As I remember the problem was in GetEntetyQuat function. It returned wrong data if the object has a parent. Here is the project that demonstrates the problem in detail: Keys: WASD - cam control T,Y,U - turn child entity G,H,J - turn parent entity B,N,M - scale parent entity Q - create helper SPACE - reset all rotations Also there is Rotations.cpp file. There is some math functions that Ive made by myself: TurnEntityLocalQ and TurnEntityLocalM - first uses entity's quaternions for rotation calculations, second uses matrices. Only second works as expected. Im sure that problem is in GetQuat function.
  24. Hi all! So, we can load animation sequences and retrieve it's index. But is there any way to remove only indexed animation from the entity? It would be very handy. And by the way, does anybody know how long does it take to load animation? Is there any noticeable delay? And one more thing (I guess only Josh can answer) If I load one animation file several times on one entity, will it be loaded only once and will be index same?
  25. Hi! I want to make controller to move to some point. PointEntity doesn't work with controller. But UpdateController() has angle parameter. So how can I calculate angle parameter? Thanks in advance. Best regards, Alex.
×
×
  • Create New...