#Rosy

1 messages ยท Page 2 of 1

cloud rivet
#

so I don't send it separately

#

I don't have any vertex buffers

#

the space limitation is on the push constant

#

I can stick only so many buffer addresses in 128kb

wraith urchin
#

Yeah the jpgs are annoying because they're gonna be recompressed

brisk chasm
#

you can always split your draws you dont have to force yourself to stuff everything into 1

dry apex
#

just import -> export it in blender

#

i suppose there would be some addon to do the jpeg->ktx2 transition as well

brisk chasm
#

gltfpack ;p

#

jaker and i cobbled together some functionality which is in blender's gltf export plugin (4.1+), not blender itself

#

you go to the gltf export plugin options and set the path to your gltfpack, that enables an option to export to ktx2

#

you can provide another path there it will put the ktx2 files into that folder, while keeping the originals

#

its pretty crude

dry apex
#

wow neat

brisk chasm
#

i should probably talk to don mccurdy to have this jank removed again and properly replaced

wraith urchin
#

Honestly though it should be illegal to distribute a texture as a jpg

brisk chasm
#

the big modelling tools should just export ktx2/dds

#

your raw artist stuff can be whatever you want

#

ah speaking of that, you can select webp there as well when you export, thats where we should have hooked our shit in, and extend the dropdown list with ktx2, now that i think about that

wraith urchin
#

Unfortunately gpu compression is hardware dependent, so png is kinda the only sensible option

#

Or exr

brisk chasm
#

ktx2/dds are very portable still

wraith urchin
#

But they use compression no?

brisk chasm
#

maybe have a format or two for mobile fones too

#

ktx can be compressed

wraith urchin
#

Yeah I thought it was always compressed?

brisk chasm
#

its all in the ktx-software sdk, which could just be part of the tooling

wraith urchin
#

Maybe not

brisk chasm
#

so no excuse not to have that ๐Ÿ˜›

#

as a tool like houdini/blender et al

wraith urchin
#

I just use png then the engine creates optimized formats on import

brisk chasm
#

i want that too, im also not happy how i do it in HowToScript atm

#

im iterating images, then samplers, then textures, then materials, then meshes... but that is somewhat weird, because in order to know what target format for transcoding an image later, i need to know for what material channel that image will be

#

that means i need to do that in a diffeernt order or do it in 2 passes of sorts

wraith urchin
#

I also create an optimized mesh format, so I don't even look at the gltfs after import

brisk chasm
#

yeah that would be next after getting that material shit right ๐Ÿ™‚

cloud rivet
#

so that's not an issue for my project

wraith urchin
#

Its optional tho afaik

cloud rivet
#

I want that though

wraith urchin
#

it depends on the hardware

cloud rivet
#

hrm

wraith urchin
#

PCs support BCn

#

Mobile usually ASTC or whatever

cloud rivet
#

yeah I don't worry about mobile I guess

#

if amd and nvidia support it :/

#

based on what others have said about tiling gpus you write engines differently for mobile games anyway? I don't know anything about mobile, and little about anything else

wraith urchin
#

Yeah thats fine I just don't think models should be distributed with compressed textures

cloud rivet
#

oh

#

I agree

wraith urchin
#

like if its in the game compress the shit out of that

cloud rivet
#

yes give me the full 8k thing

wraith urchin
#

unfortunately polyhaven usually ships the albedo as a jpg

#

although it is an 8k jpeg

cloud rivet
#

I am going to try and create all of my own visual assets ๐Ÿ˜…

#

no off the shelf stuff

#

idk how animations will go

wraith urchin
#

I usually lanczos those 8k things down to 2k

cloud rivet
#

sound I will have to get from someone I don't have any sound talent

#

or somewhere

cloud rivet
#

it will probably not look very good but with time I hope to get better

wraith urchin
#

Honestly I'm trying to use less of my own art but I keep failing at it

#

and making my own shit

cloud rivet
#

I want to make all that stuff

#

I want to get good at blender, houdini and marmoset, which is like a cheaper substance painter

wraith urchin
#

I just do everthing in blender

cloud rivet
#

a dedicated materials painter seems really worthwhile

wraith urchin
#

probably

cloud rivet
#

and houdini automates a lot of slick looking geometry for buildings and stuff

wraith urchin
#

I don't like switching between apps if possible though

cloud rivet
#

marmoset would be where I bake

#

it would be the last link in the asset toolchain before I process the output

#

it has comprehensive baking config and a python API to hook into it

wraith urchin
#

cool

cloud rivet
#

I haven't used it much

#

just watched the videos

wraith urchin
#

I finally have a good workflow for baking in blender, but it was a pain to figure it out

cloud rivet
#

I am just getting started with all this and don't know much about it all yet

wraith urchin
#

One of these days I will write an article on baking in blender, for the frog blog

cloud rivet
#

that would be awesome

true moon
#

Just start making shitty stuff in blender

#

Once you've developed your workflow you can start making it look prettier

#

But trying to get the pipeline down to make high quality assets from the start will take forever

wraith urchin
#

Yeah figure out how to model first I would say

cloud rivet
#

Yeah it will not look great at first

slim oak
#

don't recommend shit + blender, unless you put on the lid

wraith urchin
#

lid?

cloud rivet
#

What do those words mean?

slim oak
#

not blender as in 3D modelling software, but blender as the thingy you make smoothies in

wraith urchin
#

Ok I get it lol

inner warren
#

add camera then models then see if you fucked up

#

thats how I did it

cloud rivet
#

or...no camera, no models no chance of fuck up smart

inner warren
cloud rivet
#

so just adding imgui didn't meaningfully impact frame time

#

just want to keep tracking as I add things

#

frame & build time

#

ok on to loading models

cloud rivet
#

that was kind of easy

#

I'm going to just draw a triangle from this file and then try and load a gltf parsed with fastgltf and then sponza

wraith urchin
#

Nice, good luck on sponza froge_love

#

also I feel like I'm obligated to tell you the the plural of index is indices

cloud rivet
#

true

#

I will rename

#

oh I should gzip

wraith urchin
#

gzip what?

#

the model?

cloud rivet
#

^^ I am writing my own binary format there with just vertices and normals atm

wraith urchin
#

Are you familiar with lz4?

cloud rivet
#

no

wraith urchin
#

Extremely fast decompression & compression

cloud rivet
#

I will use lz4

wraith urchin
#

I use it for most of my custom formats

cloud rivet
#

thank you

#

also

#
Rosy\src on ๎‚  bt/starting_packager [!?]
โฏ git status
On branch bt/starting_packager
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   Engine/Graphics.cpp
        modified:   Packager/Asset.h
        modified:   Packager/Main.cpp
        modified:   libs/imgui/imgui.cpp
        modified:   libs/imgui/imgui_draw.cpp
        modified:   libs/imgui/imgui_internal.h
        modified:   libs/imgui/imgui_widgets.cpp
        modified:   libs/imgui/imstb_truetype.h
#

looks like some of imgui calls it indexes KEKW

#

they call it indices too though

#

I should create a PR

#

jk

wraith urchin
#

Oof being inconsistent is worse than being wrong agonyfrog

#

Although I'm frequently iconsistent on the use of Color vs Colour

#

but thats mostly a Canadianism we all struggle with

#

At work you gotta Ctrl + F for both

cloud rivet
#

:<

brisk chasm
#

are you flying an AZERTY kb too @wraith urchin ? ๐Ÿ˜› and fr_GB locale? ๐Ÿ˜›

slim oak
# wraith urchin I use it for most of my custom formats

Do you compress each file separately or just bundle them together and compress as a package?
I was thinking about bundling all, because I'd have just 1 LZ4 stream per bundle
Also was thinking about compressing my entire virtual texture atlases with LZ4, will see how it works

brisk chasm
#

textures are usually already compressed, no?

slim oak
#

Yeah, but other files like meshes aren't

brisk chasm
#

yeah

#

so i wouldnt bother compressing textures further, but everything else, why not

slim oak
#

GPT told me BC5/BC7 textures in my VT could be compressed with LZ4 and it would gain me 5-10%
Will see in the future gpAkkoShrug

brisk chasm
wraith urchin
wraith urchin
slim oak
#

Performance wise one LZ4 stream would be better rather than single stream per asset
I'll try bundling mine and check how it goes

wraith urchin
slim oak
#

Yeah, if you keep all textures non-virtualized and concurrent, then yes
I went with VT all the way, now my VT files weigh 2GB/3GB after compression, storing hundreds of 1K/2K/4K PBR textures

cloud rivet
#

What is your game?

slim oak
#

A 3D shooter, currently not wanting to disclose it due to company policy forgi

wraith urchin
#

Honestly that would make me quit

slim oak
#

Nah it's a game we're working on at the company, where I implemented the VT system, I have also 2 other side projects, one being an ERP system

