|
After about a day of trying to get skinned meshes in HLSL working I learned about PIX and discovered that you do in fact need to set vertex declarations (heh). This is what I have so far: That's supposed to be a man-shaped figure, so something's off, and I assume it's my bone transforms. They should be matrices that transform the bone from bone space to world space, correct? edit: reading this paper shows me this equation: I'm assuming that the first matrix is one that transforms a bone from bind-pose to world, but I don't know what the second matrix represents. MasterSlowPoke fucked around with this message at 13:03 on Jul 24, 2008 |
# ¿ Jul 24, 2008 10:45 |
|
|
# ¿ Apr 28, 2024 22:46 |
|
Actually, that is an MD5 model, but I am computing a base pose and base model at load time as I've never seen any other description on how to do it. I'm also want to preform this on the graphics card, not the cpu. I've actually done it on the cpu before and for some reason it worked a lot easier there.
|
# ¿ Jul 24, 2008 21:19 |
|
After a lot of teaking, I've got it pretty much working! My only hangup? It's flipped! In engine, In editor I've been messing around but I can't seem to get it to flip back around. edit: Im at my wit's end with this, I can't get the model to flip back, the only way to get it to display right it to flip everything in the editor. MasterSlowPoke fucked around with this message at 23:04 on Jul 25, 2008 |
# ¿ Jul 25, 2008 05:47 |
|
Yeah, it was definitely the projection that caused the error. midnite posted:Does the editor work in the same handedness and coordinate system you are? You might have to do some conversion on export to convert from right-handed to left-handed or vice-versa. Does the positive X, Y and Z axis go in the same directions are in your engine? If not you'll have to flip the necessary coordinates in your verts, normals and rotations. I'm not sure what handedness Blender uses, but I guess Doom 3 uses a left handed system as that was what the MD5 exporter used. Either that, or when I changed the model componets from z-up to y-up that also changed the handedness. Either way I finally figured out where to transform the model with a -1 scale on the X axis: in the middle of the bone-to-world transform.
|
# ¿ Jul 26, 2008 22:34 |
|
In my Quake 3 BSP loader I'm trying to get frustum culling to work but the results are far too overzealous. For example, take this window: http://www.craigsniffen.com/bsp/asintended.png When I alter my view a little bit, the U shaped frame is culled. http://www.craigsniffen.com/bsp/malculling.png At first I thought that I was computing the bounding boxes wrong, so I decided to draw them to the screen. Suprisingly the boxes appear to be in the right place (the box that I believe houses the U frame is highlighted in red). If that bounding box wasn't on the screen, I shouldn't be able to see it when I draw it, correct? Here's the relevant code in case there is a dumb error: code:
|
# ¿ Jul 30, 2008 21:35 |
|
I'm trying to figure out the best process to use to render a BSP with DirectX. The traditional way to render a BSP is the find what polygons (leafs) are visible from the camera and render them as you find them. This works fine and dandy with OpenGL, but the relatively high cost of Draw calls with DirectX makes me weary. I'm thinking that I should instead store each polygon in a buffer (delineated by the texture used) when visible leafs are found, then render each buffer at the end. Still, this seems to be a lot of work for the CPU to do each frame. I'm also thinking of just making static buffers for each texture and rendering them all each frame, letting giving the hardware the task of culling nonvisible leaves in the vertex shader. I'm having troubles determining what to do with the lightmaps in that process. I suppose I could stitch all of the lightmaps into one large map, but them I'm limiting the number of lightmaps I could have (probably about 16 128x128 maps). Any thoughts on how I should go about this? Also, do anyone find that GameDev.net's forums are absolutely worthless for getting help?
|
# ¿ Aug 3, 2008 09:45 |
|
Entheogen posted:How do I reject by polygon? Am I just missing some simple OpenGL call? I think me means not worrying about what way the polygons face and setting a CullMode, as the graphics card is faster than however you'd determine front facing polygons.
|
# ¿ Aug 20, 2008 06:14 |
|
don't give dwarf fortress graphics or I might get sucked into playing it forever
|
# ¿ Aug 23, 2008 19:03 |
|
If you already know C, Frank Luna's "Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach" is probably the best graphics introduction I've read. Even though I'm using XNA now I still refer to it all the time. http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160/ref=sr_1_1?ie=UTF8&s=books&qid=1226473567&sr=1-1 Actually looking online I see he's got a DX10 book out now, anyone checked it out yet?
|
# ¿ Nov 12, 2008 08:08 |
|
What version of OpenGL are you using? From this table it looks like the hardware only supports OpenGl 1.4. http://en.wikipedia.org/wiki/Intel_GMA#Table_of_GMA_graphics_cores_and_chipsets I've never used OpenGL or the FFP so maybe this has nothing to do with your problem, though.
|
# ¿ Dec 11, 2008 01:50 |
|
If you learn Blender it's really powerful but if you ever want to learn another modeler you're have to forget everything you know. The UI is completely different from anything else. It's probably my favorite modeler, although I am a programmer so my opinion isn't all that useful.
|
# ¿ Dec 12, 2008 07:53 |
|
not a dinosaur posted:Yeah, this answers my question. Sounds like a custom format is the way to go. Thanks everyone If you've never imported a 3D model format before you might want to go with someone else's proprietary format to learn the ropes. Id's MD5 is a pretty good place to start - it's fairly simple but still modern.
|
# ¿ Dec 12, 2008 21:28 |
|
Just make a 1024x1024 texture, and draw just set the UV coodinates on your 1024x768 quad to keep from stretching. You don't have to utilize the whole thing texture.
|
# ¿ Dec 15, 2008 18:15 |
|
Avenging Dentist posted:Savagely optimize it and put other (small) textures in the space that would be offscreen for the overlay. or split your overlay into multiple pieces, compact the texture to as small as it can go, and draw multiple quads per pass
|
# ¿ Dec 16, 2008 07:56 |
|
just keep cutting stuff until the framerate goes over 1fps
|
# ¿ Dec 18, 2008 10:43 |
|
I've got a model that rotates along the Y axis and that model has a bounding box defined by a maximum and minimum point that I would like to follow it. I thought that simply transforming the two points by the same rotation matrix would do it but apparently it doesn't work that way. Bounding box without rotation: After rotation: Any ideas on what I actually need to transform it by to keep it inline?
|
# ¿ Feb 13, 2009 00:41 |
|
The bounding box is already computed per-frame and is interpolated inbetween. I'm simply performing a rotation about the Y axis on the model's world matrix. In fact, this method does in fact work when I transform the bounding box's physical geometry, but I need to get the actual values for my collision testing. edit: I suppose I might as well provide some code. This is the code that sets the position of each of the drawn bounding box's positions: code:
code:
MasterSlowPoke fucked around with this message at 02:04 on Feb 13, 2009 |
# ¿ Feb 13, 2009 01:54 |
|
Ah, of course. Rotating two points won't give me an OBB, and that wouldn't work for my collision detection regardless. Thanks. efficiency MasterSlowPoke fucked around with this message at 13:40 on Feb 13, 2009 |
# ¿ Feb 13, 2009 12:56 |
|
This is how I do a FPS camera. It's in C# but you should be able to translate it.code:
|
# ¿ Feb 17, 2009 03:41 |
|
Looks fine to me. Why are you creating the projection matrix every frame, though?
|
# ¿ Feb 17, 2009 04:47 |
|
Use an unprojection matrix to get the world space coordinates for your quads.
|
# ¿ Mar 6, 2009 08:09 |
|
Rendering a heightmap would be a pretty easy way to make your own landscape.
|
# ¿ Aug 13, 2009 15:06 |
|
|
# ¿ Apr 28, 2024 22:46 |
|
How about you simply compile it for release and profile it there?
|
# ¿ May 3, 2011 05:30 |