Jump to content
  • Advertisement

Nitrogen

Member
  • Content Count

    33
  • Joined

  • Last visited

Community Reputation

154 Neutral

About Nitrogen

  • Rank
    Member
  1. Nitrogen

    Dark edges around texture fonts

    Yea, that's correct. That is the way the text was handled in Quake 3 Arena Otherwise try using: glBlendFunc(GL_SRC_ALPHA, GL_ONE); That should make all the black areas turn transparent. If not, try switching the two arguments around, I'm not sure which is source and which is destination...
  2. That artifact looks more like an overactive fresnel term on a metal pixel shader...
  3. Well, consider, I'd like an image around 400x200 pixels displaying the world, and I'd like to see the day night cycle in real time, so it should only have to be accurate down to hours. I'd have to have the axial tilt because I want the seasons to show up on the map. I'm a bit weary of lat, long, alt coordinates because the way I was going to display the Light/Shadow map was to use a 3D sphere and a 3d position of the sun in earth centered coordinates then use vertex normals and a vector to the light to perform lambert shading on the sphere. that's the only way I could think of getting that sinusoidal pattern on the map... So if we could work out a formula for determining which parts of the map are in shadow in lat,long,alt coordinates, that would be a good start!
  4. I've been looking into making a small little app which displays a rectilinear map of the world, and overlays on it which parts are in daylight and which are at night.. My solution so far is to put everything into 3D coordinates. I have a function which can convert between lat, long, alt to earth centered coordinates, but getting the absolute position of the sun for any given day/hour/min of the year is a bit tricky... Does anyone know of any resources that would have such a algorithm? I'm using Delphi, so i have found an astronomical calculation unit for delphi which gives a sun position, but unfortunately doesnt take into account the rotation of the earth around its own axis. The accompanying article mentions simply applying a matrix of Sin(t)'s where t is time, but I've been unsuccesful so far (probably due to me not knowing what the hell was going on :P).
  5. Nitrogen

    Unsharp polygons

    I think your easiest answer is to use textures instead of polygons. There isnt much you can do to polygons except antialias them, but this depends on the graphics card and driver settings on the computer it's running on, which isnt idea. Using texture mapping, you'll be able to set it that it automatically smooths out your text and lines and it will work on ANY graphics card. Here is an excellent tutorial on texture mapping: NeHe Lesson 06 Pay special attention to this line: glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); it sets the texture up so that it performs Linear interpolation between colours on your texture (ie. antialiasing)
  6. Nitrogen

    Tries are eating my RAM send help

    So it seems like some compiler/system specific memory management is to blame. Also look into boundary aligned datatypes (I'm not sure if that affects anything in this instance)
  7. Your framerate performance certainly has nothing to do with switching between perspective and orthographic projection. the Quake engine does this fine and I've used this method many times before in the past, each with minimal (if at all) performance hit. The only things I can suggest: - You are mangling some of your glPushMatrix and glPopMatrix commands. In the one line you are pushing a Modelview matrix onto the stack, then you try to pop it onto the Projection matrix! big problem there. You should remove the second last GlMatrixMode(GL_PROJECTION) and change the last one to GL_PROJECTION. that should fix that. - I dont think it's a good idea to have a negative near plane (-1, 1). Rather make it (0, 100) or something then add a glTranslatef(0,0,-2) to the camera to move the quads into the viewing area. - As far as I remember, GL_TRIANGLE_STRIP is more efficient than GL_QUADS, and it only requires you to swap around your last two vertexes. There should be no reason why this code doesn't run at 1000+ fps when fixed.
  8. Nitrogen

    Terrain problems (MDX)

    From the screeshots it looks like your triangles are not properly formed. Like you could have be missing a vertex right at the beginning of the array, that would cause all the triangles to 'shift' up one place, and the triangles at the end of the mesh would be formed from 2 vertexes on one edge of the terrain and 1 from the other side of the terrain mesh, causing those lines you see in your screenshots.
  9. Nitrogen

    Help Me Name My Cat

    Some inspiration: www.catsthatlooklikehitler.com :)
  10. Nitrogen

    help with GLSL shader

    Sounds like you need to multiply your tangent space vectors by the modelview matrix as well.
  11. I've just revamped and completed an old project of mine. It's a lightmap generator written in Delphi, using OpenGL. Why lightmaps you say? well, they're fast in-game and very easy to implement and you get automatic soft shadows! The old lightmap generator wasnt complete so it only had one type of light, was slow and didnt have a way to export the lightmaps. Well, that's all changed with this version which can 'conceivably' handle some real-world applications. It has two types of light (Omni and Spotlight) and can load 3DS files or it's own projects, it now includes unwrapping and lighting options such as lightmap padding, antialiasing and draft mode. Get it here: (or just look at the pics) http://www.sulaco.co.za/nitrogen/projectinfo.asp?id=31 It's free, includes source code and instruction manual, and you'll find a tutorial on the file format here: http://www.sulaco.co.za/nitrogen/viewtutorial.asp?id=15 On the technical side, it uses shadow volumes to test if a point is in shadow, and an octtree structure to accelerate ray-shadow tests. It also uses a 2D binary tree structure to pack triangles into the lightmaps.
  12. Nitrogen

    Several things for a newb

    Well, I've always heard good things about Allegro. http://www.talula.demon.co.uk/allegro/ It's been going for a long time now... You can also try SDL, which is also pretty popular. http://www.libsdl.org/ I found this off the libsdl site: "> Allegro (http://www.talula.demon.co.uk/allegro/) has pretty much every > routine a person could ever want, and there're both DirectX and X ports. I > don't know how easy it'd be to port a given Allegro routine to the SDL, > but it might be worth a look... GTk has the UI, SDL has the speed and simplicity, and Allegro has the graphics primitives." They both work off the DirectX api by the way.
  13. Nitrogen

    Fix texture stretch on terrain

    You could cheat and introduce extra cliff face meshes into your level (which are independantly textured), covering the area affected by bad stretch... That's about the best solution I can think of...
  14. - Try moving the camera away from the origin: glTranslatef(0.0f, 0.0f, -10.0f); - Make sure you have GL_TEXTURE_2D disabled. - Make sure your program is actually drawing to the screen, I usually change the glClearColor to a noticible color to test this.
  15. Nitrogen

    Nitrogen website

    Thanks, my site is still sitting under Sulaco's shadow (indeed, it was the first site that taught me OpenGL and Delphi!) But I hope to get mine expanding nicely in the future... [Edited by - Nitrogen on August 2, 2006 12:13:42 PM]
  • 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!