wraith urchin
#

Ah

bronze socket
#

please tell me you mean enterprise resource planning

slim oak
#

Yesss

cloud rivet
#

man all these threads with gameplay, I am real close, I'm really excited to start

wraith urchin
#

Are you gonna have physics?

cloud rivet
#

yes

#

thinking jolt

#

I don't know anything at all about physics, I rolled my own ray marching for Blockens

brisk chasm
#

physx5 with new car fisiks

cloud rivet
#

it worked :\

#

I don't have cars, I was thinking maybe my robot had wheels though

wraith urchin
#

How are your controls gonna work? Do you control the character directly or is it sorta point & click

brisk chasm
#

you want cars in your game jedimasterhandmove

cloud rivet
#

honestly I think I want to get a gamepad

#

and make the game work with a gamepad

#

wasd though

wraith urchin
#

The perspective made me think it was point & click

cloud rivet
#

hrm

#

that's true

#

point and click

#

I don't now yet

wraith urchin
#

Like bg3 for example

brisk chasm
#

i loved these (and still do) point and click adventure games (where you also click on commands like open/close/use/speak etc) indiana jones/monkey island/sherlock holmes/zak mckraken โค๏ธ

wraith urchin
#

Ah yes I was making one of those before ASO

cloud rivet
#

I saw that

wraith urchin
#

There was a really short demo I put out but I never finished the thing gpAkkoShrug

wraith urchin
#

I'm basically imagining the robot looking like wall-e

#

But it's your robot you can do whatever you want

#

Ooh, what if you could customize the robot? froge_love

#

Like maybe different parts can give you different abilities...

cloud rivet
#

I hadn't considered customizing the robot

#

I kind of wanted to do a good job with the character's model

#

not sure yet

#

I have an idea of a story based game

#

a big narrative component

wraith urchin
#

Stories are hard froge_sad

cloud rivet
#

I am full of stories

wraith urchin
#

Are you full of stories or ideas for stories?

cloud rivet
#

well they're all in my head, I have written some down

#

but I keep developing them in my head

wraith urchin
#

I'm not very good at the details

cloud rivet
#

I have to know both the beginning and the end of the story

#

before I can work on the details

#

so once I have an idea I work towards understanding how it ends

#

and then the details help carry the story from beginning to its end

#

and bring more meaning to that end

wraith urchin
#

And games have their own little wrinkle of player agency

cloud rivet
#

metrod exodus did that really well

#

incorporate player agency into a solid story

wraith urchin
#

Yeah I'm mostly just complaining. I find stories one of the harder parts

#

In order of decreasing frustration for me: story, 3d modelling, gameplay code, engine code, music

cloud rivet
#

you might want to read an issue of the New York Review of Books, maybe canadian libraries have one, I would buy an issue if possible. the online is pay walled

#

it is very inspiring

#

it's not just book reviews

#

they are articles about books and stories

#

another one is the Paris Review

wraith urchin
#

Yeah Toronto Public Library has a bunch of stuff like that, I'll take a look

cloud rivet
#

I love those two publications, they are just amazing

#

they also write about music and film

#

usally in the context of a book review about the topic

#

I guess I am recommending it because you get to get into the heads of authors who write stories

#

and you learn about how they think about stories, the reviewers are all writers themselves

cloud rivet
#

I removed all my ALL_COMMANDS full pipeline barriers, and now have a proper sync that doesn't stall the GPU on every layout transition

#

because I have been reading the sync links every day and am slowly getting it

#

I think the local reads extension where I can do subpasses with dynamic rendering will also help, I think my frame rate should stay lower than it was in my previous version where I was stopping rendering to write pipeline barriers between CSM and rendering

#

basically I believe I was using multiple end to end graphics pipeline passes to render each frame unnecessarily

#

I think my memory masks need tweaking too though, I have left those unchanged from vkguide

wraith urchin
cloud rivet
#

based on what I read, and this could be misinfo , GL optimizes for you based on what it thinks you are doing

#

which is why I think that GL will probably be more performant than VK for someone who doesn't know what they're doing

astral hinge
#

when you write gl, you produce a render graph for the driver

#

it can issue granular barriers and reorder passes

cloud rivet
#

so no I don't think what GL does is like ALL_COMMANDS

#

ALL_COMMANDS is basically worst case behavior

#

the vulkan sync examples page not to ever use it, and I was only using it because that's what was in vkguide and I was too lazy to update it

#

but then Matty shamed me

#

and I have fixed it

astral hinge
#

I use gigabarriers hehe

cloud rivet
#

you use ALL_COMMANDS?

astral hinge
#

I profiled them to not be an issue at all

cloud rivet
#

yeah it was like 1ms for me at best

#

but

astral hinge
#
  void Context::Barrier() const
  {
    ZoneScoped;
    vkCmdPipelineBarrier2(commandBuffer_, Address(VkDependencyInfo{
      .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
      .memoryBarrierCount = 1,
      .pMemoryBarriers = Address(VkMemoryBarrier2{
        .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2,
        .srcStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
        .srcAccessMask = VK_ACCESS_2_MEMORY_READ_BIT | VK_ACCESS_2_MEMORY_WRITE_BIT,
        .dstStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
        .dstAccessMask = VK_ACCESS_2_MEMORY_READ_BIT | VK_ACCESS_2_MEMORY_WRITE_BIT,
      }),
    }));
  }
cloud rivet
#

it's not hard to avoid them?

astral hinge
#

well being able to safely sync anything with a one-liner is nice

astral hinge
#

render graph enjoyers would say it's better to have a zero-liner but meh

cloud rivet
#

basically I make sure my images are in a correct state before fragment shader to be written into

#

and then after I have a barrier for presentation

#

and for CSM I'll barrier it in the depth test stage

#

and that's it? no big deal?

#

idk

astral hinge
#

a lot of times, especially with compute, there's no hope of having overlap at all, so a gigabarrier is as ideal as it'll get

cloud rivet
#

the sync examples page has common compute scenarios do they not work?

astral hinge
#

what I'm saying is that if a dispatch B depends on dispatch A, you're absolutely not going to overlap them

cloud rivet
#

right

astral hinge
#

yeah if they are doing unrelated work they could theoretically overlap, but the opportunities for that are comparatively limited

cloud rivet
#

can you barrier B and A so they don't overlap with vkCmdPipelineBarrier(srcStageMask = COMPUTE, dstStageMask = COMPUTE)

#

?

#

that's what the yet another sync blog led me to think

astral hinge
#

but the effect is the same as a gigabarrier

cloud rivet
#

hrm

#

but the ALL_COMMANDS effects all commands

astral hinge
#

I guess my point is that it's easy to focus on making theoretically perfectly granular barriers when in reality is doesn't matter a lot of the time

cloud rivet
#

but with the COMPUTE it doesn't?

#

so it's not the same I thought

astral hinge
#

hmm I dunno what you mean

#

are you referring to the source or destination stage mask?

cloud rivet
#

if if you have a queue with commands on it, ALL_COMMANDS flushes the queue of all work

astral hinge
#

the barrier defines two scopes to synchronize

cloud rivet
#

where as with COMPUTE you're only affecting those that care about that stage

#

hrm

#

oh

astral hinge
#

I think I see what you mean

cloud rivet
#
vkCmdDispatch
vkCmdDispatch
vkCmdSetEvent(event, srcStageMask = COMPUTE)
vkCmdDispatch
vkCmdWaitEvent(event, dstStageMask = COMPUTE)
vkCmdDispatch
vkCmdDispatch
#

as from the yet another sync blog post

#

I could be wrong, but I believe this doesn't create dependencies for unrelated commands

astral hinge
#

if you draw your frame out on paper with all the passes and their dependencies, I think it'll be more obvious where overlap is and isn't possible

#

I'm not saying my gigabarriers don't create unnecessary dependencies. I'm saying that the perf difference is probably nil since there was no overlap to be had anyway

cloud rivet
#

yeah the perf was tiny for me too

astral hinge
#

I have profiled my app before which is why I say that

cloud rivet
#

I did too

#

#1147711082702589973 message

#

but then that happened

#

I gotta work on my GP creds

#

you already have yours

astral hinge
#

was this misinfo

cloud rivet
#

then I can go back and use ALL_COMMANDS

cloud rivet
astral hinge
#

maybe he was confused. your name isn't even Andy smh

cloud rivet
#

I think he was using alliteration

echo crystal
#

i think it's a reference

#

to twitch

cloud rivet
#

I was saying vulkan was awesome and easy to understand and then he pointed out I was taking a major shortcut with the hard part of vk

#

but I had measured it

astral hinge
#

it's a shortcut, but I'd argue it isn't major in most cases poisondartkekw

echo crystal
#

render graph when

bronze socket
#

the way I think about it is that the src/dst flags are just fine tuning, if you focus on the fact that you're barriering between commands you'll be more than fine

