Victor17

Member
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Victor17

  • Rank
    Member
  1. Oh sorry that I made a mistake. I want to make them have pointers to each other, like this: class CA { CB* _objectB; }; class CB { CA* _objectA; };
  2. A beginner's question: For an example, I want two classes declared with each other's object pointers in C++, like below: class CA { CB* _objectB; }; class CB { CA* _objectA; }; How can I do it? Thanks! [Edited by - Victor17 on December 2, 2006 8:05:46 PM]
  3. You can calculate elapsed time between consective frames, and use this time interval to animate everything in the game, so that no matter what your FPS is, your game would be running at the same "game speed". Then the animation speed in your game(and everything else which has to do with time) would not be affected by hardware difference. In other words, your game may be running at 20 FPS on an low-end machine, 200FPS on a high-end machine, the speed of your game world(how fast your character runs, how frequent your chrarcter shots) remain the same.
  4. Exporting .X files from Maya 7.0

    It's very kind of you, thank you very much! I'd like to add a few notes to your batch file: 1. Remember to revise directories in the batch file, they r critical. For an example, many ppl's "My Documents" or Maya is not located in C: 2. Pay attention to where dxcc.dll is put, coz it's location is a little tricky...in my case, my Maya is installed in D:\Maya7, so I have to put dxcc.dll into D:\x86\ instead of C:\Program Files\x86 3. As mentioned before, this plug-in is unstable, make sure u load it right the moment before u export your work.
  5. Exporting .X files from Maya 7.0

    It seems this plug-in is extremely unstable. My Maya crashed several times because of it. Did Microsoft add any improvement to their plug-in in DX SDK April 2006?
  6. Thank u Then why did Microsoft remove that utility?
  7. The default DirectX Viewer along with SDK can only display mesh files. Is there a tool that can show me the frame organization of .x files? such as frame names? who is parent to whom and who is child to whom? Thx!
  8. Yes the mesh do have normals. And DX viewer seems to have the ability to compensate the missing data.
  9. Although i still haven't figure out why, but i'm sure the problem is the x file exporter plugin for Maya7. It seems the x file created by this plugin is always lack of some data which i can't be sure yet. The diffuse color of d3d light couldn't affect the surface of such mesh at all(ambient light even specular light would do). Interestingly, I happened to notice there is a mesh file named tiger.x along with DX SDK has the same problem, if u try not rendering its texture, u would get the result i described. Anyone know what kind of data is missing in them? why can't they be correctly computed in diffuse lighting?
  10. Thx for the help! but i can almost sure the problem is my mesh, not my light. I created a directional light in the scene already, which means the default D3D lighting is suppressed. And the most important is, aside from the problematic mesh, I have other objects in the scene - the default "box" meshes created by using sample framework, and these box meshes can reflect my directional light just fine. Only the one that i exported from maya is black, as if it's unaffected by light. And, i tried disabling light in RenderState, the entire scene turns black, including those ones which were ok. Shouldn't the D3D default light be turned back on after i disabled light?
  11. Oh i'm sorry i forgot, the mesh i exported from maya can be correctly displayed in DirectX Viewer...
  12. There's no need to post one. Let me put it this way, if i use a white background color, you could see a pure black object in the center of my screen, and you could tell it is an 3D object but not easily(i rotate the mesh in a constant speed), for every pixel of it is completely black! if i use a black background color, u would not be able to see any thing at all, because the mesh is the same color as the background, all pixel on the entire screen are all the same - pure black!
  13. Hi! I wrote a simple D3D program which renders a .x mesh file with simple directional light. The program executes just fine when dealing with .x file in the SDK samples, such as tiny.x, from the cool walking guy animation sample. Later, I modeled a customed character in Maya7.0, and export it using plug-in to a .x file. I tried many options, with or without export data containing material/textures. My program fails to render it correctly - the program render the model in completely dark, with no ambient color, with no diffuse color, nothing~~~Only a dark geometry displayed on screen. I'm still a starter for D3D. I assigned white to both ambient and diffuse coefficient of the material used in rendering, I also allow D3D to automatically normalize normals. However i just don't understand why my model can't be drawed in correct lighting result as models from SDK. Is there some data missed in my customed .x file when comparing to the sample one? or did I miss some necessary rendering procedure in my program? I've been looking for answer to this problem for days. Any suggestion is appreciated.