   Highlighting a 3D Object [DirectX]
  Hi guys,I'm using MFC and DirectX 9.0. What I want is pretty simple. I'm loading mesh from .x files in a 3d world and I already got a ray to pick the mesh objects. But, I'ld like to "highlight" the select object. Like highlighting the wires of the object in yellow.Any ideas how? I'm not using sprites here, only loading meshes with D3DXLoadMeshFromXThanks :)Bbs   
  Basically, you will need to invert the matrices transformations by pickingSay normally you turn (leaving out object space) from world space to view space to  clip space, to get a 3D world on a 2D screen, well do it backwards. I am not too sure of the details, but google "Picking 3D Objects"   ;Quote:Original post by XpyderBasically, you will need to invert the matrices transformations by pickingSay normally you turn (leaving out object space) from world space to view space to  clip space, to get a 3D world on a 2D screen, well do it backwards. I am not too sure of the details, but google "Picking 3D Objects"I'm already able to pick up the object...I just need to "highlight" it over all other objects. This would be much more user friendly for my editor :)   ;  Oh right sorryMaybe you could set a light on that object so it glows in some way, or write a pixel shader to highlight it for you?(grasping straws now, sorry but theres at least a chance it will help)   ;  Maybe draw the bounding box?Use a nice bright red or green to stand out against your background.   ;  hi,you can simply draw the selected objected twice,once normal, and once in wireframe modewith the color set to yellow, or whatever you want...MarcEDIT:I've hacked a sample:http://img420.imageshack.us/my.php?image=drawingsample5tc.pngOne thing you will notice here is z-fighting...perhaps you have to disable depth testing beforerendering in the wireframe mode...   ;  perhaps drawing another instance of the mesh, in wireframe mode?  maybe scale it up just slightly so it stands out from the model a touch?   ;  Turn on wireframe mode, change textures to zero and re-render? If you look up a cel-shading tutorial, it'll tell you how to outline a mesh. You could render the objects bounding geometry in wireframe. You could re-render the mesh in a different colour...   ;  I'm trying the wires way, but here's a dumb question...I've been working with DX since 2 months but I don't know how to rescale a mesh... :/   ;  Just add a scaling matrix to your world transform. In Managed DirectX you can obtain such a matrix using Matrix.Scale, I'm sure C++ DirectX has something similar.   