#

and yeah events are extra

astral hinge
#

well, if you're writing an epically cpu-driven renderer with lots of passes then it could hurt more

cloud rivet
#

I suspect whenever Matty sees a comment I leave in #vulkan I just assume he closes discord in disgust

bronze socket
#

basically, "cmd A depends on cmd B" -> "A barrier B", then you fine tune based on what actual stages between them are dependent

#

you don't really need to think about more

cloud rivet
#

yes that's what I have come to understand too but I'm still figuring it out

true moon
#

Martty is mocking you at multiple levels of irony at once to maximize his effort to amusement ratio, all whilst not actually caring that you're doing the thing he's teasing you about

cloud rivet
#

I appreciate that

astral hinge
#

he's maximizing his damage:effort ratio bleakekw

astral hinge
cloud rivet
#

I tend to say what I think I know, which I understand may have inaccuracies, because often someone will correct me and I learn from that

bronze socket
#

until the false positives start rolling in and it's not as useful

cloud rivet
#

but on this server saying what you know with inaccuracies is considered misinfo here and not seen as benign as in other places

astral hinge
#

I only get false positives for my bindlessisms at least

cloud rivet
#

so I have been trying to be more explicit that I don't know by hedging everything I say with "I am new to this also.." etc

astral hinge
#

yeah I think most people only get annoyed when people are confidently wrong

echo crystal
#

it was bait

brisk chasm
#

always has been

bronze socket
#

btw this might be one reason to try out writing a frame graph, in essence your frame graph's frontend API lets you specify commands' relationships to the resources they touch in the way you'd think about them when preparing the barriers manually, but then you can shovel all that thinking away into some arbitrary backend that unrolls all that information into a flat list of commands, somehow

#

and that can be as simple or as complex as you like, over time

cloud rivet
#

I like that idea, right now I have a zero abstraction rendering function that explicitly creates all the structs for each phase of the frame

#

I think as I get to understanding things better and my render function increases in complexity maybe I'll get an idea for how to do that

#

I have so far regretted every attempt to write any type of abstraction for anything ever when it comes to GPU APIs but I saw an example of the fwog api and I was kind of wow'ed by it

#

maybe I can eventually get a big brain idea of how abstract things

#

I don't think I am quite there yet

steady venture
#

Hello, what's this then

#

Congrats on the new project

cloud rivet
#

thanks! how have you been?

#

my entire current vulkan code is entirely abstraction free and in an anonymous namespace, no code outside of Graphics.cpp knows I am using vulkan, not even Graphics.h, I would like to keep it that way tbh

steady venture
#

I'm doing fine, although I was away for a little while against my wishes but now I'm back.
I see you've been busy, I'll be sure to keep an eye here ๐Ÿ™‚

Don't want to interfere with your discussion here though ๐Ÿ‘‹

cloud rivet
#

you aren't!

#

excited to see you're back

cloud rivet
#

I encountered my first slang bug

#

I can't give slang function names to the SO create info

#

they just have to be "main"

#

even though they're actually "fragmentMain" and "vertexMain"

#

I actually do see those names in the spirv visualizer though

#

[31]โ€ƒ OpName %78 "entryPointParam_fragmentMain.color"
[32]โ€ƒ OpName %65 "fragmentMain"

#

aha

#

[7]โ€ƒ OpEntryPoint Vertex %2 "main" %22 %58 %62 %15
[8]โ€ƒ OpEntryPoint Fragment %65 "main" %78 %73

#

look at that bullshit

#
import data;

[[vk::push_constant]] BasicPushConstant BasicPushConstants;

[shader("vertex")]
BasicVertexStageOutput vertexMain(uint uiVertexId: SV_VertexID)
{
    BasicInputVertex v = *(BasicPushConstants.v + uiVertexId);
    float4 posWorld = float4(v.position, 1.0);

    BasicVertexStageOutput output;

    output.basicVertex.normal = v.normal;

    output.sv_position = float4(v.position, 1.f);

    return output;
}

[shader("fragment")]
Fragment fragmentMain(BasicVertex basicVertex: BasicVertex) : SV_Target
{
    Fragment output;
    output.color = float4(basicVertex.normal, 1.0);
    return output;
}
#

Where is there a "main" in this

#

@inner warren pls fix slang ^^ it needs another PR

cloud rivet
#

we are so back

#

this is using my custom binary format, actual no full pipeline barrier sync, zero abstraction init and zero abstraction rendering

#

the rendering and & asset stuff near doubled my build time from 2 seconds to nearly 3.5

#

3,006 loc triangle froge_love

cloud rivet
#

still slang, still bda, still bindless, still dynamic rendering, still shader objects, no gigabuffers

#

anyway

#

I gotta work on gltf

#

I got a 4 day weekend maybe I get done by monday evening

inner warren
#

-fvk-use-entrypoint-name

cloud rivet
#
โฏ Write-Host $env:VULKAN_SDK
C:\VulkanSDK\1.4.304.0
#

updated to latest, everything just works, love it

#

still on 1.3 since I don't want to use a beta driver

#

ok gltf'ing time

#

first I'm going to just gltf export the demo cube with a color

#

then I'm going to make deccer cubes again

#

then crytek sponza

#

then intel sponza

#

then game play

#

I got exactly 2 weeks before I have to start gameplay I think I can do it, I got 3.5 days of no work left so maybe I can get all the way to deccer by end of weekend

brisk chasm
#

lt se ga au = lets go ๐Ÿ™‚

astral hinge
#

I could tell ๐Ÿ˜„

brisk chasm
#

thought you might needed a minute because you didnt updoot those

astral hinge
#

there ๐Ÿ˜„

inner warren
cloud rivet
#

it's fine I'll just "main"

cloud rivet
#

that's the first time I statically linked a C++ library, I had previously dynamically linked via vcpkg but I don't like vcpkg

#

it does make my build really painful for anyone else because there's a lot of manual git clone and building you have to do build the project right now, but I am documenting it all in my README but I doubt anyone but me will build it anyway and really the instructions are just for me to build it on my laptop or if I have to idk get a new computer or something

#

I should add a cmake file just for pulling in third party deps so it doesn't have to be so manual at some point

#

I should use how fastgltf pulls in simdjson as an example I guess

#

I'm not going to worry about it until I need to I guess

#

I wish vcpkg wasn't terrible

cloud rivet
wraith urchin
#

No worries

light salmon
#

oh yea where did u get/how did u make the skybox texture?

cloud rivet
#

well

#

I did some work in blender to make it work for me

#

I got my demo cube gltf import working, but I need a camera to see it properly

#

all I can see right now is KEKW

#

It's 2:33 am I think I will do it tomorrow, I will have to upload a scene buffer with all the matrices and directional light etc

#

this binary format stuff is so clean though

#

I haven't applied compression yet I still need to do that

#

I will before sponza I guess

#

my binary format extension is .rsy froge_love

#

I need to conditionally import them to support renderdoc I guess fml

#

or just not use them

#

I think not worth using them tbh

light salmon
#

I bet if I do some tweaking in my own rendering thing I could create something similar and better for the skybox in the thumbnail

brisk chasm
#

you can dynamically link any of your libs too

#

