Search Results

Search found 3139 results on 126 pages for 'edge detection'.

Page 11/126 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How can I solve this SAT edge case?

    - by ssb
    I have an SAT implementation that basically works, and the fact that it works is what's giving me a few headaches. Basically there are some situations where using the SAT doesn't quite give me my intended result. One of these involves movement across multiple collision objects. Or to put it another way, if I have several collision boxes lined up next to each other such as to create something like a wall or a floor, movement along that surface while constantly applying force into that surface sometimes causes hangups, i.e. the player stops moving. This illustration shows what I mean: The 2 boxes on the bottom represent a floor, and the box on top/in the middle represents what my player is doing. There are several squares lined up as world obstacles to create some kind of wall, and if I move to the left across this surface while holding the down key then the issue arises. It only happens at the exact dividing point between two blocks. It only happens when moving to the left. At any rate I think I know why it happens, but I don't know how to solve it. Basically when I update my player movement I consider which directions are pressed, naturally, so if down is pressed I will add the speed to the Y component, and so on. But due to the way my SAT is implemented, when the penetration into the shape is the same from both sides it just goes with the smallest axis that it finds first, and it checks collisions against objects in the order that they were created because it goes through a foreach loop on the list of collidable objects. So this all adds up to the effect of if I'm moving to the left over a series of boxes while holding down, it will resolve me back to the right out of the first box and then up out of the box to the right of it, and this continues as long as the penetration is the same. The odd part is that this doesn't happen every time, which I am going to attribute to some oddity regarding multiplying velocity by the game time and causing some minor discrepancies between the lengths. Ultimately what this boils down to is that it will keep resolving me to the right and up, but this is technically expected behavior. All the solutions I can think of only address the symptoms of this problem and not the actual cause, such as not using many blocks to create walls or shapes, which is an option I'd like to keep open. I could also change which axis my algorithm defaults to, but that would just cause problems when going up/down along the walls. What can I do to fix this?

    Read the article

  • How to disable "N" Wireless Mode RTL8192 (Thinkpad Edge 15 Core i5) in natty

    - by Gustavo Rubio
    I've seen many owners of thinkpad edges which are supossed to be linux-friendly having problems with wireless adapter. I've found several links inside askubuntu and in ubuntuforums which have a lot of work-arounds for those problems, mine seems to be wierd though. I use my laptop on both my office and at home. At home I have a router which is A/B/G and here at home the wireless connection works just fine, using a WEP key. But in work I have a B/G/N wireless router and it doesn't work, my guess is that this adapter works with N modes but somehow this is buggy in the bundled driver in natty. I've tried to disable the "N" mode in the router but that didn't work. Later I went to realtek website, downloaded their driver and compiled myself, kinda seems to work most of the time but sometimes some websites keep trying to load or load just parts of it and images start to look like their links are broken and so on, much like what you get when you were loading a page and suddenly the connection is lost. This problem, as I said, is only using the realtek driver from their website. Dmesg gives me this a lot of these: [ 5869.049454] rtl8192se_update_ratr_table: ratr_index=0 ratr_table=0x00000ff5 [ 5879.240563] DHCP pkt src port:68, dest port:67!! So I thougth I might as well switch back to the original driver which seems to work just fine on A/B/G wireless networks but not on N networks so if anybody knows how to disable that mode from within the driver please let us know :) Thanks in advance! PS: I do found a link to a similar question and it was answered but let me remind you I'm NOT using the intel version of wireless for my thinkpad but the realtek (RTL8192SvB)

    Read the article

  • Lenovo ThinkPad Edge E430 Battery Problem

    - by LEo
    On Ubuntu's Web Page, in the Certified hardware section, it is listed Lenovo. http://www.ubuntu.com/certification/ So I decided to buy a ThinkPad from Lenovo. Just one month after I bought the notebook, the battery got a problem and it does not charge anymore. Now Lenovo won't give me any support because I am using Ubuntu. Lenovo says they will give support only for Windows users because their tools runs on Windows. They refused to change my battery before running the Windows based test. What should I do?

    Read the article

  • How to enable hard-blocked bluetooth in Thinkpad Edge 320

    - by Non
    I'm trying to use the built-in bluetooth device of my Lenovo Thinkpad E320. It seems to be hard blocked, but i can't find any possibility to unblock it. rfkill list returns: 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked:yes cat /proc/acpi/ibm/bluetooth returns: status: disabled commands: enable, disable I tried to enable it by: Pressing Fn+F9 (Radio controll) echo enable | tee /proc/acpi/ibm/bluetooth rfkill unblock bluetooth Trough the BIOS. But it's not mentioned at all None of the actions influenced the ouputs above.

    Read the article

  • Suggestions for Future or On-The-Edge Languages (2011)

    - by Kurtis
    I'm just looking for some suggestions on newer languages and language implementations that are useful for string manipulation. It's now 2011 and a lot has changed over the years. Most of my work includes web development (which is mostly text-based) and command line scripting. I'm pretty language agnostic, although I've felt violated using PHP over the years. My only requirements are that the language be good at text manipulation, without a lot of 3rd party libraries (core libraries are okay, though), and that the language and/or standard implementation is very up to date or even "futuristic". For example, the two main languages I'm looking at right now are Python (Version 3.x) or Perl (Version 6.x). Research, Academic, and Experimental languages are okay with me. I don't mind functional languages although I'd like to have the option of programming in a procedural or even object oriented manner. Thanks!

    Read the article

  • Is there a simple way to stop enemies standing in the same spot?

    - by Iain
    So: top-down game, my enemies chase the player, when they get within a certain distance they stand still and fire. If they're all coming from the same direction they all end up standing in the same spot (i.e. standing "within" each other), as I'm not currently doing collision detection between enemies - they are free to pass over each other. What's a simple way around this? Either some form of collision detection or some ai?

    Read the article

  • OpenGL render to texture causing edge artifacts

    - by mysticalOso
    This is my first post here so any help would be massively appreciated :) I'm using C++ with SDL and OpenGL 3.3 When rendering directly to screen I get the following result And when I render to texture I this happens Anti-aliasing is turned off for both. I'm guessing this has something to do with depth buffer accuracy but I've tried a lot of different methods to improve the result but, no success :( I'm currently using the following code to set up my FBO: GLuint frameBufferID; glGenFramebuffers(1, &frameBufferID); glBindFramebuffer(GL_FRAMEBUFFER, frameBufferID); glGenTextures(1, &coloursTextureID); glBindTexture(GL_TEXTURE_2D, coloursTextureID); glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,SCREEN_WIDTH,SCREEN_HEIGHT,0,GL_RGB,GL_UNSIGNED_BYTE,NULL); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); //Depth buffer setup GLuint depthrenderbuffer; glGenRenderbuffers(1, &depthrenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, depthrenderbuffer); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, SCREEN_WIDTH,SCREEN_HEIGHT); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthrenderbuffer); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, coloursTextureID, 0); GLenum DrawBuffers[1] = {GL_COLOR_ATTACHMENT0}; glDrawBuffers(1, DrawBuffers); // if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) return false; Thank you so much for any help :)

    Read the article

  • How to work with edge Texture

    - by XzenTorXz
    Im not sure if i use the right terms, but im not able to find something to start with. Im trying to develop a little HTML5 game. I have a ground with a texture and now I want to make a surrounding texture. The texture is an image wich should be bend around the ground. At the moment im using easelJS for display my images/textures. So im looking for some sort of Tutorial/Script/Advice. Im not even sure if I can bend a image in javascript. So the worst case I can think of is split the image in 100 pieces and then put it back together and rotate each piece. for example like this:

    Read the article

  • How to dock a window to an inside edge of a dual-monitor setup

    - by Kevin M
    I have a dual monitor setup at work. I am running Windows 7 Ultimate, and I would like to take advantage of the docking feature, whereby you can drag a window to the side of the monitor and have it expand and fill to half the screen. Trouble is, I would like to drag it to the inside edge(adjoining the other screen) and it does not activate. How would I go about activating this for the inside edge?

    Read the article

  • Optimizing collision engine bottleneck

    - by Vittorio Romeo
    Foreword: I'm aware that optimizing this bottleneck is not a necessity - the engine is already very fast. I, however, for fun and educational purposes, would love to find a way to make the engine even faster. I'm creating a general-purpose C++ 2D collision detection/response engine, with an emphasis on flexibility and speed. Here's a very basic diagram of its architecture: Basically, the main class is World, which owns (manages memory) of a ResolverBase*, a SpatialBase* and a vector<Body*>. SpatialBase is a pure virtual class which deals with broad-phase collision detection. ResolverBase is a pure virtual class which deals with collision resolution. The bodies communicate to the World::SpatialBase* with SpatialInfo objects, owned by the bodies themselves. There currenly is one spatial class: Grid : SpatialBase, which is a basic fixed 2D grid. It has it's own info class, GridInfo : SpatialInfo. Here's how its architecture looks: The Grid class owns a 2D array of Cell*. The Cell class contains two collection of (not owned) Body*: a vector<Body*> which contains all the bodies that are in the cell, and a map<int, vector<Body*>> which contains all the bodies that are in the cell, divided in groups. Bodies, in fact, have a groupId int that is used for collision groups. GridInfo objects also contain non-owning pointers to the cells the body is in. As I previously said, the engine is based on groups. Body::getGroups() returns a vector<int> of all the groups the body is part of. Body::getGroupsToCheck() returns a vector<int> of all the groups the body has to check collision against. Bodies can occupy more than a single cell. GridInfo always stores non-owning pointers to the occupied cells. After the bodies move, collision detection happens. We assume that all bodies are axis-aligned bounding boxes. How broad-phase collision detection works: Part 1: spatial info update For each Body body: Top-leftmost occupied cell and bottom-rightmost occupied cells are calculated. If they differ from the previous cells, body.gridInfo.cells is cleared, and filled with all the cells the body occupies (2D for loop from the top-leftmost cell to the bottom-rightmost cell). body is now guaranteed to know what cells it occupies. For a performance boost, it stores a pointer to every map<int, vector<Body*>> of every cell it occupies where the int is a group of body->getGroupsToCheck(). These pointers get stored in gridInfo->queries, which is simply a vector<map<int, vector<Body*>>*>. body is now guaranteed to have a pointer to every vector<Body*> of bodies of groups it needs to check collision against. These pointers are stored in gridInfo->queries. Part 2: actual collision checks For each Body body: body clears and fills a vector<Body*> bodiesToCheck, which contains all the bodies it needs to check against. Duplicates are avoided (bodies can belong to more than one group) by checking if bodiesToCheck already contains the body we're trying to add. const vector<Body*>& GridInfo::getBodiesToCheck() { bodiesToCheck.clear(); for(const auto& q : queries) for(const auto& b : *q) if(!contains(bodiesToCheck, b)) bodiesToCheck.push_back(b); return bodiesToCheck; } The GridInfo::getBodiesToCheck() method IS THE BOTTLENECK. The bodiesToCheck vector must be filled for every body update because bodies could have moved meanwhile. It also needs to prevent duplicate collision checks. The contains function simply checks if the vector already contains a body with std::find. Collision is checked and resolved for every body in bodiesToCheck. That's it. So, I've been trying to optimize this broad-phase collision detection for quite a while now. Every time I try something else than the current architecture/setup, something doesn't go as planned or I make assumption about the simulation that later are proven to be false. My question is: how can I optimize the broad-phase of my collision engine maintaining the grouped bodies approach? Is there some kind of magic C++ optimization that can be applied here? Can the architecture be redesigned in order to allow for more performance? Actual implementation: SSVSCollsion Body.h, Body.cpp World.h, World.cpp Grid.h, Grid.cpp Cell.h, Cell.cpp GridInfo.h, GridInfo.cpp

    Read the article

  • Canny edge detection - grayscale images always coming up as 3-channel, unusable?

    - by cvcentral
    I am working through the book "Learning OpenCV" from the O'Reilly series and am trying to perform a canny edge detection sample. Any grayscale image I choose seems to come up as having 3 channels, and to the best of my knowledge, canny only works with single channel images, so this always fails. I am even using the images provided by OpenCV. Here is my code.. IplImage* doCanny(IplImage* in, double lowThresh, double highThresh, double aperture) { if(in->nChannels != 1) return(0); //canny only handles gray scale images IplImage* out = cvCreateImage(cvSize(in->width, in->height), IPL_DEPTH_8U, 1); cvCanny(in, out, lowThresh, highThresh, aperture); return(out); }; IplImage* img = cvLoadImage("someGrayscaleImage.jpg"); IplImage* out = doCanny(img, 10, 100, 3); Why might this always give me 3-channel images? How can I solve this?

    Read the article

  • Adobe edge animation fails to load first time in Opera, Crome but works in Firefox and Safari

    - by user3721777
    I have quite a serous problem here since I work on this animation for a while, I have a Adobe Edge Animation (done in CC) that fails to load the first time in Opera and Crome but does work in Firefox and Safari. It fail to load every time coming from another page. Only work if you reload. The problem persist both locally and online. It does work in preview every single time. I you can push me in the right direction, that would be great. Thanks! Here you can see the animation: http://tierraburritos.com/test/laCarta.html

    Read the article

  • Finding the normals of an oriented bounding box?

    - by Milo
    Here is my problem. I'm working on the physics for my 2D game. All objects are oriented bounding boxes (OBB) based on the separate axis theorem. In order to do collision resolution, I need to be able to get an object out out of the object it is penetrating. To do this I need to find the normal of the face(s) that the other OBB is touching. Example: The small red OBB is a car lets say, and the big OBB is a static building. I need to determine the unit vector that is the normal of the building edge(s) the car is penetrating to get the car out of there. Here are my questions: How do I determine which edges the car is penetrating. I know how to determine the normal of an edge, but how do I know if I need (-dy, dx) or (dy, -dx)? In the case I'm demonstrating the car is penetrating 2 edges, which edge(s) do I use to get it out? Answers or help with any or all of these is greatly appreciated. Thank you

    Read the article

  • Collision Resolution

    - by ultifinitus
    Hey all, I'm making a simple side-scrolling game, and I would appreciate some input! My collision detection system is a simple bounding box detection, so it's really easy to implement. However my collision resolution is ridiculous! Currently I have a little formula like this: if (colliding(firstObject,secondObject)) firstObject.resolve_collision(yAxisOffset); if (colliding(firstObject,secondObject)) firstObject.resolve_collision(xAxisOffset); where yAxisOffset is only set if the first object's previous y position was outside the second object's collision frame, respectively xAxisOffset as well. Now this is working great, in general. However there is a single problem. When I have a stack of objects and I push the first object against that stack, the first object get's "stuck," on the stack. What's I think is happening is the object's collision system checks and resolves for collisions based on creation time, so If I check one axis, then the other, the object will "sink" object directly along the checking axis. This sinking action causes the collision detection routine to think there's a gap between our position and the other object's position, and when I finally check the object that I've already sunk into, my object's position is resolved to it's original position... All this is great, and I'm sure if I bang my head against a wall long enough i'll come up with a working algorithm, but I'd rather not =). So what in the heck do you think I should do? How could I change my collision resolution system to fix this? Here's the program (temporary link, not sure how long it'll last) (notes: arrow keys to navigate, click to drop block, x to jump) I'd appreciate any help you can offer!

    Read the article

  • Making a perfect map (not tile-based)

    - by Sri Harsha Chilakapati
    I would like to make a map system as in the GameMaker and the latest code is here. I've searched a lot in google and all of them resulted in tutorials about tile-maps. As tile maps do not fit for every type of game and GameMaker uses tiles for a different purpose, I want to make a "Sprite Based" map. The major problem I had experienced was collision detection being slow for large maps. So I wrote a QuadTree class here and the collision detection is fine upto 50000 objects in the map without PixelPerfect collision detection and 30000 objects with PixelPerferct collisions enabled. Now I need to implement the method "isObjectCollisionFree(float x, float y, boolean solid, GObject obj)". The existing implementation is becoming slow in Platformer games and I need suggestions on improvement. The current Implementation: /** * Checks if a specific position is collision free in the map. * * @param x The x-position of the object * @param y The y-position of the object * @param solid Whether to check only for solid object * @param object The object ( used for width and height ) * @return True if no-collision and false if it collides. */ public static boolean isObjectCollisionFree(float x, float y, boolean solid, GObject object){ boolean bool = true; Rectangle bounds = new Rectangle(Math.round(x), Math.round(y), object.getWidth(), object.getHeight()); ArrayList<GObject> collidables = quad.retrieve(bounds); for (int i=0; i<collidables.size(); i++){ GObject obj = collidables.get(i); if (obj.isSolid()==solid && obj != object){ if (obj.isAlive()){ if (bounds.intersects(obj.getBounds())){ bool = false; if (Global.USE_PIXELPERFECT_COLLISION){ bool = !GUtil.isPixelPerfectCollision(x, y, object.getAnimation().getBufferedImage(), obj.getX(), obj.getY(), obj.getAnimation().getBufferedImage()); } break; } } } } return bool; } Thanks.

    Read the article

  • Bounding volume hierarchy - linked nodes (linear model)

    - by teodron
    The scenario A chain of points: (Pi)i=0,N where Pi is linked to its direct neighbours (Pi-1 and Pi+1). The goal: perform efficient collision detection between any two, non-adjacent links: (PiPi+1) vs. (PjPj+1). The question: it's highly recommended in all works treating this subject of collision detection to use a broad phase and to implement it via a bounding volume hierarchy. For a chain made out of Pi nodes, it can look like this: I imagine the big blue sphere to contain all links, the green half of them, the reds a quarter and so on (the picture is not accurate, but it's there to help understand the question). What I do not understand is: How can such a hierarchy speed up computations between segments collision pairs if one has to update it for a deformable linear object such as a chain/wire/etc. each frame? More clearly, what is the actual principle of collision detection broad phases in this particular case/ how can it work when the actual computation of bounding spheres is in itself a time consuming task and has to be done (since the geometry changes) in each frame update? I think I am missing a key point - if we look at the picture where the chain is in a spiral pose, we see that most spheres are already contained within half of others or do intersect them.. it's odd if this is the way it should work.

    Read the article

  • calculating the potential effect of inaccurate triangle vertex positions on the triangle edge lenght

    - by stingrey
    i'm not sure how to solve the following problem: i have a triangle with each of the three known vertex positions A,B,C being inaccurate, meaning they can each deviate up to certain known radii rA, rB, rC into arbitrary directions. given such a triangle, i want to calculate how much the difference of two specific edge lengths (for instance the difference between lengths of edge a and edge b) of the triangle may change in the worst case. is there any elegant mathematical solution to this problem? the naive way i thought of is calculating all 360^3 angle combinations and measuring the edge differences for each case, which is a rather high overhead.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >