Jump to content

Gilmer

Members
  • Posts

    293
  • Joined

  • Last visited

Everything posted by Gilmer

  1. Why I use the SetWorldCullRange(), my program is crash? I update all files, and continue with StackOverflow.. Im still with the problem with "auto hide models", and i think that this function, will solve my problem, but donk cant use. Are something worng im my code? // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #include "engine.h" int main( int argn, char* argv[] ) { //Resolution int width=800,height=600; Initialize() ; RegisterAbstractPath("D:/Projetos/Rally"); SetAppTitle( "Rally" ) ; Graphics( width, height ) ; AFilter() ; TFilter() ; // Cria FrameWork TFramework framework=CreateFramework(); // Pega Layer da Camera main TLayer layer = GetFrameworkLayer(0); // Pega Camera principal(main) TCamera camera=GetLayerCamera(layer); // CONFIGURA O CENARIO ################## //Camera PositionEntity(camera,Vec3(-818,19,832)); SetWorldCullRange(50,125,500); TVec3 camrotation=Vec3(0); float mx=0,my=0; float move=0,strafe=0.0; // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { //FREE LOOK mx = Curve(MouseX()-GraphicsWidth()/2, mx,6); my = Curve(MouseY()-GraphicsHeight()/2, my,6); MoveMouse(GraphicsWidth()/2, GraphicsHeight()/2); camrotation.X = camrotation.X+my/10.0; camrotation.Y = camrotation.Y-mx/10.0; RotateEntity(camera, camrotation); //MOVE CAMERA move = Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,10); strafe = Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,10); MoveEntity(camera,Vec3(strafe,0,move)); // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; // Render UpdateFramework(); RenderFramework(); // Send to screen Flip(0) ; } } // Done return Terminate() ; } thanks
  2. Thanks guys for the helps.. So, i saw script by script, and none has this function. I tried change in itself editor the view range, but the problem continue. Uptdated all files, and try ever again, but same problem. The strange is that ever models hidden when I'm in a certain position, until the models that on my side.
  3. Just to you could see the difference: The map in editor: And the same map, with the same camera angle, in c++:
  4. No Aggror, i see script by script, and none is be setting this. I found this function in Wiki: SetWorldCullRange(), but ever time that i execute, resulted in "C Stack Overflow". I deleted the "atmosphere" entity from editor, to set this function in own code. My code is this now: // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #include "engine.h" void Fxs(); int main( int argn, char* argv[] ) { //Resolution int width=800,height=600; Initialize() ; RegisterAbstractPath("D:/Projetos/Rally"); SetAppTitle( "Rally" ) ; Graphics( width, height ) ; AFilter() ; TFilter() ; // Cria FrameWork TFramework framework=CreateFramework(); // Pega Layer da Camera main TLayer layer = GetFrameworkLayer(0); // Pega Camera principal(main) TCamera camera=GetLayerCamera(layer); //Load Scene - Pista1 TEntity scene = LoadScene("abstract::pista1.sbx"); // CONFIGURA O CENARIO ################## //Camera PositionEntity(camera,Vec3(-818,19,832)); CameraRange(camera,0.1,1000); //EntityViewRange(scene,3,1); SetWorldCullRange(50,125,500); //SkyBox SetSkybox(LoadMaterial("abstract::FullskiesBlueClear0016_2_L.mat")); SetBackgroundColor(Vec4(1,1,1,1)); //Lights // Direcional TLight light=CreateDirectionalLight(); RotateEntity(light,Vec3(39,159,54)); //Luz ambiente //AmbientLight(Vec3(0.5,0.43,0.34)); //EntityColor(light,Vec4(0,0,0,1.5)); Fxs(); // ###################################### TVec3 camrotation=Vec3(0); float mx=0,my=0; float move=0,strafe=0.0; // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { //FREE LOOK mx = Curve(MouseX()-GraphicsWidth()/2, mx,6); my = Curve(MouseY()-GraphicsHeight()/2, my,6); MoveMouse(GraphicsWidth()/2, GraphicsHeight()/2); camrotation.X = camrotation.X+my/10.0; camrotation.Y = camrotation.Y-mx/10.0; RotateEntity(camera, camrotation); //MOVE CAMERA move = Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,10); strafe = Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,10); MoveEntity(camera,Vec3(strafe,0,move)); // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; // Render UpdateFramework(); RenderFramework(); // Send to screen Flip(0) ; } } // Done return Terminate() ; } void Fxs(){ //GodRays SetGodRays(1); //HDR SetHDR(1); //Bloom SetBloom(1); //SSAO //SetSSAO(1); //AnitAliasing SetAntialias(1); //Vegetation Shadow SetVegetationShadowMode(1); }
  5. hmm..i understand.. i will test this about the road scripr, because is making the lot diference in the FPS. Now, about the camera, i test this command, it compile, but continue to dont work, the models hide in a certain distance from camera to some model, that i dont know what is. Thanks lumooja
  6. Another strange thing, that happens, is the FPS that drops, when i add some "road_node" in the map. For sample, in the map, have a lot "road_node", this influence on something? Because, look this: With the road: http://i52.tinypic.com/10rsvfq.jpg Without the road: http://i54.tinypic.com/18hov9.jpg very strange this..
  7. i cant, show this error: error C3861: 'SetEntityViewRange': identifier not found I do: TEntity scene = LoadScene("abstract::pista1.sbx"); SetEntityViewRange(scene,3,1);
  8. Hello, im trying load the scene in c++, but im having the following problem. The models auto disappear. If i pass with the camera in a certain limit, all models, that are not vegetation, disappear. I was directly changing the file .sbx, and realized that when have few models, the problem is less, but if have lot models, the problem is greater. My code is this: // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #include "engine.h" void Fxs(); int main( int argn, char* argv[] ) { //Resolution int width=1680,height=1050; Initialize() ; RegisterAbstractPath("D:/Projetos/Rally"); SetAppTitle( "Rally" ) ; Graphics( width, height,32 ) ; AFilter() ; TFilter() ; // Cria FrameWork TFramework framework=CreateFramework(); // Pega Layer da Camera main TLayer layer = GetFrameworkLayer(0); // Pega Camera principal(main) TCamera camera=GetLayerCamera(layer); //Load Scene - Pista1 LoadScene("abstract::pista1.sbx"); // CONFIGURA O CENARIO ################## //Camera PositionEntity(camera,Vec3(-818,19,832)); //CameraRange(camera,0.1,1000); //SkyBox SetSkybox(LoadMaterial("abstract::FullskiesBlueClear0016_2_L.mat")); SetBackgroundColor(Vec4(1,1,1,1)); //Lights // Direcional TLight light=CreateDirectionalLight(); RotateEntity(light,Vec3(39,159,54)); //Luz ambiente //AmbientLight(Vec3(0.5,0.43,0.34)); //EntityColor(light,Vec4(0,0,0,1.5)); Fxs(); // ###################################### TVec3 camrotation=Vec3(0); float mx=0,my=0; float move=0,strafe=0.0; // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { //FREE LOOK mx = Curve(MouseX()-GraphicsWidth()/2, mx,6); my = Curve(MouseY()-GraphicsHeight()/2, my,6); MoveMouse(GraphicsWidth()/2, GraphicsHeight()/2); camrotation.X = camrotation.X+my/10.0; camrotation.Y = camrotation.Y-mx/10.0; RotateEntity(camera, camrotation); //MOVE CAMERA move = Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,10); strafe = Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,10); MoveEntity(camera,Vec3(strafe,0,move)); // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; // Render UpdateFramework(); RenderFramework(); // Send to screen Flip(0) ; } } // Done return Terminate() ; } void Fxs(){ //GodRays SetGodRays(1); //HDR SetHDR(1); //Bloom SetBloom(1); //SSAO //SetSSAO(1); //AnitAliasing SetAntialias(1); //Vegetation Shadow SetVegetationShadowMode(1); } Anyone had the same problem? i dont know what do.
  9. Thanks for the answer Aggror. I did not copy the old script. I deleted and did update to see if occurs with the new script, and the result is the same. The script of viperscout.lua is this, i dont know because not's working.. require("scripts/class") require("scripts/loop") require("scripts/math/math") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:UpdateMatrix() self:UpdateTires() end function object:UpdateTires() local speed for n=0,3 do if self.tire[n]~=nil then self.tire[n]:SetMatrix( self.vehicle:GetTireMatrix(n) ) if self.emitter[n]~=nil then self.emitter[n]:SetMatrix(self.vehicle:GetTireMatrix(n)) self.emitter[n]:Pause() if self.vehicle:TireIsAirborne(n)==0 then speed = math.abs(self.model:GetVelocity(0).z) speed = (speed - 4) / 20.0 speed = Clamp( speed, 0, 1 ) * 0.1 if speed>0 then self.emitter[n]:Resume() self.emitter[n]:SetColorf(1,1,1,speed) end end end end end end local pivot local suspensionlength=0.2 local springconstant=20.0 local springdamper=150.0 object.vehicle=CreateVehicle(object.model) object.tire={} object.emitter={} object.turret=object.model:FindChild("turret") pivot=object.model:FindChild("tire1") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[0]=LoadMesh("abstract::vehicle_viperscout_tire_left.gmf",model) pivot:Hide() end pivot=object.model:FindChild("tire2") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[1]=LoadMesh("abstract::vehicle_viperscout_tire_right.gmf",model) pivot:Hide() end pivot=object.model:FindChild("tire3") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[2]=LoadMesh("abstract::vehicle_viperscout_tire_left.gmf",model) pivot:Hide() end pivot=object.model:FindChild("tire4") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[3]=LoadMesh("abstract::vehicle_viperscout_tire_right.gmf",model) pivot:Hide() end object.emitter={} object:UpdateTires() if world_transparency~=nil then if world_main~=nil then SetWorld(world_transparency) for n=0,3 do if object.tire[n]~=nil then object.emitter[n]=CreateEmitter(50,4000,Vec3(0,1,0),0,object.tire[n]) object.emitter[n]:SetPosition(Vec3(0,-object.tire[n].aabb.h/2.0,0)) object.emitter[n]:SetParent(model,1) object.emitter[n]:SetRadius(1,8) object.emitter[n]:SetWaver(1.0) object.emitter[n]:Paint(LoadMaterial("abstract::roaddust.mat")) object.emitter[n]:SetRotationSpeed(0.1) object.emitter[n]:Pause() end end SetWorld(world_main) end end object.model.buoyant=0 object.model:SetKey("collisiontype",COLLISION_PROP) object.model:SetKey("mass",1.0) object:UpdateTires() end
  10. nobody? I'm really needing this..
  11. So Richard, thanks for the help. The line that i commented, are in line 92 in the "vehicle_viperscout.lua". And the materials, are in "Materials\Effects\Particles".. This is strange, because in previous versions, are working normally...
  12. Im having a problem with emitters in the version 2.4. Someone can see, and help me? I created the topic, but nobody answer.. http://leadwerks.com/werkspace/index.php?/topic/2726-emmiters-in-vehicle/
  13. i agree with you Pixel..who are working with version 2, will need stop the work in the project half, just to wait the release of version 3? And a little observation, we are talking about little fix, like save objects scalled and undo button, i think a little wrong wait a year, just to fix this.. this is just my opnion..
  14. I doubt too. I know that he will not release a new version, only with this fix...but i ask because passe six months after the last post, and still dont have this option in editor, and is a features that everthing Editor need have..
  15. And then Josh, six months later, has any news of "our undo"??
  16. someone could be try, to see if occurs the same problem, please...
  17. Why after update to 2.4 version, dont's emitting particles in vehicle? For sample, in 'vehicle_viperscout.lua', if i put: object.emitter[n]:Paint(LoadMaterial("abstract::roaddust.mat")) It dont show the particles, in previous versions showed: http://i55.tinypic.com/2wci3vs.jpg Now, if i change to: object.emitter[n]:Paint(LoadMaterial("abstract::dust.mat")) It show, but dont get the terrain color. http://i53.tinypic.com/34eevzo.jpg The materiais is: roaddust.mat: texture0="abstract::smoke.dds" depthmask=0 blend=alpha zsort=1 shader="abstract::particles.vert","abstract::particles.frag" dust.mat: texture0="abstract::smoke.dds" depthmask=0 blend=alpha zsort=1 shader="abstract::particles.vert","abstract::particles_roaddust.frag"
  18. Arbuz, i solved the problem... I was using the mirror to copy bones vertex, that is what was the problem. Thanks for helping... i add u in icq to pass the model, but i think that now, dont need more.. thanks..
  19. Yes, is strange this. I never had a problem with that. I checked this option, but still have the problem. I would be very grateful if you can check the model. You have MSN or email to send the model? Thanks Arbuz...
  20. thanks omid3098..i tryed this, but still dont worked..
  21. Hello, im with the following problem with the exporter. I created a model in 3ds max, and i has used bones, dummys and IK Chains. And in the model, i has used skin modifier. But, when i export, i can see in model viewer, that two legs from my model, is rotated to up. With this, distort the model legs. This image is the model in 3ds max: http://i36.tinypic.com/4g4utd.jpg And this, is the model em model viewer: http://i37.tinypic.com/2zh46bn.jpg
  22. Thank Aggror Was thinking of using as a waypoint, it will not work as I need.
  23. Hello, im working with links in editor, and im with the follow doubt. When i link the nodes, like the image1, it accept, but if i link the node2 with node6, it broke the link between the node2 and node3. The node2, i can't link with the nodes 1,3,5 and 6 at same time. Into the editor, have anyway to make this? I can change the link system to EDITOR and not in the script?
×
×
  • Create New...