i believe a set(BUILD_SHARED ... at fastgltf conf time should do too

brisk chasm
#

the h is silent

cloud rivet
#

Fastgltfโ€™s cmakeโ€™s VS project doesnโ€t produce a dll by default fwiw and anyway not important to me all that much but that probably is an alternative

#

I donโ€™t think that dynamically linking it is common

brisk chasm
#

since fastgltf is not explicitly stating SHARED or STATIC, this BUILD_SHARED_LIBS thing could do the trick

cloud rivet
#

My engine doesnโ€™t need fastgltf, my asset packager does, I added an import method to my Asset.cpp file which does the loading via fastgltf, My engine uses Asset.cpp to load the asset from disk. Instead of doing all this I will pull the gltf loading out of Asset.cpp and create a new Gltf.cpp and give it an Asset and now Engine will build in 3 seconds again

wraith urchin
#

is the "asset packager" an external tool?

brisk chasm
#

ah yeah, if its just some external tool then whatever (link fastgltf as header only)

wraith urchin
#

Are you gonna have a separate editor?

cloud rivet
#

Itโ€™s a separate vs project inside Rosy that builds a console application that converts gltf files to my tsy format

wraith urchin
#

I like to be able to just drag a gltf into the editor and have it pop up

cloud rivet
#

What kind of editor do you mean?

wraith urchin
#

Like how do you make "levels"?

cloud rivet
#

Oh

#

Does blender not work for that?

wraith urchin
#

It can

#

but you will probably need to write some plugins

cloud rivet
#

I was hoping I could just use a single gltf

#

I donโ€™t mind writing plugins

wraith urchin
#

You will have to extend gltf too

#

because you will want more than just geometry data in your level

#

gltf is designed to be extended

cloud rivet
#

Nice

#

Yeah maybe I can export ECS components and tags from gltf extensions

wraith urchin
#

Also your plugins will probably break during the next blender update though ๐Ÿ’€

#

As long as you are ok with maintaining them, or keeping an old version of blender (like @silver slate does iirc)

#

AniCator does editing in blender, he might have some good advice for you

cloud rivet
#

Hi

wraith urchin
#

How does your blender editing setup work?

silver slate
#

I've got a bunch of custom properties set up for objects to configure them. My scenes use old school entities, no ECS. I define the types in a document that is loaded by my addon, it creates all the properties for every entity type and that is set up on objects based on their set type.

cloud rivet
#

I was inspired by AniCator to do the custom format and use imhex also so I need to set up imhex to be able to parse my format like you have it

wraith urchin
#

Yeah if you're gonna be doing custom blender scripts maybe skip glTF altogether

cloud rivet
#

Makes sense

silver slate
cloud rivet
#

Wow

silver slate
#

It uses some dark magic to swap out the properties.

#

The addon serves as a batch exporter of model files and scene data.

cloud rivet
#

Amazing stuff

silver slate
#
{
    "name": "CityCube.038",
    "uuid": "b5504f0e-32e4-4cf4-ae2b-52a22e22e041",
    "type": "mesh",
    "mesh": "cube",
    "shader": "DefaultTextured",
    "texture": "bigarchsurface",
    "position": "-41.124340 -400.000000 22.457418",
    "rotation": "-0.000000 0.000000 0.000000",
    "scale": "45.475323 0.480214 4.567022",
    "color": "1.000000 1.000000 1.000000",
    "visible": "1",
    "collision": "1",
    "collisiontype": "aabb",
    "static": "1",
    "stationary": "0",
    "damping": "1.0",
    "friction": "0.5",
    "restitution": "1.0",
    "drag": "1.0"
},
{
    "name": "TriggerPortDistrict",
    "uuid": "25813374-e0de-4441-b584-13f4d407b431",
    "type": "trigger_box",
    "position": "-50.030743 -127.692970 27.359901",
    "rotation": "-0.000000 0.000000 0.000000",
    "scale": "109.927025 135.856430 30.226276",
    "frequency": "0",
    "filter": "player",
    "bounds": "-109.927025 -135.856430 -30.226276,109.927025 135.856430 30.226276"
},
{
    "name": "Stands.001",
    "uuid": "3b953355-e1aa-46dd-957f-f1238748a5ea",
    "type": "mesh",
    "mesh": "stands",
    "material": "plaster_trim2",
    "position": "65.000000 38.000000 8.000000",
    "rotation": "-0.000000 0.000000 0.000000",
    "scale": "1.000000 1.000000 1.000000",
    "color": "1.000000 1.000000 1.000000",
    "visible": "1",
    "collision": "1",
    "collisiontype": "aabb",
    "static": "1",
    "stationary": "0",
    "damping": "1.0",
    "friction": "0.5",
    "restitution": "1.0",
    "drag": "1.0"
},``` here's some of the output of the scene/level side
slender ember
#

My main reason for having an editor is to have the same renderer as the game, making it more of a WYSIWYG kinda deal

wraith urchin
#

My editor is part of the game executable, thats actually my preferred way of doing it, but there are certainly tradeoffs with any method

silver slate
#

I haven't had my addons break on me yet, just haven't switched to Blender 4.1 and up yet for other reasons. (quadratic loading time bug)

slender ember
#

Yeah, mine as well. The editor app just wraps the game and starts it in a special editor mode.

wraith urchin
#

Like basically you pause the game and edit in situ

slender ember
#

Ah, I see. I keep the editor flow separate from the game flow. But yeah there are benefits to doing that.

silver slate
cloud rivet
slender ember
#

Another cool thing I can do is make a component in the game code and have it run custom logic in the editor.

#

Eg. my grass system, along with the editor for painting it, is completely game-side code.

#

Kinda like how you can make scripts that run in the editor, in Unity.

cloud rivet
#

I saw all those grass markers and icons you have in the level viewer itโ€™s really cool

slender ember
#

Ah ๐Ÿ™‚ Those things are there just so that you can select the object in the scene, rather than having to go through the hierarchy.

silver slate
slender ember
#

Since it would be annoying if the editor selected the grass if the user clicked anywhere on the ground.

slender ember
wraith urchin
slender ember
#

The icons Bjorn mentioned are just a component with a material on them. They vaporize during the export, of course.

#

Generally I use them on object types that are "invisible" but still have a transform. That also allows me to move things around by dragging the icon around. Eg. triggers.

#

Then I have an "extended selection mode" which you use by holding down Alt. It allows you to select things that would normally be ignored. Eg. you can just click the ground to select the terrain, or select locked objects if no other unlocked objects were hit by the raycast etc...

cloud rivet
#

I like how the line around an area on the ground animates a fade in and out effect

#

Like all of the everything in that

cloud rivet
#

Ah makes sense

#

It a nice touch

slender ember
#

Well, it's a game side thing so it's supposed to be flashy sunglasses

#

I just havent bothered to "stop the time" that's fed to the shaders in the editor.

#

Which also means that my wind animation keeps running when the game is paused, been bugging me for a long time...

wraith urchin
cloud rivet
#

Hrm space station vents froge_love

#

New level idea

slender ember
#

Feed the time to your shader, offset your vertices in the VS by a mix of overlaid sin/cos waves or sample some noise. Bob's your uncle.

cloud rivet
#

Nice!

#

Thank you

#

Also my game idea just changed

#

Based on this conversation

#

So still an obsolete robot escape room game

#

But as you escape from one level to another you slowly gain more control over the space station and its automated systems

#

Which you then use to solve the next puzzles

#

And also changes the narrative of the story

#

And thereโ€™s like an economy of resources you have to manage to control the station that progresses in complexity as you gain more access

#

But youโ€™re just trying to escape

#

But your decisions impact others who arenโ€™t after you who live on the station too

slender ember
#

I dunno how you got from VS sine waves to space stations, but whatever floats your boat ๐Ÿ˜„

cloud rivet
#

Wind animations

#

Steam vents, obstacles

#

I have been thinking in my head about the puzzles

#

Idk how it connected either

#

Space station was just a preexisting idea

#

Because no wind on a station

#

But I could add vents

#

Which could be hot or push or something

slender ember
#

Well, be the first game with windy spacestations, I duuno....

cloud rivet
#

HVAC on a massive pace station that keeps thousands of non-robot inhabitants alive is an interesting concept to think about

#

I just figured out so much

#

I gotta write all this down when I get home

#

So you can basically sacrifice the lives of others to save your self but you will be warned and you will start to see the consequences and it will make later problems worse/different

#

A good 2D UI is going to be critical

#

Point and click movement

#

If you get near something you can control it will appear on screen hud

wraith urchin
#

Going with the point + click? gonna need some pathfinding then

cloud rivet
#

Yeah

wraith urchin
#

Allow me to shill recast/detour

slender ember
#

Other than rolling your own of course

wraith urchin
#

vblanco has entered the chat KEKW

slender ember
#

Oh boy, what did I do? ๐Ÿ˜ฑ

wraith urchin
#

lol, hes got a whole recast rant

slender ember
#

Oh, I have recast rants to spare.

#

But at the same time, it's saved me so much time.

wraith urchin
#

same

slender ember
#

In fact I also use NanoVG. I feel like I should buy Mikko Mononen a beer at least.

cloud rivet
#

I gotta look into these thanks

#

So controllable systems, garbage systems, hvac, lights, alarm systemsโ€ฆ.

#

Ramps and doors

#

Being able to open a door will be the intro puzzle that introduces you to the system

slim oak
cloud rivet
#

Hrmm yeah

#

Thereโ€™s this line of dialogue in The Professional where Leon explains that distance is a measure of skill, as you become more proficient in his craft you can close the distance to your target

#

Thatโ€™s kinda how I will use camera distance

#

This game has a big distance

#

next game maybe I an get a little bit closer

#

Hopefully I will have improved my model and animation and render skills as well as my engine

#

I donโ€™t think I will need any blending for geometry

#

Camera moves 2 dimensions in gameplay

#

Just a lot problems I wonโ€™t have

#

Itโ€™s a 3D game though

#

alright done walking rosy time for work

cloud rivet
#

Industrial Elegy - Dark Dystopian Ambient - Apocalypse Ambient Music 2025

My name is Dystrosonic and I aim to provide you with the best dark ambient soundscapes to relax to. Put your usual thoughts aside and let my music take you on a new journey, away from real life.

Welcome to my channel, dedicated to exploring the darker and more dystopian ...

โ–ถ Play video
cloud rivet
cloud rivet
#

my camera I think I will go with:

struct camera
{
    double g; // projection plane distance
    double s; // aspect ratio
    double n; // near plane
    double f; // far plane
    double fov; // field of view
    std::array<float, 16> p; // projection
    std::array<float, 16> v; // view
    std::array<float, 16> vp; // view projection
    std::array<float, 16> r; // camera orientation
    result process_sdl_event(SDL_Event event);
};
#

I will internally in cpp use glm, but between TUs it will just be arrays

#

the rendering engine will not know I use glm

#

it will not do any math

#

on the bits talking to vk on the cpu side anyway

astral hinge
#

using arrays instead of proper math types is kinda gross

cloud rivet
#

it's not math here

#

it's just data transfer

#

it just bytes

astral hinge
#

you'll have to convert it to another type to do anything with it though

#

the point of types is to be that view

#

otherwise everything would just be void*

cloud rivet
#

it's still typed to be an array of numbers

#

it's not void*

astral hinge
#

yeah it's more typed than void* but less typed than it could be

#

I'd assume you're doing this for compile perf reasons but using an stl type for that would be counterproductive

cloud rivet
#

in my bikeshed I don't want things that don't need to know about math to not know about it and to those things that can do math to convert data that can be mathed to their math types I guess

astral hinge
#

I don't really get it but I won't stop you

cloud rivet
#

I guess it's just a reminder to myself to not do math stuff where it doesn't belong

#

like hopefully the temptation to avoid doing quick fixes with some * -0.5 on some glm vec3 prior to putting things in a buffer/push constant at the last moment is averted ? idk, I feel like my math has been all over the place

#

idk maybe it is bad and I will change it

brisk chasm
#

please write things out

#

g s n et al

#

using longer variable names wont increase compile times : )

astral hinge
#

What is the renderer doing if not math? Is this just a loophole in your "no graphics api abstraction" rule?

#

If you feel compelled to put a hack somewhere it'll be a hack regardless of where it is

#

Anyways I'll stop

true moon
#

Trying to separate things so strongly is basically a form of abstraction itself tbh

#

When I say I use no abstraction what I mean is the renderer is basically just game code

#

I just happen to have a barrier in between them for organizational reasons

#

But that barrier is literally just a render(scene) function call that passes the game state to the renderer

#

If you try to write the renderer to be completely ignorant of the game, you're going to end up doing extra work on the game side to interface with it

astral hinge
#

But then it'll work for any game froge_love

#

Nocode is compatible with all software!

true moon
#

You have game code, and you have API calls, and somewhere in between there you need code that implements the game graphics using the API calls

#

If you try to make the renderer not do any of that work, you're going to have to do it outside of the renderer

#

And unless you just put GL calls in game systems, that means you're creating abstractions that are basically just unnecessary work

#

Vk calls in this case

cloud rivet
#

there's no rendering math in his C4 renderer either, there's some allocation math

#

he doesn't use glm at all

true moon
#

Who calculates the view matrix

cloud rivet
#

the camera

#

that's what vkguide does too

#

and my other book also does that

#

essential game math

true moon
#

That's still basically putting renderer logic into the game, which is something that can be avoided

cloud rivet
#

yes I think constructing the view frustum is rendering

#

that's why I think I qualified after with vk bits, I think more I am keeping it out of the RHI, even though I don't call it RHI anymore

#

the whole thing is still a rendering engine and the camera is part of it

#

I think what would be Ok at that layer though is the NDC conversion

#

since it's Y down in vk

brisk chasm
#

the only game information about camera is position and its orientation plus fov if its used for perspectiveisms

cloud rivet
#

the camera is used for so much

brisk chasm
#

and perhaps for after effects certain lense attributes for dof/and thingy, i forgot the name, that eye adaptation thing

cloud rivet
#

the frustum defines the viewable area, it's used for culling, it's used for knowing where to position the CSM camera, it's used for a lot more than just fov and perspective and position

#

it's a vital piece of information for lots of things

brisk chasm
#

the renderer can calculate the frustum out of perspective and view matricles

cloud rivet
#

the viewable area is basically where the game is taking place

true moon
#

All of these things you're describing seem like renderer tasks

brisk chasm
#

the camera could carry csm attroibutes for how many splits you want and at what offset, although those are most likely renderer settings

cloud rivet
#

right and the camera is part of the rendering engine

true moon
#

ok I see so there is a second layer of separation between the API and the renderer?

cloud rivet
#

right

brisk chasm
#

the camera in openspace will just be a shrimple component with 1 fov attribute

true moon
#
auto& materials = m_materials[static_cast<uint16_t>(materialSet)];

// 1. Near pass (cockpit view)
if (cockpitView)
{
    BEGIN_LABEL(intlMark);
    begin_pass(frame, Pass::InteriorOpaque, nullptr);
    proj = m_game.computeProj(camObj, 0.05f, 50.0f);

    BEGIN_LABEL(opqMark);
    VTechnique& mat = m_materials[(int)TargetExtent::Native][(int)MaterialSteps::OpaqueInternal];
    bind_opaque(frame, proj, viewIndex, mat);
    // Draw
    for (auto const& tgt : cockpitOpaque)
    {
        draw_opaque(frame, tgt.entity, tgt.index, mat);
    }
    END_LABEL();
    BEGIN_LABEL(transpMark);
    for (auto const& tgt : cockpitTransparent)
    {
        draw_HUD_glass(frame, proj, tgt.entity, viewIndex, tgt.index, MaterialSteps::HUDPrepass);
    }
    END_LABEL();

    end_pass(cmd);
    END_LABEL();
}

if (cockpitView)
{
    // 2. Distant opaque (continue after internal view)
    BEGIN_LABEL(farMark);
    begin_pass(frame, Pass::FarPass, targetFB);
}
else
{
    // 2. Distant opaque (clear all attachments if there was no internal draw)
    BEGIN_LABEL(farMark);
    begin_pass(frame, Pass::FarPassClear, targetFB);
}
proj = m_game.computeProj(camObj, 500.0f, 1.425e5f);

BEGIN_LABEL(opqMark);
VTechnique& opqMat = materials[(int)MaterialSteps::OpaqueExternal];
bind_opaque(frame, proj, viewIndex, opqMat);

for (auto const& tgt : farOpaque)
{
    draw_opaque(frame, tgt.entity, tgt.index, opqMat);
}
END_LABEL();
BEGIN_LABEL(terrainMark);
viewProj = proj * view;
draw_terrain(frame, terrain, viewProj, eyePos, false, materialSet, farTerrainChunks);
END_LABEL();
glm::mat4 orientProj = proj * viewOrient;
VTechnique& skyMat = materials[(int)MaterialSteps::Sky];
draw_sky(frame, sky, skyMat, orientProj);
#

flightsimposting

cloud rivet
#

oh I like your macros for labels

#

I should do that

true moon
#

Example of one of those steps

void Renderer::draw_sky(FrameData& frame, Entity sky, VTechnique& mat, glm::mat4 viewOrientProj)
{
    auto& comps = m_game.comps;
    VkCommandBuffer cmd = frame.resources->m_commandBuffer;

    vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, mat.pipeline);

    auto& obj = comps.renderables[sky];
    auto* mesh = get_mesh(obj.meshName);

    // Push constants
    struct
    {
        glm::mat4 mvp;
    } constants;
    constants.mvp = viewOrientProj;
    vkCmdPushConstants(cmd, mat.pipelineLayout,
        VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(glm::mat4), &constants);

    // Bind VBO/EBO
    VkDeviceSize vertOffset = 0;
    vkCmdBindVertexBuffers(cmd, 0, 1, &mesh->m_vertexBuffer.m_buffer, &vertOffset);

    // Draw object
    vkCmdDraw(cmd, mesh->m_vertices.size(), 1, 0, 0);
}
cloud rivet
#

cool stuff

true moon
#

This is what I describe as low-abstraction in my projects since the renderer is basically just game code that does raw API calls

#

so something like calculating view matrices would just be thrown into that bucket too

#

At the start of the render() function there's a step that builds up std::vectors of data associated with the draw commands

#

Moreso for drawing opaque objects since they need to draw on ssbos of transform data etc. unlike this sky pass

inner warren
#

๐Ÿ˜Ž

#

And then you have maths

#

and then you have helper functions to call the maths functions for you

brisk chasm
#

why is cameraTransform a special type

inner warren
cloud rivet
#

this camera stuff is taking a bit of work to put together

cloud rivet
cloud rivet
cloud rivet
cloud rivet
#

my frame time before was like 3-4ms, I think CSM was like 1ms of that

#

my frames are like 10x faster atm then what they were before

#

I don't think deccer cubes are going drop me down by 10x but will see

#

I just need to pull materials out of the demo cube and then I can move to deccer cubes, which involve adding texture/sampler support back into the engine, and then I can do cryotek sponza

#

I am really over generative ai in a big way, and have cancelled all my ai plans, except coderabbit, it does have problems, but they did a really good job with it, I like this diagram it gave me

#

I think adopting VK_KHR_dynamic_rendering_local_read means I can't use renderdoc anymore

#

hrm

#

I think I may have to use it anyway to get subpasses with dynamic rendering

#

renderdoc documentation says they don't support any KHR extensions

#

that would be a massive workaround to support just renderdoc, even worse than what I had to do to get bindless & support renderdoc

cloud rivet
#

just been working on my powershell scripts that watch for slang shader changes and rebuild them

#

working mostly nicely although I don't know much about .NET stuff

cloud rivet
#

ok will really need to start on materials now

#

my shader compiler is doing great though

#

it runs in the background and just builds everything whenever I edit the files

cloud rivet
#

that was so much work

#

it's not even correct yet, I just hard code the first mesh and surface in the renderer right now, I am getting it all out though

#

I'm going to do deccer cubes tomorrow, then I will have to fix all that

#

and that will probably take a couple of days maybe because of the textures

#

and all the scene graph stuff

steady venture
#

<unknown> shit is starting to piss me off. Intellisense is hooked to a rand % 2 or something I swear

true moon
#

It's less shit than it used to be but still has a few annoyances

#

But you'll get used to it, it's not that different

steady venture
#

I should at least try and see for myself then ๐Ÿ‘

silver slate
#

Suddenly, VS hate outta nowhere ๐Ÿ‘€

true moon
#

I like vs2019 a lot that's what I still use at home

silver slate
#

I use VS 2022 but my project is on the old 2015 compiler.

slim oak
#

VS 2022 + C# + AOT = 60GB RAM eaten up forgelove

cloud rivet
#

I have warnings configured as build errors

#

I didnโ€™t use vs2019 much

#

I mostly like it. Itโ€™s much better than visual studio code

brisk chasm
#

the worst ones were 2002, 2003, 2005, 2008, 2013

cloud rivet
#

I was using vim during those years

brisk chasm
#

although c++ compiled almost as quick in 2008 as in vc6

#

(i added ntlm auth into TortoiseSVN back when, which also borked my whole c# dev environment then, had to have it renewed, was a company pc :D)

slender ember
#

THAT WAS THE ONE THAT SCREAMED AT YOU IN ALL CAPS ALL THE TIME OHMYGAWD

brisk chasm
#

right i wanst sure if it was called 2012 hehe but internal version was 11 iirc hehe

slender ember
#

Yeah vc11 was 2012

brisk chasm
#

that was indeed a horrible version as well

slender ember
#

2013 was released just one year after and was actually quite decent, but wasn't supported by any Xbox XDKs, so no-one at our studio used it, except me who had to hack some msbuild files to get our stuff to compile ๐Ÿ˜„

brisk chasm
#

: )

#

was it 2013 already or 2015 where they gave you an option of how you wanted your FILE MENU IN CAPS OR STANDARD AS USUAL

#

it felt like it took them ages

slender ember
#

It was 2013. It was ALL CAPS OHMYGAWD by default, but they allowed you to toggle it off

brisk chasm
#

might have been just a SP in between

#

hihi

#

good times

slender ember
#

I started my engine on 2008 and it's been through almost every single version since then except 2017, and now sits on 2019.

#

2022 is actually a bit faster in my experience than 2019 with really big projects.

brisk chasm
#

i was just about to say

slender ember
#

Probably because they finally ported it to x64

brisk chasm
#

vs2022 feels faster

#

ja

#

the whole addon system became a lot easier too

silver slate
#

I think 2010 was the last one without a dark theme.

slender ember
#

Yep, so it was.

cloud rivet
# cloud rivet about same frame time

I increased my max swap chain images from 2 to 3 (and had to fix some bugs) no effect on performance when you're drawing a cube of course and just 52 events per frame

#

also

brisk chasm
#

its time you throw nanite 3.0 and vsm 2.0 at it

cloud rivet
#

most of my frame is just the individual commands that you configure on a pipeline renderpass

#

that big white bar

#

it's just configuring the pipeline one item at a time

#

I can't actually see how long it takes the ms is blank

brisk chasm
#

btw, it sounded like you like ambient music too - there was some playing in your earlier recording

#

SCP: Research Center, Part 2 โ€” 3 Hour Ambient with Rain Sounds
Track: Zerofuturism - Sparkles (2022)
Inspired by Etherium Ambient:@EtheriumAmbient
Monolith - Dystopian Ambient: https://youtu.be/35yYuDNPhtY

Bandcamp: https://zerofuturism.bandcamp.com/album/obsidian

If you want to tip me: https://ko-fi.com/zerofuturism
Join YouTube Membership t...

โ–ถ Play video
brisk chasm
cloud rivet
brisk chasm
#

haha ๐Ÿ™‚

#

nice

cloud rivet
#

yeah I guess graphical representation on screen does not represent time spent on a timeline view

brisk chasm
#

tons of ai-sloppified channels are coming out of nowhere for some reason, but they have some nice ambientisms going

cloud rivet
cloud rivet
#

I just assume it's ai generated music at this point idk

brisk chasm
#

thats why measuring frametimes and performance when you render absolutely 0 is meaningless

brisk chasm
cloud rivet
#

so 0 gpu time KEKW

brisk chasm
#

fastest renderer on the planet hehe

cloud rivet
#

yeah so recording those pipeline cmds takes zero time

#

@astral hinge that thing I said about SO cmd recording taking a long time was previously misinfo because I didn't know how to use nsight ๐Ÿ˜… it's all just fence time and resetting the command buffer wait time

#

man resetting the command buffer takes longer than waiting for a fence hrm, command buffers aren't cheap I guess

#

nsight is great

#

my favorite thing about it is just works with the extensions I already request

#

I do appreciate all the hard work people are putting into renderdoc for a thing I dont' have to pay anything for, so I am not complaining

#

let me put in the ALL_COMMANDS and see if that explains my frame time being 300 microseconds instead 3ms

#

I don't know why my frametime is so much shorter now

#

I must have been doing something really dumb before

#

10 extra microsecond difference between ALL_COMMANDS and actually using proper stages

#

I guess I am just not drawing/dispatching enough for any of this to make a difference

#

alright, time to build a scene graph and load them deccer cubes

#

I think I was just doing something really dumb in my previous engine

brisk chasm
#

deth added an animated version an hour ago or so ๐Ÿ™‚

cloud rivet
#

oh

brisk chasm
cloud rivet
#

ooh with a point light

#

very nice

#

oh

brisk chasm
#

that might have beena left over from my dinglefartaroundisms

cloud rivet
#

this is in blender

#

he just animated it in blender

#

ohh

brisk chasm
#

yep

cloud rivet
#

as in

#

for me to use

#

to check my animation

brisk chasm
#

hehe

cloud rivet
#

!

#

this is great

brisk chasm
#

and potentially for StarFoxe3

cloud rivet
#

I guess I have learned that at this point performance checks are mostly a did I massively mess something up somewhere check, because there's basically nothing

#

I wonder what I was doing before that took up all my frame time I never properly instrumented the zones because the build time was just so bad that took priority

#

anyway I just need to start writing scene graph code now and then start on game code

brisk chasm
#

you done goofed up

#

somewhere

cloud rivet
#

I bet it was probably heap allocation somewhere each frame, maybe when rebuilding the scene graph

cloud rivet
#

this was dumb

#

idk

#

anyway

#

on to new things

cloud rivet
#

I think the first game play thing I will do is add recast and just figure out click and point pathing, have a scene with just a floor and move a demo cube around with click and point

#

in yesterday's stream unvestigate explained his use of recast and navmesh in great detail and it was really helpful

wraith urchin
#

Might wanna get sponza running first froge_love

cloud rivet
#

yeah

#

I mean after that

wraith urchin
#

then you can pathfind around sponza

cloud rivet
#

I don't think sponza will look like any of my levels

cloud rivet
#

well I got the scene graph stuff working

#

I need to do textures next

#

I don't want to reboot ever again KEKW

#

build time is now 4.89 s and frame time finally dropped a little bit, about down to 2K FPS from 2.5K, frame time increased to about 400microseconds from 300ish

#

still all way better than any of this was before the reboot

slender ember
#

I wouldn't stare at the microseconds too much at this stage. It's fully possible that GPU driver simply behaves differently with so little to do.

#

No offense of course ๐Ÿ˜„ I just meant compared to a full game scene

cloud rivet
#

oh right I understand. I guess I'm monitoring it because before I restarted my project I got into trouble with build time (79 seconds, and much slower frames for the same amount of geometry). I am new to Vulkan and C++ and I got myself into a pickle and have just been climbing out of it

slender ember
#

Yep, it's your project so you are free to optimize however you want. Just know that your hotspots in the whole pipeline are gonna be different with a few objects vs a few hundred/thousand objects.

cloud rivet
#

yes that makes a lot of sense, thank you

slender ember
#

Also, keep in mind that GPUs generally don't really like rendering at thousands of frames per second.

#

I mean the hardware isn't really setup to do that.

#

Or so I've heard, not really sure if it actually hurts the hardware or not. But I would probably cap it at like 500fps or something anyway.

cloud rivet
#

yes I will target 60

#

flecs has a way to cap frames I used to use in the past

#

I may use that or just write my own thing

slender ember
#

Right

#

There is something called "coil whine" which may occur with very high frame rates, but a quick googling seems to suggest it's not gonna be harmful to the hardware.

#

It's annoying though ๐Ÿ™‚

#

But yeah, vsync is probably still the "right" way to limit framerates, but in today's world with 17 different ways of doing vsync or whatever, it's handy to have a software based limiter as well if you need it.

cloud rivet
#

coil whine doesn't sound good at all heh

slender ember
#

It's not and it can vary between GPUs. Some have it, some don't.

cloud rivet
#

I actually have no idea how to do vsync with vulkan, with opengl and glfw I could change the swap interval, now I just rely on the present mode swapchain interval when my fence is released it tells me another swapchain image is ready I draw another frame

slender ember
#

It's set through the VkPresentModeKHR IIRC (it's been years since I have done raw vulkan)

cloud rivet
#

yes

#

I am using a pretty conservative present mode

slender ember
#

Anyway, I don't blame you if you get confused by vsync. I am too ๐Ÿ˜„

#

Just when you think you have it covered nvidia releases something like g-sync, and then you have to figure that out.

#

Or FreeSync

#

Or adaptive vsync

wraith urchin
#

In OpenGL FreeSync/G-Sync "just work" for me (as long as vsync is enabled), do you have to do anything to enable them in Bulkan?

slender ember
#

I don't know actually. It's my understanding that there are some "best practices" when it comes to settings if you want to get the best out of G-Sync, but I don't know if the graphics API matters.

#

I should add that I don't have a G-Sync or FreeSync monitor, so I don't know if the above tips are worthwhile.

wraith urchin
#

I don't really understand the purpose of gsync with vsync off. It's kinda weird that it's even an option tbh

slender ember
#

The tip I have seen in multiple places is to specificaly have it off in the game's settings, but then forced on in nvidia's control panel.

wraith urchin
#

Ah I see, I wish we could get some developer docs from AMD/Nvidia

#

The reddit crowd tends to be susceptible to magical thinking ๐Ÿ˜‰

slender ember
#

Aint that the truth.

#

The original "BlurBusters" article is something I have seen linked in several places though, so it might be worth looking into.

#

That thing.

#

Anyway, I am gonna stop polluting Bjorn's project with G-Sync now ๐Ÿ˜„

cloud rivet
#

I just need to add textures and then on to sponza

wraith urchin
#

Yeah the west coast just woke up KEKW

cloud rivet
#

I am typing on on my phone from bed lol

slender ember
#

It'll be sleepy time in Finland soon.

wraith urchin
#

There's always someone awake on this server

slender ember
#

Well, someone's gotta post those frogs

silver slate
#

Free thread advertising.

cloud rivet
#

When I said I didnโ€™t understand vsync with vk I more meant as a means to get a nice frametime cap. The mailbox present mode with 3 swapchain images setup I have prevent any screen tearing as with my fence I donโ€™t draw until presentation is done. Thatโ€™s why I suggested I would use a software solution

#

Thereโ€™s not any way I know off to cap via SDL and vk like I would with OpenGL

#

I just get another image and I start a frame

wraith urchin
#

Maybe there's some kinda thing you can wait on?

cloud rivet
#

Yeah flecs has a thing

wraith urchin
#

I remember back when I did DOS programming vertical retrace was just a register you read from. You had to poll it and make sure you present during that window

slender ember
#

Low-tech solution:

double dt = mTimer.getTimeSinceLastUpdate();
if(RenderOptions::getBool(RenderOptions::OPTION_FRAMERATE_CAP) &&
    !RenderOptions::getBool(RenderOptions::OPTION_ENABLE_VSYNC) &&
    mMaxFramerate > 0)
{
    BASIS_PROFILE("Wait for target delta time");

    double minDeltaTime = 1.0 / (double)mMaxFramerate;

    while(dt < minDeltaTime)
    {
        mTimer.update();
        dt += mTimer.getTimeSinceLastUpdate();
    }
}
cloud rivet
wraith urchin
#

Seems odd to have that functionality in an ecs

slender ember
#

Yeah, why does the ECS care about "frames" at all?

#

Shouldn't you in theory be able to create an ECS in local space, fill it with stuff, query it a few times and then throw it away?

#

Though I guess these days flecs might be some kind of framework covering more than just an ECS?

wraith urchin
#

What made you choose flecs over EnTT?

slender ember
#

*Local scope, not local space

wraith urchin
#

Oh right bjorn doesn't like templates is probably why ๐Ÿ˜‰

slender ember
#

Well, who does? ๐Ÿ˜„

wraith urchin
#

I legit love templates

#

Why write something twice

slender ember
#

slowly steps backwards

cloud rivet
#

I bet @thin oxide has a written about why flecs has this api somewhere. The guideline docs discuss integrating flecs pipeline in the context of frames

cloud rivet
slender ember
cloud rivet
#

I actually added a small template function. I donโ€™t mind them sparingly. I just donโ€™t want massive meta programming

wraith urchin
#

Most of my algorithms are templated

cloud rivet
#

Also I am sure flecs C++ uses templates

slender ember
#

Oh sure, I use templates. Doesn't mean I like them

wraith urchin
#

render_meshes is a template in my engine KEKW

slender ember
#

Well templates are a way to write generic functions, and data types, and I don't have a problem with that. A LOT of my zig is using comptime generics, which is the same thing, just differently presented.

cloud rivet
#

Yeah generics are handy itโ€™s just horrible in C++ compared to other implementations with bad errors, random stuff unrelated stuff breaking when you get things wrong,the lack of editor support while editing and the mix of templates and macros in fastgltf and vk bootstrap just make the code require a lot of reading to figure out basic stuff if you donโ€™t have prior context

slender ember
#

It really is.

#

Anywho, I wish I liked C++ templates, I just don't.

wraith urchin
#

Have you guys tried C++ concepts? It fixes many of the issues with older style templates

cloud rivet
#

I am not familiar with that

wraith urchin
#

It's available in C++20, which I think most of us are on now

#

If a template is written with constraints and concepts it both looks more readable and gives better error messages when it fails

cloud rivet
#

YesI am on latest

#

That sounds great actually

wraith urchin
#

Alot of libraries still support 17 so don't use them, but you can use them

cloud rivet
#

I think it is like the worst when you get RAII errors because of a template bug. Because something somewhere got lost in some scope and you get an error about referencing a deleted type you arenโ€™t using and the error line points to a macro

wraith urchin
#

Yeah macros are mostly bad IMO

#

A holdover from C

#

If you've even seen all the enable_if crap, that's all gone with constraints & concepts

true moon
#

From what I've seen it seems like flecs has more engine inside it than just a plain ECS database system

cloud rivet
#

You got your basic entities which are just integer handlers, then you got components and tags where tags are components without args, and you can create relationships between entities, relationships are I think just entities themselves, then you have systems that run code on queries,there other ways to run them. It all is scoped to worlds, which is like a namespace. The ecs state progresses through pipeline stages which you can configure to represent frame stages important to you

#

Thatโ€™s my basic understanding of how flecs works, I simplified it a bit and I havenโ€™t used v4 and I may have said something incorrect

#

I donโ€™t know if thereโ€™s more engine like features. The frame rate thing seems like a utility

#

I suspect for my game nearly most of my gamecode will be in a system

#

Thatโ€™s how I wrote blockens

#

I added a Level.cpp which translates all the gameplay objects to graphics objects and then Graphics.cpp just runs the graphics objects through the render pipeline

#

I have a graphics objects storage buffer and each surface gets a pointer to whatever graphics object it belongs to in the shader

#

Level.cpp also knows where things are in the world and knows about all the geometry, it just doesnโ€™t know about how stuff gets rendered just what state is needed for rendering

#

I am set up nicely for game play I think

#

Weโ€™ll see

#

I am sticking with it, I am done bike shedding

#

If this makes for a bad game I will make the next game differently

#

I am not revisiting any of this low level stuff right now

#

Once I have textures and add CSM back I am basically done with vk code. I will just be adding pbr images to gltf and change matrials and transforms in Level.cpp

#

No plans to use compute atm

#

Oh maybe I want decals

#

At some point

steady venture
# brisk chasm the worst ones were 2002, 2003, 2005, 2008, 2013

My experience has been the exact opposite; it got worse over time imo. I started with 2008, then 12, 13 15 17 and 19. Specifically, intellisense got more shit. I also used more and more features of c++, especially templates. But still, it is nowhere near fast as it should be.

Although, I installed 2022 and so far, intellisense is not bad at all. It's responsive at least, ctrl + shift + space consistently gives me the function signatures. And it knew what ctre types were instantly, unlike 2019 which treated it as some foreign entity.

cloud rivet
#

Oh and particles

steady venture
steady venture
# cloud rivet coil whine doesn't sound good at all heh

Yeah I was shocked 7-8 years ago when my brand new gtx 1080 was purring while studying graphics, with 3000+ fps on simple scenes. And then I learnt what coil whine is ๐Ÿ™‚
I think it's a cool phenomenon, but I'd be annoyed if it did this on 60+ fps instead of thousands-ish fps.

brisk chasm
#

my 4070 whines when i play X4 locked at 75Hz ๐Ÿ˜„

steady venture
#

Damn that's annoying

brisk chasm
#

god knows why, other games dont

steady venture
#

Iirc, each coil whine case may be due to a different part of the chipset making this noise. Although I doubt that X4 stresses the part of the chip no other game does

#

Weird

brisk chasm
#

yeah its weird

#

the engine is also as old as the universe

wraith urchin
#

Coils vibrate it's just physics, there's not much you can do about it

brisk chasm
#

but after a few mins i dont hear it anymore

#

i could try to play with nvidias control panel perhaps, but i cba

steady venture
#

I used to have my case on my desk back when I had a huge L desk and being 40-50 cm to the left of the case I could hear everything

#

Now I have it under the desk and I don't hear anything

thin oxide
#

Not related to graphics stuff

steady venture
#

@cloud rivet You probably stated this before but I missed it; What are your goals for A) specifically Rosy and B) studying graphics in general?
IIRC, graphics is a hobby for you. I understand you have a game to develop after you develop Rosy? Are there any commercial/finanical expectations for your game? Or is it a passion thing?

cloud rivet
#

Itโ€™s still just a hobby

#

I donโ€™t plan like on releasing anything

steady venture
#

Gotcha ๐Ÿ‘ Looking forward to your upgrades, so far you have a good pace it seems

cloud rivet
#

If people want to try and build my repo I wonโ€™t stop them, it wonโ€™t have any assets though

steady venture
#

How's Vulkan treating you so far

#

I'm still a GL noob

cloud rivet
#

I love vulkan, it just has zero mystery

#

Itโ€™s a lot of stuff to do to render is all

#

Vulkan makes shader life easier, because of bindless access to textures and data, and because I donโ€™t have to worry about gpu glsl bugs.

steady venture
#

Nice, looking forward to messing with it

#

Soon I hope

cloud rivet
#

if you're already comfortable with opengl and you want to learn graphics programming I think it will be a bit of a time sink and while I prefer vulkan it did take 3 months of my time to transition

#

well I also was learning C++ at the same time and well 1 month was gltf and CSM stuff

#

so probably would not take you as much time

wraith urchin
#

Also if you don't restart midway through ๐Ÿ˜‰

cloud rivet
#

this is just a little bit of house keeping so I can move fast after

#

I will have crytek sponza at least loading by end of the week I think

#

I now have a much faster build time, faster frames, a whole bunch of bugs fixed and a custom asset format, and an idea for how to build a game ontop of all this

cloud rivet
#

well, today I got to the part where I export all of the base color image and sampler info from a gltf to my asset format and ktx2 images I converted from the gltf are getting uploaded to the gpu, but I still have to create the image view & sampled image sampler descripter sets and then I have to put all that into the material buffer and then update the shader to write from it, nearly there, was hoping to have deccer cubes done by the end of the weekend, I keep underestimating how complex gltf formats are and how many objects you have to create & manage with vk

#

hope to finish it up tomorrow, but it's a workday not a lot of time for all this stuff on workdays

cloud rivet
#

Currently manually converting all the images too with the nvidia texture app

#

Would like to automate but I need to just keep my eyes on getting to gameplay

#

So taking some shortcuts

#

That tool is awesome though, converts to ktx2 and generates mipmaps and can view them

silver slate
cloud rivet
#

The code I rebooted was like a โ€œmy first ever C++ projectโ€ kinda mess you can imagine it deserved to be rm -rf and it got what deserved.

#

I got some extra rm -rf laying around if you want one

cloud rivet
#

this is fake news now, SDL3 is released

cloud rivet
#

Yesterday I was stuck for about a full hour on just figuring out what I would call what is now Level.cpp. Just frozen, couldnโ€™t make progress on code because of a naming issue

#

I still donโ€™t like the name

brisk chasm
#

Game.cpp : >

cloud rivet
#

But I couldnโ€™t not write code, but it was like a real problem for me and it didnโ€™t feel good and I donโ€™t remember having that happen before

brisk chasm
#

idk just ask yourself what that thing is supposed to contain

cloud rivet
#

I tried that

brisk chasm
#

its the bikeshed blockage

#

somebody locked you in

cloud rivet
#

Anyway it was like writers block or so

brisk chasm
#

yeah ๐Ÿ™‚

cloud rivet
#

I have PTSD from previous version names and had to avoid them so no rhi or scene

#

I looked through C4, Frogfood etc for guidance

brisk chasm
true moon
#

game.cpp is what I called my first one

#

Now I call it something_test.cpp

#

physicstest.cpp, geodesytest.cpp, networktest.cpp, etc

wraith urchin
#

Contemplating making ASO open source just to traumatize you guys with the horrors inside of it

true moon
#

Same

#

But I don't think even that would convince deccer so idk if it's worth it

#

I already made a small demo game in the exact style of srs just so I could show him

wraith urchin
true moon
#

Here's the one place I use runtime polymorphism in my project

#

Global vector of structs of function pointers

wraith urchin
#

You basically just wrote your own vtable lmao

true moon
#

Yep

wraith urchin
#

At that point I'd just use inheritance

true moon
#

This made it a lot easier for networking

#

Plus it's easier to debug than inheritance

cloud rivet
#

do_downscale_shitty_lanczos3 KEKW

wraith urchin
#

At some point I might remove the shitty part

brisk chasm
#

i am convinced that your stuff makes sense demon (unironically)

cloud rivet
#

that's the trouble, removing the shitty parts

wraith urchin
#

When it gets good

brisk chasm
#

the shitty parts will reveal themselves the more experience with the language and using it you get

cloud rivet
#

I should call it Shitty.cpp

brisk chasm
#

RosyDemo.cpp

cloud rivet
#

maybe I'll eventually have a Rosy Game Studio and Rosy's silhouette as the logo

#

the Rosy silhouette from my pfp

cloud rivet
#

I love Vulkan, and I am glad I switched, but I'm never recommending Vulkan to anyone ever again KEKW This adding images back from gltf has been so much work to do again lol. Even with bindless. I think maybe I had not fully evaluated how much work I had put into this before.

#

you know but once you do it you did it and you never have to do it again, or until the next reboot KEKW

true moon
#

hehe

cloud rivet
#

cool, my lighting is broken, I will fix tomorrow but

#

texture images โœ…

cloud rivet
#

fixed my lighting

cloud rivet
cloud rivet
#

I need to go to bed KEKW

astral hinge
#

Wait I thought Tracy showed its own fps

cloud rivet
#

so the frametimes are incorrect?

astral hinge
#

let me check

#

ah it's showing your app's frametime

#

I got confused because the tracy client also has a setting for the render rate

cloud rivet
#

nvidia shows the same thing in the overlay but I can't take a screenshot of it for some reason

#

idk

#

this is crytek not intel

astral hinge
#

nvm I'm double confused, tracy's setting is for the profiled app

cloud rivet
#

I'm I don't have any normal mapping or any of that yet

astral hinge
#

what you're seeing is your app's perf

cloud rivet
#

is that good or bad perf?

astral hinge
#

is 500 fps bad?

cloud rivet
#

the curtains have issues when I move, also I don't have any transparency or blending support yet

#

idk I have lots to do

astral hinge
#

probably aliasing. do you have mipmaps?

cloud rivet
#

yes

astral hinge
#

can you describe the "issues"

#

or show a vid

cloud rivet
#

it's in the bid

astral hinge
#

or flip-o-rama

#

oh what the heck

#

it looks like they're falling apart

cloud rivet
#

I can take a better image

#

maybe it's a sync issue

#

let me try ALL_COMMANDS

astral hinge
#

yeah the curtains are normal opaque geometry

#

maybe you're stomping on in-flight frame data like the camera matrix

cloud rivet
#

hrm

#

I just update the camera buffer whenever

#

no sync nothing

#

that's probably it yeah?

#

no staging, just mapped