Jump to content

Gilmer

Members
  • Posts

    293
  • Joined

  • Last visited

Everything posted by Gilmer

  1. thanks guys, i'll try to use methods that you passed, and thanks for the links.. later i post here the results... thanks
  2. yes, it would be good if leadwerks had this option, many things that i need do, need to own land in detail, like erosion, horizontal distortion .... but what do you suggest for me to do, since it has no use as a voxel? EDIT: humm, thanks josh, i will try this...
  3. Hello all... I wanting to create a mountain with rocks. Like in this image: But wonder, what is the best way to do? I think in make in ZBrush, some highpoly rocks, and create a normal on the model, with a lowpoly. And "fit" in the Leadwerks terrain. Have someway easier? Because if i do so, will be good with a model "fiting" in terrain? I try make with texture, but i dont like..=/
  4. So Aggror, before start the editor, it already has a file of physic. And after when start, and happens all do i speak, it dont overlap any files, it continues using what was...
  5. Hello all, i realized recently a little bug in version 2.32r4, but do i not know if it is a problem with my model or with editor. When i open the editor, and open any map, the models that has physics, not react, as if there not existed physics in as that moment. But when i put ctrl+g, and after esc to exit debug mode, the physcs begin to work. Why happens this? thanks..
  6. Someone tried in r4 that we report above? We migrated everything to R4, and is not working in c++. We checked all, shaders.pak. Until we made another installation, but the problem continues for objects away from center of scene. In editor is worked, only in c++ that nots work. Someone could test this, to see if gave the same problem??! thanks
  7. no, i'm using the same new version. You want me to post, the mesh.frag and the mesh.vert? remembering, we tested with the scene deserthighway.sbx accompanying the engine, and gave the same problem ..
  8. After downloading the version 2.32r4 of the engine, passed the scene of old version editor for this version. But when we initialize the visual studio, not had the skybox. By deleting all models in the scene, begin to show the skybox. And when added a model on the scene, to a certain area, it not appears, only in the editor. inside editor: in same place, but dont editing: But if putting the same model in the center of the scene, appears on both times: This is the code, that we using for tests to scene: #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("/projetos/rally/sdk"); Graphics(800,600); AFilter() ; TFilter() ; TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera cam=GetLayerCamera(layer); PositionEntity(cam,Vec3(0,30,0)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); // Setup Initial Post Processing FX SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetStats(2); //TEntity retorno=LoadScene("abstract::deserthighway.sbx"); TEntity retorno=LoadScene("abstract::pista1.sbx"); // Setup spectator TBody spectator=CreateBodySphere(); SetBodyMass(spectator,1); SetBodyGravityMode(spectator,0); SetBodyDamping(spectator,1.0); EntityType(spectator,3); SetBodyBuoyancyMode(spectator,0); PositionEntity(spectator,Vec3(0,5,-10)); TVec3 camrotation=Vec3(0); float mx=0; float my=0; float move=0; float strafe=0; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); // MAIN LOOP while (!KeyHit(KEY_ESCAPE)) { 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(cam,camrotation); move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_D)-KeyDown(KEY_A); TVec3 force = Vec3(strafe*10.0,0,move*10.0); force=TFormVector(force,cam,0); AddBodyForce(spectator,force); PositionEntity(cam,EntityPosition(spectator)); // Update timing and world UpdateFramework(); // Render RenderFramework(); // Send to screen Flip(0) ; } return Terminate(); } And the file to download (.sbx and 3dmodel): http://www.4shared.com/file/AWLYyG1b/scene_error.html
  9. The installer 2.32r4 does not have the layer.cpp, framewerk.cpp and render.cpp (CPP directory). The link is a full installer?
  10. Josh, You will can fix the bug ::AddTire()( AddVehicleTire() ), you see this error in the topic, the current version continues the same error. http://leadwerks.com/werkspace/index.php?/topic/1020-vehicle-implementation/page__hl__vehicle Best Regards
  11. Hello all.. The two days, we are trying run a test, with some functions of the vehicles, in c++. We had made in lua, but then, we pass all to c++. And when executed, is crashed with the function "AddTire()". Until we find this topic: http://leadwerks.com/werkspace/index.php?/topic/1020-vehicle-implementation/page__st__20__p__9529__hl__vehicle__fromsearch__1entry9529 I downloaded the dll file that Josh has posted, and replace it with the one i am using, that the last version(2.23). And it worked, i tryed too with the code from ZeroByte, that he posted in the topic, and worked too. I wonder when that the Josh want release a new dll, with this bug fixed, and the new is this bug of AddTire(), and he posted in the topic, dont's have. We lost two days of work, and now, we can't continue with the work, with development in c++, until have the engine.dll new and concerted.
  12. someone?? i realy need it... =/
  13. Hello guys, im having a little problem with c++ and lua. I created a cpp file, it will the main file of project. So, i want access a model that was created in a file .lua, in my case, it was a entity of vehicle(car=CreateVehicle()). I want put this "car", but direct from cpp, to through it, i can assign some functions like AddTorque, AddStereing, SetSteerAngle... Is there any command i can use in cpp?! I know in Lua, i can use the "objecttable[...], but and cpp?
  14. Thanks Masterxilo, but where should I put it in code? And for example, as each side of the texture is 256x256, so the texture would have a whole 256*6x256, right? The texture is that i create have to have this size or should i put it as 256x256, so that it will add a side by side?
  15. Hello Arbuz, thanks for feedback, i did something, and really worked. But not yet completed, i noticed the followin: when i create a texture to skybox and cubemap, by the photoshop using the NVidia dds, i need set to "cubemap" instead of "2D Texture". But if a create in the leadwerks, get the buffers to use as texture, it does not work, because it dont is set for "cubemap". Have someway to i create this texture in memory, being that i want use to cubemap, and not to comum texture?! Im using a shader to fit the texture in the model, as cubemap. This is the code witch im using in the script: require("scripts/framewerk") require("scripts/class") require("Scripts/constants/engine_const") require("Scripts/LinkedList") require("Scripts/filesystem") require("Scripts/math/math") local class=CreateClass(...) fw=GetGlobalObject("framewerk") --CONST drawscreen=0 --desenhar na tela? function class:CreateObject(model) local object=self.super:CreateObject(model) chave=0 cameracube = CreateCamera() CameraClearMode(cameracube,1+2) cameracube:SetPosition(model:GetPosition()) cameracube:Hide() rotcam = cameracube:GetRotation() maincamera = fw.main.camera -- buffers mainbuffer = CurrentBuffer() buffercam = CreateBuffer(GraphicsWidth(),GraphicsHeight(),1+2+4) buffertex = CreateBuffer(256*6,256,1+2+4) bufferprint = CreateBuffer(256*6,256,BUFFER_COLOR) colorbuffer2=CreateTexture(256*6,256,2+4) TextureFilter(colorbuffer2,1) entity=FindChild(model,"cube") surf=GetSurface(entity,1) mat=GetSurfaceMaterial(surf) shader=GetMaterialShader(mat) texreflect=LoadTexture("abstract::reflect.dds") texreflect2=LoadTexture("abstract::reflect2.dds") texxadrez=LoadTexture("abstract::reflect_xadrez.dds") texxadrez2=LoadTexture("abstract::reflect_xadrez.dds") function object:Update() model:Hide() maincamera:Hide() cameracube:Show() --Visao1 SetBuffer(buffercam) cameracube:SetRotation(rotcam) world=fw.main.world bgworld=fw.background.world RenderWorld() SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,0,256,256,-256) SetWorld(world) --Visao2 SetBuffer(buffercam) cameracube:Turnf(0,90,0) RenderWorld() SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,256,256,256,-256) SetWorld(world) --Visao3 SetBuffer(buffercam) cameracube:Turnf(0,90,0) RenderWorld() SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,512,256,256,-256) SetWorld(world) --Visao4 SetBuffer(buffercam) cameracube:Turnf(0,90,0) RenderWorld() SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,768,256,256,-256) SetWorld(world) --Visao5 SetBuffer(buffercam) cameracube:Turnf(0,90,0) cameracube:Turnf(90,0,0) RenderWorld() SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,1024,256,256,-256) cameracube:Turnf(-90,0,0) SetWorld(world) --Visao6 SetBuffer(buffercam) cameracube:Turnf(-90,0,0) RenderWorld() SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,1280,256,256,-256) cameracube:Turnf(90,0,0) --CRIA A IMAGEM SetWorld(world) SetBuffer(mainbuffer) cameracube:Hide() maincamera:Show() colorbuffer2 = GetColorBuffer(buffertex) SetMaterialTexture(mat,colorbuffer2,6) if drawscreen==1 then DrawImage(colorbuffer2,0,256,256*6,-256) DrawImage(texreflect,0,512,256*6,-256) end Flip() model:Show() --## SALVA A IMAGEM DO BUFFER PARA TESTES if chave==20 then SetBuffer(bufferprint) DrawImage(GetColorBuffer(buffertex),0,0,256*6,256) SetBuffer(BackBuffer()) SaveBuffer(bufferprint,"testebuffer.tga") chave=30 end if chave<21 then chave=chave+1 end end end and this is the shader: http://www.leadwerks.com/forum/viewtopic.php?p=43333#p43333
  16. Somebody could help me? I am needing really to know as it modifies the texture of a layer of shader, but in execution I have date to finish the project Thanks all
  17. Josh, You would have some example to change the layer of the texture of shader that already this in execution? Regards
  18. I have a model, which will begin to load with this material: texture0="cardif.dds" texture1="cardot.dds" texture6="reflect.dds" cullface=0 shader="abstract::mesh_cube_reflection_bump_difuse_specular.vert","abstract::mesh_cube_reflection_bump_difuse_specular.frag" shadowshader="abstract::mesh_shadow.vert","" But I want the script in this model, in the update it, pass the image of the a texture, which was taken from the buffer(GetColorBuffer()) to the "texture6=...", because this textures will always changing, like a reflect, so i would like to change in the shader too, and show this change. The my question is, what are the commands necessary for this? I tried a lot of commands to set materials, shaders, textures....but so far i not getting results.. Edit: i need use, some like the BindTexture()??
  19. Hello everyone, i have a doubt regarding the loading of the files ".sbx". Loading the scenario of the game, and open the models that are inside them, will automatically load all the scripts for each model? thanks
  20. Thank Joh, for the feedback.. So, this is the code of the model: require("scripts/framewerk") require("scripts/class") require("Scripts/constants/engine_const") require("Scripts/LinkedList") require("Scripts/filesystem") require("Scripts/math/math") local class=CreateClass(...) fw=GetGlobalObject("framewerk") --CONST drawscreen=0 --desenhar na tela? function class:CreateObject(model) local object=self.super:CreateObject(model) chave=0 cameracube = CreateCamera() CameraClearMode(cameracube,1+2) cameracube:SetPosition(model:GetPosition()) cameracube:Hide() rotcam = cameracube:GetRotation() maincamera = fw.main.camera -- buffers mainbuffer = CurrentBuffer() buffercam = CreateBuffer(GraphicsWidth(),GraphicsHeight(),1+2+4) buffertex = CreateBuffer(256*6,256,1+2+4) bufferprint = CreateBuffer(256*6,256,BUFFER_COLOR) --Cria o material material=LoadMaterial("abstract::casa3mat.mat") --Aplica a textura model:Paint(material,1) function object:Update() model:Hide() maincamera:Hide() cameracube:Show() --Visao1 SetBuffer(buffercam) cameracube:SetRotation(rotcam) world=fw.main.world bgworld=fw.background.world RenderWorld() --RenderLights(buffercam) SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,0,256,256,-256) SetWorld(world) --Visao2 SetBuffer(buffercam) cameracube:Turnf(0,90,0) RenderWorld() --RenderLights(buffercam) SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,256,256,256,-256) SetWorld(world) --Visao3 SetBuffer(buffercam) cameracube:Turnf(0,90,0) RenderWorld() --RenderLights(buffercam) SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,512,256,256,-256) SetWorld(world) --Visao4 SetBuffer(buffercam) cameracube:Turnf(0,90,0) RenderWorld() --RenderLights(buffercam) SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,768,256,256,-256) SetWorld(world) --Visao5 SetBuffer(buffercam) cameracube:Turnf(0,90,0) cameracube:Turnf(90,0,0) RenderWorld() --RenderLights(buffercam) SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,1024,256,256,-256) cameracube:Turnf(-90,0,0) SetWorld(world) --Visao6 SetBuffer(buffercam) cameracube:Turnf(-90,0,0) RenderWorld() --RenderLights(buffercam) SetWorld(bgworld) RenderWorld() colorbuffer = GetColorBuffer(buffercam) SetBuffer(buffertex) DrawImage(colorbuffer,1280,256,256,-256) cameracube:Turnf(90,0,0) --CRIA A IMAGEM SetWorld(world) SetBuffer(mainbuffer) cameracube:Hide() maincamera:Show() colorbuffer2 = GetColorBuffer(buffertex) if drawscreen==1 then DrawImage(colorbuffer2,0,256,256*6,-256) end Flip() model:Show() end end And about the command SetMaterialShader, i think it would not be just this. I want to pass the buffer arnazenado in "colorbuffer2" for "texture6" of the material, which this case in the shader. Would the reflect. I believe putting this in the Update of the code, makes dynamic reflection. But this is the problem, I'm not able to pass the image, stored of the buffer to the material parameter..
  21. Hello all.. I have a shader ready to use, and i add in a model. How i can change the texture of this shader, by programming? For example, in the file .mat, which has "texture0='tex.dds'", i want pass this parameter for programming. Whats function for this?? But the texture, in really, is a buffer. I get the screen with the GetColorBuffer(), and wanna pass this, to parameter of the shader. Like a reflect, which a camera render the world, and passes the image to texture, which in this case, would the shader.. And other issue... I have two cameras, one is the main camera from framewerk, and other, is the a camera, which myself create, in a file .lua, of the a model. In this file, i change sometimes the visios between they. But, all time which i change the camera, and render, it render only models, and terrain, and the skybox renderized, is the same skybox, renderized froum framewerk camera. I want to know, how i can renderized, the background from second camera? Without merge, the image(models and terrain) of the first camera, with the skybox of the second camera... A image, for explain bettter my issue: Thanks all
  22. Thanks Joh and Josh. I managed to solve the problem.... thanks
  23. thanks omid3098, i has using the old updater...
×
×
  • Create New...