Vulkan advanced render design [closed] - c++

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).

Related

How to render text in OpenGL menu-system smartly? [closed]

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 want to make a simple windowing system in an OpenGL app. Rendering menus with text-boxes, buttons, check-boxes, etc. How do I render this smartly?
So far I have 2 ideas:
In each frame I render every character of the menu to the screen.
I keep the menu/window in a texture, and render only this texture each frame. (and only update the parts of the texture that have changed.)
What are the downsides of each?
Start with the first bullet, then maybe implement the second bullet later as an optimization. The second bullet is sometimes known as "framebuffer caching". Note that Dear ImGui (a very popular GUI library that can use OpenGL for rendering) does not bother with framebuffer caching.
If you decide to implement framebuffer caching, the work you did in the beginning will not be wasted, since you will use it to update the cache.

Store static environment in chunks [closed]

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 5 years ago.
Improve this question
I have terrain separated by chunks and I would like to put environment (For example, rocks, trees, etc..) in each chunk randomly.
My question is related to how to implement such system in OpenGL.
What I have tried:
Solution: Draw the environment with instancing once for all the terrain (not a specific chunk)
Problem: I except the chunk to sometimes take a bit to load and because I am using threads the environment will appear as floating.
Solution: Draw the environment with instancing for each chunk.
Problem: To draw each chunk, I will need to bind the VBO for the chunk, draw the chunk, bind the VBO for the environment (and the VAO probably) and draw it.
I don't want to put so many glBindBuffer functions because I heard it is slow (Please correct me if I am wrong)
(Not tried) Solution: Somehow merge the vertices of the terrain with its environment and draw them together.
Problem: My terrain is drawn with GL_TRIANGLE_STRIP so this is a first problem, the second problem(?) is that I don't know how well it will function (talking speed).
I tried looking up solutions on the internet but didn't seem to find any that relate to chunks.
Anyone know how other games that uses chunks do that? Is there a way to do it without causing a lot of speed decrease?

Standard method to import and use animations in OpenGL [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am about to hire a 3D artist to work on some animated models that will end up filling a 3D world made with OpenGL. What is the standard way of exporting animated models? If there's no standard way, could you list some options? I can't find any exhaustive reference about this subject.
Also, is it equivalent if he will use 3DSmax, Maya or Blender, in terms of what is going to be possible to achieve and the complexity to achieve it with OpenGL?
Assimp library can handle a lot of 3D model formats. Like in the comment section was mentioned, there is no standard way. Their are a plenty of 3D model formats out there. This tutorial series is a good start learning OpenGL. Tutorial 22 and 38 is about 3D model loading and animation.

How to handle backbuffer in Direct3D11? [closed]

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.

Best way to learn about Direct X [closed]

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.