Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to begin looking at Direct X, but don't just want to try and throw myself into it. What are some good resources to get ones feet wet?
I highly recommend Toymaker's tutorials. Helped me greatly when I was first starting out with DX and was just as good as a reference later on.
The other thing to do would to set up some small projects that use DX that increase in difficulty as you go. If you'd like a starter list (from easy to hard):
Compiling using DX libraries (I always remeber having trouble linking the libraries correctly in Visual Studio).
Change background colour.
See a model on-screen.
Moving the model with input.
A camera.
Apply a texture to your model.
Add multiple models to your scene.
Add lighting.
Create your a simple rectangle model and display a texture on it.
Get comfortable with all that and then have a look at shaders, advanced lighting and animation.
There are quite a few books on directX, but there is so much freely available information on the web these days, I would just jump right in there.
A good place to start is just to do a youtube search for DirectX Tutorials. In my opinion, this is a fun and interesting way to get started learning a new dev skill.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I've finally managed to make it through the basic concepts of vulkan and have some knowledge of primary/secondary commandbuffers, renderpasses etc. Now I was wondering how one would design a more advanced render engine(not like the simples ones from the samples)?
Let me ask it more specifically:
If I would want to render a small village(a few houses) containing some villagers, which are animated using skeletal animation, how would the design approach look like? Would you create two Renderer classes, one for the villagers, one for the houses, each generating a secondary commandbuffer for each object? And if so, how would one make proper use of multithreading? And if, lets say, every villager has its own pipeline(different textures, bonelayouts, etc), how would one manage those?
Edit: I'm not searching for "the render engine", I just want to know how one could make effective use of multithreading then rendering a scene with different "types" of models(NPCs, houses, terrain).
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Recently,i want to learn a book named Tricks of 3D Games Programming Gurus.It used DDraw to implement a soft render engine.But DDraw is to old.I want to use Direct3D11 to do the same things.So i got the texture of the main backbuffer,and update it.But it didn't work,what should i do?
You don't have direct access to the true frontbuffer/backbuffer even with DirectDraw on modern platforms.
If you want to do all your rendering into a block of CPU memory without using the GPU, then your best bet for fast presentation is to use a Direct3D 11 texture with D3D11_USAGE_DYNAMIC, and then do a simple full-screen quad render of that texture onto the presentation backbuffer. For that step, you can look at DirectX Tool Kit and the SpriteBatch class.
That said, performance wise this is likely to be pretty poor because you are doing everything on the CPU and the GPU is basically doing nothing 99% of the time.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I need to convert text (string+font) into mesh (vertices, indices, triangles etc), but I don't need to draw anything. I'll just get a string from one API and push it as vertices & indices to another. What's the simplest/easiest/best way of doing this? Font metrics and text placing are of course available and no other transforms are needed.
I'm currently working with VC++. However, any kind of OpenSource (C/C++, C#, VB,...) and "non-open but free" COM/.NET -libraries would be great.
I've heard of FreeType. Does it answer my prayers or is there something even better?
EDIT: As Nico Schertler commented, there seems to be Mesh.TextFromFont -function in DirectX -libs that probably does the trick. Thank you Nico! I'll update when I have time to test this in practise.
Mesh.TextFromFont sounded good but it didn't save the day since I couldn't figure out how to get the actual point/triangle data from the mesh -object.
But then I found this. In this project, GraphicsPath is used to create a point-path from a glyph. Then the points are coverted into Polygons and the polygons are then tesselated into triangles using Poly2Tri.
A quick browse through the source code and with some small modifications and code stripping I ended up with a nice .NET -dll with one simple static function that does everything I need.
To convert a text into a mesh you can use the ttf2mesh library. This library consists of just one C-file and allows to open truetype font (.ttf) and convert it glyphs to a mesh objects in 2d or 3d space. There is an examples in the repository.
An interesting feature is the lack of dependency on any third party library (like libfreetype). Also in the examples there is a ttf2obj program that allows you to convert a font file to an OBJ file.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am looking for advice on algorithms that would allow me to recognise an image patch of a hand. So given an image, I would like to extract patches that would belong to a hand (those will be positive patches). Everything else would be negative patches.
My target application is to distinguish a hand (of any hand shape) from other objects without using colour, by being able to identify if a patch belongs to a hand..
The figure below depicts what I have in mind,
The only problem with hands is that it can take any shape form. Are there any suggestions or algorithms to do the above?
Thank you in advance.
This is a very broad research topic, so you are unlikely to find any good example software available, but you are likely to find many research papers in this area, and if you are lucky then you might find some where the authors publish their code.
You've given a picture of a cat, so taking that as inspiration I did a quick search and found this paper from the Andrew Zisserman group at Oxford University. Another group to look into is that of Jitendra Malik at University of California at Berkeley who have an interest in this area using a combination of image segmentation and feature detection.
Depending on your motives search terms could include: deformable shape models, skin segmentation (although you say you don't want to use colour - why not?), object detection. The possibilities are numerous, and they are all current research topics throughout a number of computer vision communities.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have a problem while running my game. The model that I import in the game is quite big, making the fps drop down. That's okay but when I get the camera off from the model, it still stays slow. As other games do, when looking at a high resolution model, the game slows down but when not looking at it, it gets faster. However my game stays slow all the time. Can anyone help me?
You need to implement clipping, so that you don't render the object (i.e. pass it through the graphics pipeline) when it's not visible.
There are many techniques and algorithms/data structures for this, ranging from manual view frustum-testing, to more advanced spatial-querying data structures (BSPs, quadtrees, octrees and so on).