direct3d

Debugging a Direct3D Model

I am trying to render a model in Direct3D using DrawIndexedPrimitives. However, I am not able to see it on screen. What are the usual methods used to debug a Direct3D model? I've tried the following: Switched off back face culling Used PrimitiveType.LineStrip instead of PrimitiveType.TriangleStrip Several combinations of View and Proj...

Defining Up in the Direct3D View Matrix when Camera Is Constantly Moving

In my Direct3D application, the camera can be moved using the mouse or arrow keys. But if I hard code (0,1,0) as the up direction vector in LookAtLH, the frame goes blank at some orientations of the camera. I just learned the hard way that when looking along the Y-axis, (0,1,0) no longer works as the Up direction (seems obvious?). I am ...

3D Geometry: Transform One Pair of Points to be Aligned Parallel to Another

I have a line (actually a cube) going from (x1,y1,z1) to (x2,y2,z2). I would like to rotate it so that it is aligned along another line going from (x3,y3,z3) to (x4,y4,z4). Presently I am using Math::Atan2 along with Matrix::RotateYawPitchRoll. Any better ways to do this? Edit: I think I've worded this post very badly. What I am actuall...

Direct3D: Wireframe without Diagonals

When using wireframe fill mode in Direct3D, all rectangular faces display a diagonal running across due to the face being split in to two triangles. How do I eliminate this line? I also want to remove hidden surfaces. Wireframe mode doesn't do this. I need to display a Direct3D model in isometric wireframe view. The rendered scene must ...

Direct3D over Remote Desktop

How can I get Direct3D to work over a Remote Desktop connection? I am using Windows XP Professional. ...

Direct3D Output on a Printer/Plotter

What is the best way to send Direct3D output to a printer or a plotter? ...

Direct3D Geometry: Rotation Matrix from Two Vectors

Given two 3D vectors A and B, I need to derive a rotation matrix which rotates from A to B. This is what I came up with: Derive cosine from acos(A . B) Derive sine from asin(|A x B| / (|A| * |B|)) Use A x B as axis of rotation Use matrix given near the bottom of this page (axis angle) This works fine except for rotations of 0 (which...

Why Direct3D application performs better in full screen mode?

The performance of a Direct3D application seems to be significantly better in full screen mode compared to windowed mode. What are the technical reasons behind this? I guess it has something to do with the fact that a full screen application can gain exclusive control for the display. But why the application cannot gain exclusive contro...

Microsoft.DirectX.Vector3.Normalize() inconsistency

Two ways to normalize a Vector3 object; by calling Vector3.Normalize() and the other by normalizing from scratch: class Tester { static Vector3 NormalizeVector(Vector3 v) { float l = v.Length(); return new Vector3(v.X / l, v.Y / l, v.Z / l); } public static void Main(string[] args) { Vector3 ...

Transform a Direct3D Mesh

I tried to write a TransformMesh function. The function accepts a Mesh object and a Matrix object. The idea is to transform the mesh using the matrix. To do this, I locked the vertex buffer, and called Vector3::TransformCoordinate on each vertex. It did not produce expected results. The resulting mesh was unrecognizable. What am I doing...

Pass texture using pointer across process

It's hard to put this into the title, so let me explain. I have an application that uses Direct3D to display some mesh and directshow(vmr9 + allocator) to play some video, and then send the video frame as texture to the Direct3D portion to be applied onto the mesh. The application needs to run 24/7. At least it's allowed to be restarted...

3d files in vb.net

Hi, I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction. What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the 3D file into ...

Managed Direct3D or XNA for non-game related 3D graphics programming?

Which is the preferred approach for doing .NET 3D graphics programming: Direct3D or XNA seem to be the current technologies, but which is best for non-game related programming? Also, has Managed Direct 3D been discontinued? XNA doesn't really seem to be appropriate for non-game development. ...

SDK for Avatars (such as Wii, XBOX 360 avatars)

What are some software packages available to provide 90% of the avatar functionality for my games? My favorite is xbox's Avatar system (but I want it in my PC games). I need the ability to customize the looks of a person (body, clothes, etc...). ...

Polygon Triangulation with Holes

I am looking for an algorithm or library (better) to break down a polygon into triangles. I will be using these triangles in a Direct3D application. What are the best available options? Here is what I have found so far: Ben Discoe's notes FIST: Fast Industrial-Strength Triangulation of Polygons I know that CGAL provides triangulation ...

How do you build the Windows D3D9 refrast from source?

Microsoft distributes source code to reference implementations of their different Direct3D APIs to hardware vendors, driver developers, etc. This code builds using the ever-cryptic WDK (formerly DDK) build system, and virtually never works out-of-the-box. Though widely used, this code is semi-private, so there is never any basic helpful ...

Report Direct3D memory usage

I have a Direct3D 9 application and I would like to monitor the memory usage. Is there a tool to know how much system and video memory is used by Direct3D? Ideally, it would also report how much is allocated for textures, vertex buffers, index buffers... ...

Mesh rendering using Octree algorithm

Hi Guys, I'm the founder of SceneMax - a 3D scripting language since 2005. I want to add a scene rendering using one mesh object built with 3d package like 3ds max and splited by octree algorithm for optimized performance. Do you know where can i find such algorithm which takes a mesh .X file,split it to nodes (octree) and knows how to r...

Direct3D9ex and Direct3D10 resource sharing

It is possible, with the Direct3D9ex, to share resources between devices. Is it also possible to use those shared resources with Direct3D10 devices? ...

Direct 3D affecting data type double

I recently added some DirectX code to my program, and now my double data type variables only have the range/resolution of a float (.. or atleast less range/resolution than they used to). If I remove the direct3D initialization - "Direct3DCreate9(D3D_SDK_VERSION)" - the problem goes away. Any insight? Thanks. ...