• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Development] My first engine

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
Obviously with experience in a field it will be much easier to know before hand the basic requirements of a project, but I can say for one that every time I tried to design something beforehand, it had nothing to do with reality.
Not to mention that you end up having endless problems with this pre-design that wasn't actually based on anything, and suddenly your "perfectly structured" design doesn't actually fit in reality, and you end up refactoring half of it.
But again, I assume this gets less obvious when you are doing the same kind of projects for a long time, which is probably not the truth for any of us here.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
might wanna get rid of all the shadows that stuff requires too much resources

No, they are not? You just need to make sure you're not using them brainlessly (don't give an omnidirectional light so small, that its shadow wouldn't even be visible, shadows), and they're really aren't that costly. You can even get fairly cheap soft shadows that look appealing.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Seeing how modern GPUs have over a teraflop of processing power some shadows hardly will cause problems. In fact most of the bottlenecking will occur on the CPU since until D3D 12 it is hard to optimize rendering to take advantage of multi-core processors, especially due to the bulky driver code.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
Well, I'm an OpenGL user and know very little of D3D, what I do know though is that they're so similar that their problems are in fact the same, so I can use my experience here too.

Yea, you're right about CPU being the bottleneck - most of the time the problem with shadows is not on the GPU's side, but rather, it's the time spent on validation and preparation for the draw commands, and with buffer binding and other costly housekeeping. But calculating the actual shadows is fairly cheap (okay, PCF soft shadows with a large enough kernel can be quite expensive, and they are not even that good), so if you can optimize your renderer well enough to minimize the number of state changes and draw calls, then shadows add little to no frame time.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
what I do know though is that they're so similar that their problems are in fact the same, so I can use my experience here too.
Until D3D12 which is totally rewriting the API (again...) so that it is more optimized for hardware and not being easy to program. The results are massive performance boosts as previously complex operations with heavy driver traversal become simple calls.

Emphasis is on providing access to GPU resources and states rather than abstract entities representing arbitrary GPU functions. Not only does this save on a huge amount of driver overhead (needed to align the abstract entities into functional GPU behaviour) but also allows better concurrency (as the resources are concurrently separate so can be invoked from separate threads in parallel). It also allows optimized GPU behaviour not possible with OpenGL (current) and current D3D since it can cut out on the abstraction overhead and allow shortcuts in state previously not possible.

You can see this performance with the XBO (AMD specific extension library for graphics) and PS4 (the same AMD specific extension library for graphics, heck the chips are practically the same...). You can also get it on PCs using AMD cards (AMD offers you the libraries to program for, not good for portability due to Nvidia cards not supporting) and Nvidia cards (I think Nividia does the same, but this is aimed for performance critical systems and not general use). D3D12 is only brining this as a standard to both. OpenGL may be planning something similar at some stage but due to Linux support I am not sure how well that will be done.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The same things (which were requested years upon years ago by the OpenGL community) will be implemented probably at the next version of OpenGL (or OpenGL 5?).
Some of them are already available as Nvidia extensions.
Many other things that were actually supposed to be implemented back when OpenGL 3 was called Longs Peak, and was supposed to be a complete rewrite of the specifications (which never happened, to the dismay of...everyone) are finally happening too.
Seeing how OpenGL doesn't move anywhere with all their reluctance to actually change anything major, and is still fully based on an API from the nineties and not based in any way on how hardware actually works today, I fully support D3D getting major rewrites, even when I don't like it or Microsoft.

Either way, none of these posts are related to the topic...
 
Level 10
Joined
Sep 14, 2007
Messages
227
Yea right... I don't know why u even started this conversation about shadows. But I agree with Dr Super Good, shadows is must feature in games. By the way, shadows deosn't require that much of the gpu, all they do is rerender all screen with very optimazed shaders without all bumps/normals, speculars, diffuse that makes it very fast and honestly I have no idea how can u make this system insufficient. In addition to this, this kind a technique used also by outlines, sprites(I guessing)...
 
Status
Not open for further replies.
Top