Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

259 Neutral

About coelurus

  • Rank
    Advanced Member
  1. coelurus

    Learning Math really from scratch

    You say you studied for grades in school. What is your goal this time, to study only enough maths so you can do the programming you're thinking of right now, or to actually gain that luscious deeper understanding and have a larger set of mathematical tools to choose from in the future?   The best way of learning depends of course on who you are, but having a printed book is hard to beat. As has been mentioned, there are loads of really nice free video lectures online as complementary material, have a look. And considering the level of English in your post, I'd say maths books at the level you're interested in shouldn't be a problem. As always, there's no magic book to open the doors for you, just grab whatever you can find at the local library and have fun. Search for natural science programs in high schools and universities and see in what order they teach maths and go by that. Keep programming and try to find ways to apply what you're learning, and eventually you'll do just that with linear algebra.   Also, don't skip too many parts, thinking they are not relevant to rotating a 3D object. Maths is wonderfully intertwined, and starting with a strong foundation, new things in maths will be "obvious" rather some something you need to cram or constantly look up (i.e. "the reason for this expression is this, so the answer to my question is that" vs "was it this or that, wikipedia help!").   That's what I did, and what I'd do again...
  2.   Note that this will create a higher density of points close to the center of the disc. If you'd prefer a uniform distribution of points in the xy-plane, either generate (x, y)-pairs until one point falls within the circular sector of the player of interest, or scale the points by sqrt(L): [source lang="C++"] x = sqrt(L) * cos(angle); y = sqrt(L) * sin(angle); [/source] Read up on polar integration for more info.
  3. coelurus

    reason i love my wife

    To indulge the OP: A good friend of mine started using Linux many years ago after having seen me tinker. He currently lives with his fiancee who plays the organ in a church and pretty much organizes any music (the choir, inviting "classical bands" some nights etc). They have at least 5 PCs or so (a media server, media player, one or two office computers and a laptop, he's a collector), all running Ubuntu (I think he is trying Arch on the laptop atm) during the day with the power horses dual booting to Windows for hefty games. Even though his fiancee is not a computer monster (she does what "normal people do" on computers), she really likes Ubuntu and have no issues or complaints about it. My good friend takes care of tech related issues anyway, and afaik that's a rather lazy "job". Wouldn't dare say this is the reason they love each other, but they both use Linux and they live a happy life together. For the nervy people: She is really pretty too... And does not smell funny! Aah, online communities, the metal grater back rub.
  4. There are a few things you can do to compress the storage: *) Non uniform zenith angle, use more detail at the horizon, can reduce # verts to at most 60-70. *) Reuse color sets, use one "day color set" and one "night color set" for several hours, 8 color sets should suffice. *) As joe_bubamara stated, you don't need 32 bits precision, or even 24 bits since you interpolate, you will get all possible colors anyway. *) From the good old links by filousnt, skip azimuth dependence for color and modulate brightness. Let's say you have a 12*5 skydome, 8 color sets, 16 bits of color precision and zenith only dependence. With all the above it'd take 5*8*2 bytes = 80 bytes. For the entire skydome, 12*5*8*2 bytes = 960 bytes. A couple of years ago I specified 4 angles for azimuth and interpolated between, 4*5*8*2 bytes = 320 bytes.
  5. In short, there's no explicit expression.
  6. coelurus

    two 16 bits into one 32 bit

    Convert to and from fixed point: unsigned int i32 = ((unsigned int)(v1 * 65535) << 16) | (unsigned int)(v2 * 65535); float o1 = (i32 >> 16) / 65535.0, o2 = (i32 & 0xFFFF) / 65535.0; I don't know specifics of HLSL, but something similar to the above code should do the trick.
  7. coelurus

    Event handling in X11

    Don't remember what happens to keyboard input when you do the override thingy, but what you say sounds reasonable. Grabbing the keyboard will fix it: XGrabKeyboard(dis, win, true, GrabModeAsync, GrabModeAsync, CurrentTime); Make sure to ungrab and regrab whenever you should. I would strongly suggest you take a look at some existing source code, X has a rather steep learning curve. The simplest sources are games, but they still cover the most important parts.
  8. coelurus

    Event handling in X11

    It's all handled with bitmasks: /* Enable redirection override. */ att.override_redirect = True; /* Mask all wanted event bits together. */ att.event_mask = KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | etc...; /* Tell window to take care of both override redirection and input events. */ XChangeWindowAttributes( dis, win, CWOverrideRedirect | CWEventMask, &att );
  9. coelurus

    Event handling in X11

    You don't need the override thingie for input, but events: att.event_mask = KeyPressMask; XChangeWindowAttributes( dis, win, CWEventMask, &att ); Check out the source code for the Quake games, they got a lot of useful stuff on X.
  10. I'm in the process of writing my own general-purpose GUI and it'll replace wxWidgets in an editor and be used in-game. Written as a plugin and "only" takes care of the spatial relationships and events, rendering takes place in GUI renderer plugins. Only got a silverish renderer atm, but it'd be possible to make one that co-works with the scene plugins for 3D GUIs with all the available graphics effects, whatever one would do that for.
  11. coelurus

    tangent space normal mapping

    Do you save your normals using angles? Try vectors and transform your lights into tangent space with a TBN matrix (time to google!), vectors will represent normals in one reference system and you won't get those discontinuities.
  12. coelurus


    I have no experience in FBX files and what parts are relevant to eachother, but do the animation rotation angles follow the rotation axis order parameter ala in the FBX SDK GetEulerRotation{X,Y,Z} and GetRotationOrder?
  13. coelurus

    Shader System

    How about writing one effect file for each possible case regarding both effect and implementation? Gonna be a lot of effect files, so just split up them up into different directories by implementation. This is very much a decision you will have to make, it's mainly a small organizational issue that determines how the effect development will work. Doesn't affect the higher level of the rendering process, so just choose one for now.
  14. coelurus


    Regarding the "coordinate frames", it's already been covered in here. Don't concatenate quats from different coordinate systems (like one from object space and another from world space). But we already know that, right? :p Why are you trying to reconstruct a quaternion from Euler angles extracted from another quaternion? Look at each Euler angle you get and see if they're correct, simple examination that should tell you what goes wrong.
  15. coelurus

    The math pros in here...

    I studied "programming maths" by myself a couple of years back when I was still in elementary school, had one or two old high school grade maths books at home. University only showed me that the stuff I did was all true and how to extend upon what I already knew, plus interesting ways to use programming practically (solving the time-depenent Schrödinger equation in realtime in two and three dimensions, yummy!).
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!