Jump to content
  • Advertisement

TomKQT

Member
  • Content count

    705
  • Joined

  • Last visited

Community Reputation

1704 Excellent

About TomKQT

  • Rank
    Advanced Member

Personal Information

  • Role
    Programmer
  • Interests
    Design
    Education
    Programming
  1. I'm a completely self-taught programmer. I started with programming on my Commodore C64 (from around the age of 10, I think), where I learnt the BASIC language and the most important programming principles like variables, branching, arrays, loops etc. And also binary numbers and binary operations (AND, OR etc.) because of how often do you have to use those famous POKE and PEEK commands on C64. My only sources of information were the user manual of C64 (it was a completely different manual than nowadays, it contained also a very good BASIC reference book with sample codes) and a book I got back then (no Internet, of course). Later when I switched to 286 and DOS, I stayed with BASIC (QBASIC). Then Visual Basic 6 and all those .NET versions. I started with C++ quite at the same time as with DirectX 9 and it was quite late - what I was beginning my Ph.D. studies in Robotics (at 2004, age of 24). My sources were some books (Frank Luna) and the Internet, inluciding the gamedev.net forums (as you can see, I registered around that time). I'm partly using programming and DirectX in my job, but I'm not strictly a programmer. It's been my hobby for all the time.
  2. TomKQT

    Problems displaying a mesh

    Or a plain black cube. I hope your background color isn't black ;) That's just a tip, to be sure (maybe you're doing it, but we can never know) - during these initial attempts, never clear your backbuffer to white or black, use some general color, like a yellowish-gray etc :)
  3. TomKQT

    shadow shader

    abdellah you really should again focus on the kaunas's post. What exactly are you trying to do - do you have really some special situation that the algorith would work well for you? Generally, the idea is not good, because: You will be checking each vertex of all the shadow recievers (or do you really have just one?) against all vertices of all possible shadow casters (or do you really have just one?). That's not really efficient and it's quite hard to achieve, because when you are drawing a certain vertex (you are in its vertex shader), you don't have information about other vertices - unless you pass them to the shader somehow. Also a very important thing to keep in mind - a vertex will be in shadow only if it there is some vertex of the shadow caster PRECISELY on the line between the said vertex and the point light. In fact you have just a bunch of point occluders with infinitely small size (ideal points), casting shadows in infinitely thin lines on another set of infinitely small point receivers. What are the odds that you will ever get a single shadow?
  4. TomKQT

    Creating a Sphere from a Cube

    What exactly was the motivation for you to try to create a sphere out of a cube (that's not a rhetorical question, I really wonder)? That doesn't make much sense to me, honestly. Why do you generate verticles or a cube and then modify (with huge problems) to form a sphere instead? Did you try to use google and find out how to directly generate verticles of a sphere?
  5. Well, to be honest I'm not sure, I haven't used the Effect Framework for ages. I guess you would still need to assign the texture by sampler textureSampler = sampler_state { Texture = <DiffuseTex0>; }; I'm using the version with a fixed register number which allows me to set the texture simply by SetTexture(register, texture).
  6. You don't need to use the structure, you can define sampler just like this: sampler DiffuseTex0; And then use it: float4 textureColor = tex2D(DiffuseTex0, input.TexCoord); You can even say: sampler DiffuseTex0 : register(ps, s0); Which will allow you to simply set the texture from c++ code by directly using the particular sampler register: device->SetTexture(0, d3dTexture);
  7. "Render a text" will most probably mean "reander a vertex buffer (small quads, one of each letter) with a texture". The texture contains all the necessary chars. So you can try to look for that. Is the texture pre-made with all possible chars (can you find it somewhere in the game assets)? Is it made when the application starts and the letters are somehow drawn in it? Or is it changed even when the application runs if the text needs new letters (Btw I think the last variant is what D3DXFont does).
  8. TomKQT

    Why is this happening?

    You think it's related to specular calculations and you're 99 % sure it's not in shaders? That means you are either using the FFP and you are trying to say that there's something wrong in it, or I have no clue
  9.   I did something very similar 5 years ago (picture) and all the magic with projection was done very simply by using D3DXMatrixPerspectiveOffCenterLH to create the projection matrix. Try to look at this D3DX function ;)
  10. Maybe his algorithm works with the mesh rendered at zero depth (center of the mesh), so that some parts of it are in front of the near clipping plane? I have no idea, that's just a guess. In this case it would probably be best to modify it to work with any depth, to be able to use the 0-1 depth range (between near and far clipping planes).
  11. TomKQT

    Recalculating terrain normals

    Just a small note on this. Don't take AAA games in general as your holy grail as far as technology is concerned. Sure, there are some developers that push the boundaries further and produce extremely optimized and technicaly advanced games. But there are plenty of AAA games that are made in very short time and with focus on other elements, not optimizations. For example, I think it was on this forum - somebody showed how incredible hight was the amount of draw calls in the early version of Civilisation V. They had a separate draw call for every single icon on the screen, including all those food/wealth/production icons on each tile (if you know the game). That probably won't be the best way, will it? And btw I think this changed in the later versions of the game.
  12. TomKQT

    Recalculating terrain normals

    But you would make it only once on the CPU, wouldn't you? As opposed to every frame on GPU. (If the terrain is not changing somehow during time.) You need to send less data to the GPU, that's right. But that would probably require some profiling, whether it's better to be sending less data and calculating some on the GPU or to be sending more data and spare some GPU time.
  13. TomKQT

    Modern directx and effects framework

    Yes, it's just a "smart wrapper" and yes, you can completely ignore it and make your own system (or do everything manually all the time if you want). I know the Effect Framework only from DX9 and I have no idea whether it changed significantly in DX10/11, but in DX9 it was quite a good system for people learning the programmable pipeline, because it made it everything very straightforward and simple. But as you started to understand better how it everything works, you usually realised that the Effect Framework may not be really optimal if you try to do some optimizations of device calls and the whole rendering process - because you really don't know what's going on under the hood with its automatic state changes, texture setting, samplers, CPU pre-shaders etc.
  14. TomKQT

    Loading normal maps from files

    I encountered too many limitations of the standard file formats (1 texture per subset is the most basic one), so after some work-around solutions I finaly decided to create my own mesh file format ;) Now I can store all the material properties I want. Or it also could be a good idea to separate the mesh data (vertices, indices etc.) from the actual look (material) and have two files for each mesh. I think the Source engine uses this approach? Not sure. In the material file, which can have the same name as the mesh file to be able to match them together, you can have a detailed description of the effects, textures, colors and all other properties (even LODs, physical properties for physics engine...) related to each mesh.   EDIT: here's how Valve's doing it: https://developer.valvesoftware.com/wiki/Material
  15. There most certainly is the very same problem, it just may be less visible (almost invisible). In more complex graphics, like in a normal game, you probably wouldn't notice at all that few rows and columns of pixels are badly displayed. And also in a project like this one, where you have 1 pixel thin lines, you may be lucky - for example in the screenshot you showed here, if the errors were not in the horizontal zone, but in the slope, do you think you would notice it?
  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!