-
Posts
247 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Charrua
-
Hi i launched leadwerks from steam, then create a new "tutorial samples" project called pj01 then from code blocks i open the pj01.cbp project, and when i try to build the project the line #1180 of glew.h: "include <GL/glu.h>" throws the error.... fatal error: GL\glu.h : no such file or directory is it something i miss or related to the new release? do i have to install something else other than the default instalation does? please note that this is my first try of leadwerks and code blocks on ubuntu, so have some patience with me thank's in advance Juan
-
big thank's
-
really good news, waiting for the official release
-
another chart in which my country do not appear! lol
-
ahh, starting over, again and again is a bad, repeated sensation that, i guess all here know wish you luck
-
nice to know, thank's
-
thank's i'll update this post with my success or fail (hope not!)
-
Hi I'm about to try ubuntu and leadwerks on it I'll use a new computer probably an I5 or I7 and need some advice about: * which ubuntu version is currently suported by leadwerks * a nice graphic card, nvidia perhaps? that you may know is working ok with ubuntu+leadwerks nothing high end about graphics, i mean, not a 1000 dolars one which requires a expensive power supply and all the etceteras a high end pc should need. and any other tips you may haver for me to start i had a laptop and installed on it an ubuntu 14 and reach leadwerks work on it last year, but things of destiny i have to re install factory defaults on it.. now i like to have a linux machine on its own so i have some experience... but little.. very little thank's in advance Juan
-
You can look here: http://leadwerks.wikidot.com
-
how do i get a list of entities "in contact" with another?
Charrua replied to Charrua's topic in Programming
i'm basically doing it, but didn't figure out how to "wake up" entities over the belt when at rest. this is my current belt's collision code: function Script:Collision(entity, position, normal, speed) --self.stateValue may be -1:backward, 0: stopped, 1:forward --self.speed is a factor to adjust belt speed if self.stateValue~=0 then rot=self.entity:GetRotation(true) --belt orientation vel=Vec3(0,0,0) vel.x = Math:Sin(rot.y)*self.stateValue*self.speed --get x,y components of orientation vel.z = Math:Cos(rot.y)*self.stateValue*self.speed entity:SetVelocity(vel) --applya velocity to entities that collide with the belt end end guess now has some other ideas, apply a 0,0,0 force to wake up never cross my mind and the invisible trrigger thing.. have to give it a try also.. as always it's a matter of find a nice solution doing some tricks in between to get good results with few resources.. thanks again Juan -
how do i get a list of entities "in contact" with another?
Charrua replied to Charrua's topic in Programming
i'm at work now, i'll give it a try later, thanks i was thinking belt side, you are thinking box side.. -
how do i get a list of entities "in contact" with another?
Charrua replied to Charrua's topic in Programming
thxs i'm implementing a "conveyer belt" (kind of) and it hast 3 states: forward, backward and stop while in forward or backward any entity colliding with it is moved and as it is moved it remains colliding and so the belt woks as spected. If i stop motion, then.. entities stop colliding the belt and then, when i need to restart movement, i need to know which entities remains over it. Some entities may finish colliding because they reach the end or slide outside the belt (for any reason) so having a historic of entities collided (recently) is not a bad idea but isn't sure that this list is will be correct all the time. One of my ideas was use an aabb and is still the one i guess will use but before i needed to ask .. just in case here what i'm doing currently: (the other cars will have other uses, forklift and the like) having some spare time so i decided to enjoy a little. https://dl.dropboxusercontent.com/u/78894295/leadwerks/conveyor%20belt%202.mp4 https://dl.dropboxusercontent.com/u/78894295/leadwerks/conveyor%20belt.mp4 @gamecreator, i was posting as you did your, the list is not a bad idea, but there will be no garanties, i mean, a box should be pushed away or lifted from one belt to other place and will, perhaps, remains in a list... Juan -
is there a function to get a list of entities that are above another, in contact, physically speaking. When an entity collides another a collision is detected an i can test for collision but after a while stop bouncing and collision stops also. What i need is to know which entities remains in contact. I can do a aabb test or keep track of entities that has been collided.. but all has its pros and cons, is there a physics way of testing entities actually in contact? thanks Juan
-
if you are working with lua, there is an already made function and you can use it in any lua script of your own just include it, declare a table variable to store the list of entities that "GetEntityNeighbors" function returns --add this line to include the function import "Scripts/Functions/GetEntityNeighbors.lua" --delcare a table to store neighbors Script.EntitiesInAABB = {} then in the update world yo may function Script:UpdateWorld() EntitiesInAABB = GetEntityNeighbors(self.entity,4,true) -- 4 means look 4 Leadwerks unit ahead, back left, right --self.entty is at the center of a box of you desired measure -- the second parameter "true" in my example dictates that only entities with a script attached to them will be included (it's your choice) --then you may do something like for key,EntInAABB in pairs(EntitiesInAABB) do if type(EntInAABB.script.Open)=="function" then EntInAABB.script:Open() --if an antity inside the box has a function called "Open" then i invoke it, just as example end end .... .... rest of your updateworld end it should be unnecessary to check the surrounding area each frame, you may check it once in a second for example, here a more elaborated example, that includes a variable RadarRange that you may set in the editor and checks for neighbors once a second: import "Scripts/Functions/GetEntityNeighbors.lua" Script.EntitiesInAABB = {} Script.RadarRange = 5 --float "Radar Range" Script.AcumTime = 0 function Script:UpdateWorld() self.AcumTime = self.AcumTime + Time:GetSpeed() if self.AcumTime>100 then self.AcumTime=0 --look for neighbors once a second instead of every frame EntitiesInAABB = GetEntityNeighbors(self.entity,self.RadarRange,true) for key,EntInAABB in pairs(EntitiesInAABB) do if type(EntInAABB.script.Open)=="function" then EntInAABB.script:Open() end end end ... ... rest of your update world ... end Juan
-
Now I activated the color camera and getting the color information, copying it to a texture and drawing on the screen (up left) so there I'm! Using multiple buffers and a shader to draw clipped parts of them on the screen, increased fps from 15 to 30 even with getting color kinect camera and copying it (by hand: pixel by pixel) to a leadwerks texture . video: Also I'm tracking Head, Shoulders, center of shoulders and center of body. A circle is drawn (more or less in the correct place) on each of the tracked joints if kinect report it as detected. The program moves the "player" camera which is at the central "window" of the screen and the intention is to show in a window what a player actually has to see if he were watching the 3d world through that window. Movement is followed correctly except at the last part of the video in which i place my hands in front of my face... so gets hard for the kinect to track me. As you can see, circles appear and disappear and when this happens, the camera control isn't correct. Juan
-
thank's aside of another problems i have... now is working if and only if the boxes that has the textures are not hidden if i hide a box, then it's texture isn't updated based on the "intended behavior" (not so logical to me) sounds ok, because if the system do not update a texture of an object outside the view of the camera, then it will not render a texture of a hidden box. the documentation refers that the texture "can" be used in a material and applied to an object, or draw on screen" i understand from that that "can" is not "must" (but my English is terrible). any way, our language (english spanish etc) isn't so exact as computer languages so my problem is not with documentation, knowing what is possible to do and what isn't is what i need. i was working with buffers, doing a world::render for each one and then getting the texture from the buffer, doing some handling on the texture (cropping it mostly) and then drawing each processed texture. Started doing cropping by hand (memcpy) and reaching a 14 fps on my laptop then as pointed by macklebee (thank's man) i starting to try a shader to do so http://www.leadwerks.com/werkspace/topic/12537-drawing-a-section-of-a-2d-texture-setting-uv-coords/#entry90453 after some mistakes of mine (use to have lots) i make it work and fps rise up to 28 so, i starting to ask, what about render to a texture instead of render to a buffer... well if i render to textures i'm having 12 fps (worse than using by hand texture copy, crop: handling) and i have to have in front of the camera boxes with those textures on it (not supposed to be) probably i'm still doing something wrong, but for now i'll keep with buffers + shader thank's for your help Juan
-
I was trying to render to a texture without success. Texture shows always the same no matter the camera position/rotation... I roll back to the RenderToTexture Lua example, wrote it for cpp and works ok, then i realize that: 1) If the texture is not applied to a material then the rendered texture is what the camera sees when at it's starting position/rotation : 0,0,0 / 0,0,0 2) if the texture is applied to a material, and this material is applied to an object, the rendered texture is ok if the object is visible by the camera, if not, then the rendered texture is again what the camera sees on the default position. The documentation says: " The texture can be used in a material and applied to an object, or drawn onscreen. " but if not applied to a material, it does not render, and if applied to a material then it mus be applied to an object visible by the camera. following is a cpp to test, with the commented lines (with //) the example do not work if applied to the box works ok until you uncomment the line that moves it outside the view range of the camera. perhaps this is the intended behavior and i am missing something obvious. What I need is to render to a texture with the intention of draw it with context->DrawImage. I do no plan to place a visible object with the texture in front of the camera. is it possible to render to a texture without applying it to an object with a materila with it? thank's in advance Juan #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Model* model = NULL; Camera* camera2; Pivot* pivot; Material* mtl; Texture* tex; bool App::Start() { window = Window::Create("render to textue",0,0,1024,768); context = Context::Create(window); world = World::Create(); camera = Camera::Create(); camera->Move(0, 0, -3); Map::Load("Maps/start.map"); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); camera2 = Camera::Create(); camera2->Move(0, 0, -4); camera2->SetClearColor(1, 0, 0); pivot = Pivot::Create(); camera2->SetParent(pivot); pivot->SetPosition(-2, 2, 1); tex = Texture::Create(256, 512); mtl = Material::Create(); mtl->SetShader("Shaders/Model/Diffuse.shader"); mtl->SetTexture(tex); camera2->SetRenderTarget(tex); model = Model::Box(); //model->SetPosition(0, -4, 0); //if not visible: render texture gets freezed //model->SetMaterial(mtl); //if material is not applied to a visible object render texture gets freezed model = Model::Cylinder(); model->SetColor(0.0, 1.0, 0.0); model->SetPosition(0, 0, 0); model = Model::Cone(); model->SetColor(0.0, 0.0, 1.0); model->SetPosition(2, 0, 0); return true; } bool App::Loop() { if (window->Closed() || window->KeyDown(Key::Escape)) return false; pivot->Turn(0, Time::GetSpeed(), 0); Time::Update(); world->Update(); world->Render(); context->DrawImage(tex, 10, 10); context->Sync(); return true; }
-
Hi, i'm working on a shooting simulator. Here are some screenshots. The graphics part of it isn't of too much interest at this stage I'm more concerned about the hardware interface with the guns. Gun range: 6 feet under (more or less) Out side Testing the app with the mouse (not the intended input, but for ease) https://drive.google.com/open?id=0B8-7vR0QcsPkaDBXRk5qUzc1Tkk https://drive.google.com/open?id=0B8-7vR0QcsPkbG5hWFFPZHV6b3c https://drive.google.com/open?id=0B8-7vR0QcsPkZlJxU0M1emhxeUE Testing it with the real input hardware. https://drive.google.com/open?id=0B8-7vR0QcsPkMlJLVENIRWRCZ0k https://drive.google.com/open?id=0B8-7vR0QcsPkbmZGeGFPUHE1OW8 https://drive.google.com/open?id=0B8-7vR0QcsPkNXJ1QVNiNHl1c3M https://drive.google.com/open?id=0B8-7vR0QcsPkMDRLaThmZDcwbDQ https://drive.google.com/open?id=0B8-7vR0QcsPkcV8wbV94WkhpRDg https://drive.google.com/open?id=0B8-7vR0QcsPkUlNVbTl1Y3dqYVU Juan
-
nice has you found a way of getting constant speed over the spline? are you using some criteria for placing control points based on endpoints? i mean, you only set the endpoints and then pre-calculate based on them the control points, then manually adjust the ones that need adjustment...hope you understand my question.
-
thank's i'm using the 360 SDK v1.8 the video was made with aproject that only loads a map and connects to the kinect, the other hawdware/software was not present. the complete systems includes guns with a sensor on the trigger and a IR laser beam, and an IR camera to know where the gun's are heading... gun: https://photos.google.com/photo/AF1QipOqR9tke1JGI1CstXfA8BTUuf10rsGBG0BC0Tg stuff https://photos.google.com/photo/AF1QipMEaQRfJe9fK8v7AlRiUxERY5iUYLOiS2fVNec test (no kinect still, no scene at all either!) https://photos.google.com/photo/AF1QipPydG6AouTsLWBA1gi2UcZio6ym1MF2tl364wU
-
Hi, i'm doing some test with a kinect, the idea is to follow player's position (head tracking) and project on a screen (not laptop or pc screen/monitor) 5 meters away from the player a "window" through which we see the 3D world. Each player has it's own line of sight and a "window" to look throug. First test are nice (ok, are not the first tests.. this is the first that look promising!) Juan
-
quite interesting! thank's i'll give it a try.. for a while
-
is there a simple way of copying a sub part of an image/texture to other image/texture. i mean, instead of getting the pixel data and copying pixel by pixel with a couple of nested for/next loops? has leadwers a copyrect o drawrect command? Juan
-
totally agree, i'm just fan of crtl left/right, auto indentation and many other helper thing's we usually has on editors (i came from the Ctrl+K+AnotherNiceKey era!, when a mouse simply were a strange thing)