Announcements regarding our community

Hang out on our Discord?

here's an updated link! I set this one to not expire, hopefully that works? https://discord.gg/5EVb3w7

read more

A place to talk about whatever you want

GRUE DORF

If you look in the Blogs section of this site, you might see activity!

People are posting dev blogs there!

You can join us! By posting one update every seven days (or fewer) about your project!

That's it. That's GRUEDORF.

You need neither be GRUE nor DORF to GRUEDORF.

Come! Join us!

read more

Got a question? Ask away!

Blog category?

New rule: Blogs category also is for all gruedorf posts.

read more

Blog posts from individual members

Coolcoder360's Devlog/updates thread
C

I had written a massive update about choosing an audio library and all that, but then Windows update ate it, so instead I'll write about the other half of what I was going to write, and save the audio stuff for some other time, like when I'm actually at that point of the project.

I'm currently working on the rendering stuff, the way my engine works is there's a Rendering thread, and an Update thread, and they need some way to synchronize between them.
I had read at some point a series of articles on making a multithreaded renderloop, which I've been referencing and can be found here. This is the second entry, but it has the most exciting diagrams of what is going on, as well as discussions on how to resolve some issues with it, related to jitter, or a lack of smoothness caused by one thread going significantly faster or slower than the other, and frames being skipped over.

The reason I'm going with this method is because I need a way to basically take a snapshot of the state of everything, and then chunk it into the render thread, if I use a query like I sort of have been doing right now, there is the possibility for the update thread to remove nodes while the render thread is trying to render them, which could be the case on some of the unexpected crashes I've had some trouble resolving and reproducing.

So to avoid issues with my update thread changing/removing entities while the render thread is rendering them, I'm creating a RenderState class, which will basically hold a set of vectors, one for shared pointers to all opaque 3d objects, and one for all transparent 3d objects, the opaque objects will be sorted front to back, and the transparent 3d objects that require blending will be sorted back to front.

This sort is done to optimize for the corresponding shaders, while still allowing transparent objects to be drawn in the proper order.

Then the rendering thread selects a render state that is updated from the update thread most recently, and renders that.

I'm planning to use a partial deferred renderer, where the opaque objects get rendered through a deferred pipeline, allowing them to be lit with a ton of lights, while the objects requiring transparency are rendered using a forward renderer, I believe this would allow me to also use deferred decals on all of the opaque objects, I'm sure a simple quad mesh decal will be sufficient for objects requiring transparency for now.

This whole rendering plan is subject to change of course, I've done a bit of research on Global Illumination and I suspect I'll have to basically completely redo the whole renderer in order to support global illumination, but I have a deferred renderer that sort of handles PBR already working, only issues are it doesn't do any IBL (Image Based Lighting) or reflections yet.
Gonna work with what I already have for now and perhaps just scrap what I have now in favor of something I create later that can do Global Illumination, I'm eyeing some form of Voxel Cone Tracing, just haven't figured out if it works well for transparent objects or not, most examples don't seem to have much in the way of transparency, so I'm hopeful but unsure of how to handle transparency with Global illumination. Who knew rendering could be so painful.

Hopefully will be able to have something spewing triangles to the screen within a week or few so I can provide some more interesting screenshots.

read more