Jump to content
  • Advertisement

bobby_nguyen

Member
  • Content Count

    59
  • Joined

  • Last visited

Community Reputation

122 Neutral

About bobby_nguyen

  • Rank
    Member
  1. bobby_nguyen

    Color or Brightness Issue

    Interesting. It is the most noticeable when the dots are near the color of the background (less contrast). When the dots are full white (1.0,1.0,1.0), I still see the dots get slightly darker. Thanks for your insight. Now, is there any way around this? A screen with a higher refresh rate?
  2. bobby_nguyen

    Color or Brightness Issue

    I'm using C++ in OpenGL. If I move my mouse rapidly across the screen, the trailing pointers look darker than the leading pointer.
  3. bobby_nguyen

    Color or Brightness Issue

    I have a display of some dots moving left and right. When the dots are stationary, the dots are brighter. In other words, when I begin the animation, the dots get darker. The RGB values are set at (.5, .5, .5). I assume that when stationary, the color of the dots is correct. But once moving, it changes and it no longer reflects the correct color. Any thoughts on why this happens?
  4. I am using a LCD monitor (Dell, 19"). I hooked it up to a newer Alienware LCD monitor, with the same refresh rate (60), and it didn't seem to do it. The problem came back when I hooked it up to a 46" LCD screen.
  5. Wassup everyone, I hope someone can answer a question or problem that I have. I have an OpenGL program that has a black background and some gray objects / dots. When moving sideways, the dots get brighter. This can be easily replicated on my machine using Microsoft's Paint. Fill a large area with black. Use the paintbrush to scatter dark gray points. Scroll the image up and down, left and right. The points seem to change size, get brighter (flicker) , and if I go fast enough, the points seem to get near the color white. Does this have to do with the refresh rate? I have changed from 60hz to 75hz with no difference. I don't think that is enough to see a difference. Thanks for any input.
  6. The points I draw have global coordinate positions. It is possible that two points that are near each other globally get drawn to the same pixel on the screen, hence the accumulation. If this is the case, is there a way to prevent drawing to a pixel if it has been drawn to already?
  7. Someone suggested that I try using a high resolution timer. Does this seem like a possible solution? And why would it be?
  8. Quote:Original post by Geometrian While moving objects will appear slightly brighter, due to imperfections in the monitor and the human eye. For example, a white point on a black background moving left will leave a small (1-2px) dark grey trail behind it, because the pixel cannot turn completely off instantly. The effect is larger on CRT monitors, as Phosphorus compounds continue to glow for a while. Your eye, for its part, suffers from something called "persistence of vision", which is essentially the same thing. This may not be your problem, or I could just be misunderstanding you. If not, you can help it by using larger, blurrier points or moving more slowly, or not at all. You might also want to be clearing the depth buffer somewhere in there--I didn't notice such a call. Hope this helps, -G Thanks for your input. I have only tried the program on a 19" LCD monitor and a 46" LCD monitor. The issue is more apparent on the larger screen. I have tried increasing the point size, but with no improvement. The movement at its current speed is necessary, so eliminating that is not an option for me. I have recently added the depth buffer clearing into the code. It does not seem to be making a noticeable difference.
  9. Here is a portion of my extensive code, I hope this is enough. All the "trials" and "conditions" are part of variables I am manipulating. void ShowStars(void) { int n; //Index float x0, y0; //X and y coordinates glColor3f(conditionS[order[trial]].dotbright, conditionS[order[trial]].dotbright, conditionS[order[trial]].dotbright); //Set dot color glPointSize(2.0); //Set dot size glBegin(GL_POINTS); //Begins list of vertices for (n = 0; n < conditionS[order[trial]].numpoints; n++) { if(trialS[trial].point[n].z < 0) { trialS[trial].point[n].x = (float)rand()/(float)(RAND_MAX+1)*plane_width-plane_width/2.; trialS[trial].point[n].z += MAXPOS; } if(abs(trialS[trial].point[n].x) > (display_width/2)/e*trialS[trial].point[n].z) { trialS[trial].point[n].x = -trialS[trial].point[n].x; } x0 = e*trialS[trial].point[n].x /(trialS[trial].point[n].z); y0 = e*trialS[trial].point[n].y /(trialS[trial].point[n].z); glVertex2f(x0,y0); //Draws the dots } glEnd(); //End the list of vertices } void Initialize() { glClearColor(0.0, 0.0, 0.0, 0.0); //Clears the color bit glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); //Really Nice Perspective Calculations firstframe = 1; // vis_ang = 2*atan((display_width/2)/e); // plane_width = display_width/e*MAXPOS; // srand((unsigned int) time(NULL)); // initial_time = ((int)(clock()/CLOCKS_PER_SEC)); // Sinusoid(); //Creates the sinusoidal function CreateDisplays(); //Creates list of display numbers GenerateConditions(); //Generate the conditions MakeRandomOrder(); //Randomize the conditions ticks1 = clock(); // return; } void ReshapeScene(GLsizei width, GLsizei height) { if (height == 0) { height = 1; //Prevent from dividing by zero } glViewport(0, 0,width, height); //Reset The Current Viewport glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(-display_width/2, display_width/2, -display_width/2*height/width, display_width/2*height/width); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); return; } void RenderScene() { glLoadIdentity(); //Clears all states to start drawing if (move == TRUE) //If move has been set on, move stars { MoveStars(); //Gets new coordinates UpdateStars(); //Clears screen ShowStars(); //Draws the dots } else //If move not set, don't move dots { UpdateStars(); //Clears screen ShowStars(); //Draws the dots } //glFlush(); } void IllustrateScene() { glClearColor( conditionS[order[trial]].backbright, conditionS[order[trial]].backbright, conditionS[order[trial]].backbright, 0.0); //Sets background color glClear(GL_COLOR_BUFFER_BIT); //Clears the color buffer bit RenderScene(); //Draws the scene return; }
  10. Yes, I have called glClear after each frame. glClear(GL_COLOR_BUFFER_BIT | GL_ACCUM_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clears the buffer to draw again Thanks for the quick reply.
  11. Hi everyone, I have a display of random dots projected onto a ground plane. When I add movement in the z and x direction, the color and or brightness of most of the dots get brighter. To me, it seems like the dots get drawn in the same position for a few frames, and the RGB values get added together, making the dot brighter. so maybe something to do with a buffer? I appreciate any help, thanks!
  12. Hey you guys, I need help with some DirectInput code. I've got the directinput and device instances all set up. I just need to play a force feedback file that I've created on the steering wheel. The effect needs to start immediately after the device is acquired. I've been able to get the effect to play only when I step out of the program (losing focus) and then getting back into the program (regaining focus). Here's the code I have for the effect file: BOOL CALLBACK EnumEffectsInFileProc(LPCDIFILEEFFECT lpdife,LPVOID pvRef) { HRESULT hr; hr = g_pDevice->CreateEffect(lpdife->GuidEffect, lpdife->lpDiEffect, &g_pEff, NULL); return DIENUM_CONTINUE; } HRESULT SetForces() { g_pDevice->EnumEffectsInFile("earthquake_force.ffe", EnumEffectsInFileProc, NULL, DIFEF_MODIFYIFNEEDED | DIFEF_INCLUDENONSTANDARD); return (0); } HRESULT Update() { g_pDevice->Acquire(); if (g_pEff ) g_pEff->Start(INFINITE, 0); return (0); } LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_SIZE: //If resized ReshapeScene(LOWORD(lParam), HIWORD(lParam)); //Apply ReShape settings return 0; break; case WM_ACTIVATE: //If activated if( WA_INACTIVE != wParam && g_pDevice ) { Update(); break; ... return DefWindowProc(hwnd, msg, wParam, lParam); } I have been trying to get g_pEff->SetParameters() function to work, since i think that is where I can declare it to start immediately with "DIEP_START". Maybe I don't have all the right arguments?
  13. Howdy everyone, I've created a force feedback effect file, .ffe, using fedit from the directx sdk. How do I load the file, and assign a button on the steering wheel or keyboard to play the effect? I've already setup the directinput interface and steering wheel device. Here is a snippet of the code. 5$ to first person that helps me get it working! Thanks much! BOOL CALLBACK EnumEffectsInFileProc(LPCDIFILEEFFECT lpdife,LPVOID pvRef) { HRESULT hr; hr = g_pDevice->CreateEffect(lpdife->GuidEffect, lpdife->lpDiEffect, &g_pEff, NULL); return DIENUM_CONTINUE; } HRESULT SetForces() { g_pDevice->EnumEffectsInFile("earthquake_force.ffe", EnumEffectsInFileProc, NULL, DIFEF_MODIFYIFNEEDED); return g_pEff->Start(1,0); } [Edited by - bobby_nguyen on August 3, 2009 4:15:17 PM]
  14. bobby_nguyen

    Autocenter Steering Wheel

    Thanks for the reply. I am not necessarily wanting to change the setting myself. I would like the user to be able to change the strength of the auto-center, i.e., using a hotkey to increase or decrease strength during game play. I have downloaded a small program, rtc1.4pre-beta, that is used for driving games to allow manipulation of auto-center and force feedback effects. It was compiled using Visual Basic, but i have not been able to reach the developer. Any other ideas?
  15. In Windows XP control panel, I am able to adjust the centering spring strength of my Logitech Momo Steering wheel from 0 to 150%. Is it possible to adjust this setting in-game using directx and directinput?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!