Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

163 Neutral

About Merlz

  • Rank
  1. Merlz

    Equation of a Square?

    Here's another one, just for fun: abs(x) + abs(y) <= 1 Although this one is at 45 degrees rotation to the axis, it's of max radius 1 :-)
  2. remember to check for mousex=charx first, otherwise you could divide by zero
  3. These are my suggestions: -make sure you have texture blending turned on. -to make lighting look less pixellated: set the normals yourself and use the average of all triangles indicent on a vertex. -to make it faster nicely: take 2*2 pixel blocks, average the height and position of all pixels with height > 0. Then do the same as you are now but with these points. You can use the resulting averaged x/y coords as texture map points too.
  4. Say I have a bitmapped picture, and I wanted to draw it with a device that is not a scanning device. The device has a constant brightness and slightly variable speed but changes direction quite slowly, so I have to plot a winding path around the bitmap image that will approximate the right exposure per-pixel. All obvious tricks like frequency transforms to obtain outline traces aside, how would I go about converting my bitmap image to a good path for said tracing device? Are there any good algorithms that I could use to do this? Any places I should look?
  5. Merlz

    Real World Light Attenuation

    Quote:Original post by Grasshopper Fog Factor = e^(-k*DistanceToCamera)/(DistanceToCamera*DistanceToCamera) that's close, but not quite right. The total lighting eqn (fog + light falloff) would be more like: lighting = e^(-k*DistanceToCamera)/(DistanceToLightSource*DistanceToLightSource) But normally, k is very small, so most engines approximate e^(-k*DistanceToCamera) with a straight line (or quadratic). The result is: lighting = k*DistanceToCamera /(DistanceToLightSource*DistanceToLightSource) Both OpenGL and DirectX should have functions for adjusting both the speed light intensity falls off, and the falloff due to the medium it travels in. Adjust for artistic effect :-)
  6. If you don't lock the corners of your smaller quads to the sides of larger neighbours, you're gonna get lotsa nice big holes :) I'd suggest mapping each pixel (or every second pixel) as a vertex for now and optimising after you've got the whole heightmap thing working well (then at least you have a base example to compare quality to as well). It's an interesting idea though, I'd like to see some screenies of the rendered models made this way.
  7. Merlz

    splitting 16bit to 2 x 8bit

    yeah, not converting at all is smartest :)
  8. Merlz

    The illusion of intelligence...

    As humans, it suits our perceptions to anthropomorphize everything. The less "human" something is, the more distanced we will feel from it. Good game AI, therefore, has to give not the illusion of intelligence in general, but the illusion of HUMAN intelligence. Make it act like a person (regardless of the game - imagine an RTS AI that carried grudges), and you'll find players are only to willing to believe it is and forgive the illusion its faults.
  9. Merlz

    My camera that slowly stops working.

    try adding vVector.y to _wantView.y... just an intuitive hunch...
  10. Merlz

    terrains in WoW

    I think it's actually multitextured, tiled terrain type textures with blend levels set on vertices (and obviously very optimized). I could be wrong, but that's what it looks like. If not, then maybe there are textures blending between types that are tiled in between? (like 2d tiled games do...) If you look closely, you can see that the terrain repeats :-)
  11. Merlz

    Real World Light Attenuation

    Just to clear up terminology: attenuation through matter is the exponential decay formula you found; radiation from a point is the formula we use to calculate lighting normally. Attenuation usually refers to how much gets blocked, whereas radiation talks about how the light spreads out. For instance, lasers don't radiate outwards much so Lumens/dist^2 is a really bad approximation of how they work. Streetlights and our sun, on the other hand, behave properly (for the way we model light, anyway) and follow Lumens/dist^2. ( this is physics... I guess in graphics we can call radiation attenuation, but then it confuses real attenuation :) ) I think openGL has an exponential fog equation to simulate this attenuation effect too - if you ever do need it. IMO, it's prettier than linear fog, but it's much more expensive to calculate so games typically don't use it as much. In air and even water, the coefficient of decay is small enough that you'll only notice any effect over long distances, so we usually ignore it altogether in games. To see the effect in real life, have a look at how mountains in the far distance turn bluish ;)
  12. Merlz

    splitting 16bit to 2 x 8bit

    The only real way to do it mathematically is to use ints, mod, and divide. High byte: value/256 Low byte: value%256 As long as you're using integer values, that should do what you want.
  13. please define "2d map". Do you mean an actual map, an array, some limiting values...?
  14. Your best bet is to figure out how to compare physics states simply. Maybe some kinda function that, say, adds all distances squared and compares them across the network? You need to establish that the objects on both sides are *roughly* equal, and work out which one is server if they need to resync.
  15. Merlz

    Size of n mipmaps

    IIRC, the limit of mipmaps (of any pixel size as long as they're reduced by the standard scaling)is < original image/3 (may want to look up to check...). just out of interest, why are you using 2^n+1 sizes?
  • 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!