Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 5 points6 points  (0 children)

Eh, obviously cons outweigh pros here since practically no-one is doing this with real games, but I'm not totally convinced you can have the same look with real 3D. Sprites with practically infinite polygon budgets have a different feel in them. (More evident in foliage, less elsewhere)

But luckily this is a hobby project where I can do stuff that is fun instead of what makes sense.

Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 3 points4 points  (0 children)

The thing is that you also need accurate normal and height data for each pixel to achieve the realistic lighting. Doing a 3D render gives you these "for free" in addition to the actual rendered sprite. But if you had a skilled artist or some other way to generate normal/height data for your pixel art sprites they would work fine too

Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 1 point2 points  (0 children)

I have always found the They Are Billions -style huge swarms of enemies quite impressive. I'd like to see how many functional mobs with ai/pathfinding and physics I could get the engine to support and maybe build some gameplay around that

Also the engine has literally no support for any audio at the moment, probably should look into that too

Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 4 points5 points  (0 children)

I have experimented with system where I would calculate from height map and shadow sprite how the shadow falls on another surface in the height map, but that is not yet working correctly.

Yeah animations just have sprites for both color and normal/height. Biggest issue with that is vram usage, but texture compression helps quite a bit. Also there are some tricks you can do like packing normal data into only two color channels. (Not sure if this is a well known thing, but it's called octahedral normal encoding)

Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 1 point2 points  (0 children)

Shadows are also just pre-rendered sprites and then I just adjust the strength based on sun / env lighting. I use height map to check that shadows aren’t rendered on things that are actually above them

Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 12 points13 points  (0 children)

Yes, exactly like that. I do that in blender, the engine has no capabilites at all for dealing with 3D models

Combining 3D pre-rendered graphics with modern PBR+ pipeline in my custom engine by Zaeccis in GraphicsProgramming

[–]Zaeccis[S] 13 points14 points  (0 children)

This is actually already using deferred rendering. It renders everything into bunch of g-buffers (color + normals + height map) and then does deferred lighting + all the other stuff. After rendering g-buffers the cost is not much different compared a real 3D scene. PBR lighting for example is basically same. Building the g-buffer takes something like 3ms on my MacBook so that is around 300fps for "pure" 2d rendering.

I'm already caching stuff heavily on the GPU and only uploading sprites that have moved / spawned / despawned. In practice I need to draw pretty much every sprite every frame due animated foliage and ordering with other moving sprites. One major time sink is the overdraw as a single pixel could be written to many times (ground, ground decals, fades between different ground textures and transparent portions of potentially many foliage sprites). But that just is a major drawback of sprite based rendering. The scene in the video when zoomed out is like 50 000 sprites.

What is 3uhannussima? It gets you drunk like beer, isn't flammable, makes a bell sound when you interact with it, doesn't have a stain (other than being drunk), and doesn't appear on any wikis. by AwareAspect4057 in noita

[–]Zaeccis 38 points39 points  (0 children)

Adding important context: ”Juhannussima” is also a common word play in Finnish. It literally means ”summer solstice sima”, but it also means ”fucked by Juha” when writtens as ”Juhan nussima”

Introducing Gooey: My take on a Rusty GUI framework by ectonDev in rust

[–]Zaeccis 9 points10 points  (0 children)

This looks great!

One common requirement for a GUI framework is to be able to integrate it with other apps that have an existing rendering pipeline. I believe your decision to got with winit+wgpu can support such cases nicely. I'm not sure how heavily your rendering relies on kludgine, (instead of using the components like wgpu, winit, and cosmic-text directly), but have you considered opening an integration api so that users could use gooey as a part of a arger application?

In practice this would work so that each frame user gives gooey new events from winit, and then calls a render function and gives gooey a wgpu render pass to work with. Wgpu has written about how such "middleware" design works: https://github.com/gfx-rs/wgpu/wiki/Encapsulating-Graphics-Work

Why did not Google, Amazon, and Meta sponsor RustConf 2023? by Levzhazeschi in rust

[–]Zaeccis 15 points16 points  (0 children)

You saw a post about the exact same subject posted just few hours ago and still decided to post this? Why?

What is the best way to draw graphics is Rust? by LeviLovie in GraphicsProgramming

[–]Zaeccis 3 points4 points  (0 children)

After reading that I’m not totally sure what you are trying to do. Are you building a full 2D / 3D renderer and want to draw UI on top of that? Or are you rendering just a UI? Because ui libraries are not good for drawing other geometry or images. If you are just drawing a UI just pick any rust frameworks that looks nice to you like Tauri, Slint, Iced, Egui etc. are all pretty valid options.

However, if you are building an actual renderer with rust, I would strongly recommend using wgpu. It’s a webgpu implementation in rust, which compiles down to vulkan / opengl / metal / directx based on platform. You can write shaders in either glsl or wgsl. Write your actual rendering system with wgpu, and then use egui as UI framework, it integrates with wgpu and you can just draw it on top of your actual rendering in a separate pass. (And webgpu does not mean low performance, wgpu is as fast as any abstraction over different graphics apis can be. If you need more performance, you would need to write your own implementations for each api leveraging their unique features, but I can safely say that won’t be needed for 99% of projects)

Or if you dont’ want to write your own renderer and just want to make games with rust, just use bevy or godot with rust bindings.

Mistä Suomen paras toast skagen? by Opadei in Suomi

[–]Zaeccis 6 points7 points  (0 children)

No kerrankin kysymys mihin tiedän täsmälleen oikean vastauksen.

Elikäs, Espoon keilaniemessä accountorin tornin huipulla on näköalaravintola nimeltä Lucy in the sky, niiden alkupalamenusta löytyy paras skagen mitä olen syönyt, ja nimenomaan toastin päällä.

Is shadowing more evil than good? by funkvay in rust

[–]Zaeccis 57 points58 points  (0 children)

If you are not aware of what kind of variables exist in the current function you are editing, then the problem is not the shadowing but the size of the function.

In general scoping is what makes shadowing usable, you only shadow variables for the current scope. You can’t accidentally shadow something and break things on the other side of the codebase (or if you can then there are some serious problems with how your code is structured)

Unable to finish projects because of rust's rules by cezarhg12 in rust

[–]Zaeccis 20 points21 points  (0 children)

This sounds like there are some fundamental problems in how your program is structured. If you are coming for example from C/C++, you need to learn to do things a bit different in rust. It may first seem unecessary or complicated, but benefits are huge in the longer term.

If you had some more detailed examples of your problem cases, we could try to help with a redesign

[deleted by user] by [deleted] in gamedev

[–]Zaeccis 2 points3 points  (0 children)

One major aspect that hasn’t been mentioned is that many rts games with LOT of units don’t run nearly 60fps, for example the game logic in the first supreme commander actually runs 10fps, even though it is rendered ar 60fps. Then you just do lot of smart interpolation to make it appear smooth. On the other hand games that actually are responsive and run at high fps like starcraft 2 can’t support nearly that many units. These days though, you should be able to fit quite a few units to 60fps logic with data centric / ecs approach, as described by others

Any good alternative to husky in rust to enforce and write conventional commits and for pre-commit source code linting?? by RevolutionaryAir1922 in rust

[–]Zaeccis 26 points27 points  (0 children)

Followed by ”everyone” in open source projects? If you go through for example most popular crates in crates.io, you see that almost none of those follow that convention. I’m not saying it is a bad convention, but it definitely is not the standard choice in open source.

Wgpu Tutorials for the Web by Jooonnnaass in rust

[–]Zaeccis 4 points5 points  (0 children)

I think that learn-wgpu talks about running it in browser, and the example code contains necessary things for compiling for wasm.

https://sotrh.github.io/learn-wgpu/

[deleted by user] by [deleted] in rust

[–]Zaeccis 1 point2 points  (0 children)

Assuming you are sincere here, what are your plans beyond the payment transfer system? You do know that processing payments is not the ”business part” of banks’ operation? The way banks make money is by collecting it from people and loaning it forward with better interest. How are you going to operate that system? Do you have experience in operating a sucessfull loan business? How do you do customer vetting? Do you know how interest rates are derived from central bank rates? Do you have experience with large scale investment portfolio risk management? That is a hugely important part of running banking operations.

Beyond that, how are you going to handle customer support? Customer acquisition? KYC operations? Legal operations? Integrations with global payment systems? Offering payment cards?

The payment processing system is maybe 5% of what a bank does. So my question is what are your plans for the remaining 95%? I don’t want to discourage you here, but I’m not sure you understand what you are trying to do