#Rosy

1 messages · Page 24 of 1

astral hinge
#

I mean for optimal scheduling

#

maybe it can be a gl-style implicit frame graph

vivid barn
#

you don't need optimal scheduling you just need enough stuff for gpu to feed itself with

#

so e.g.

#

actually wym by optimal scheduling

#

just to ensure my understanding matches wym

astral hinge
#

well I just mean scheduling things that can run in parallel on different queues

vivid barn
#

right yeah

astral hinge
#

hmm actually I'm doubting myself now

vivid barn
#

I don't think even with frame graph you have enough information to make optimal scheduling decisions

#

you can't know whether punting an independent dispatch into the other VkQueue is worth a cross-VkQueue sync down the line

astral hinge
#

ok then let's just assume that the user is Smart™ and doesn't put multiple independent workloads in a single submit

vivid barn
#

you'd just go and find a free VkQueue to submit this cmdbuf to

astral hinge
#

very shrimple

vivid barn
#

provided its dependencies are satisfied

astral hinge
#

I think you could build a graph of dependencies between submits to decide where to schedule the next

vivid barn
#

I guess

#

in my toy program I went a bit further and I have basically cudaStream_t/cl_command_queue so successive commands have basically full barrier between them

#

but commands from independent things can go to different VkQueues

astral hinge
#

yeah that sounds nice indeed

vivid barn
#

but yeah while the api is shrimple the impl gets a bit involved

#

and it inevitably oversyncs on access masks

astral hinge
#

oversync is based. just tell the user to have chonkier workloads

vivid barn
#

I do

#

my cpu usage on deck is 0% frog_pregnant

astral hinge
#

average gp project be liek

vivid barn
#

all the frame time is spent inside The RT Dispatch™

astral hinge
#

ok well this is good info to have, thx for the discussion

#

my apiisms will be visible soon

cloud rivet
#

tinyexr is very slow

vivid barn
#

graduate bjorntracer and stop using tiny* libraries

pseudo dock
# cloud rivet

Is that the new skimmer? Now that I see it I kind of remember that you maybe showed it before in Maya, but is this the first time showing it in-engine?

astral hinge
#

froge_evil remove optix and use tinybvh

cloud rivet
#

nvtt I think can open exr images

#

maybe that's faster

#

or maybe I need to build openexr tools and change the compression or something

solid grove
#

are you doing the exr decode offline?

cloud rivet
#

I don't do anything offline this is a 3 week old project

#

I just open a whole bunch of files when the program starts on the main thread

cloud rivet
#

I was about to write an obj parser when I had that meltdown

pseudo dock
#

Looks good! 👍

#

The precipice meltdown? Or the Blender meltdown?

cloud rivet
#

did I have two meltdowns

pseudo dock
#

haha

cloud rivet
#

I don't use blender

pseudo dock
#

I wouldn't call either one a meltdown, but wasn't sure what you were referring to 🙂

solid grove
#

I, on the other hand, mald about blender on the regular

cloud rivet
#

I just have no idea how to do anything in blender, and I know how to use Maya pretty well

solid grove
#

though it can take a while at build time to convert them

pseudo dock
#

(I remember some moment when you tried to use Blender but then gave up quickly with kind of a "why did I think this would go any differently?" response. Let me try to find the funny comment, I think I remember it...)

cloud rivet
pseudo dock
#

#1323084490997895198 message

cloud rivet
#

oh that

#

I was just seeing what the thing looked like in blender

solid grove
cloud rivet
#

I mean I think it's good it's zipped

#

block compressed images are big

solid grove
#

I expect (though I have not measured) that the majority of that 1 second is spent in zip decode

#

each light map is 16MB uncompressed and i have 8 of them

cloud rivet
#

uncompressed when compared to RGBA?

#

block compressed images are bigger files than the png version

solid grove
#

Non-zip compressed BC6H it’s 16mb

cloud rivet
#

oh I see

solid grove
#

The PNGs blender makes are about 10-12mb

cloud rivet
#

I'm just going to start over on physics following along side the book and see what happens. idk

pseudo dock
# cloud rivet block compressed images are bigger files than the png version

PNGs (or similar standard image compression formats) are good for source control storage of original assets because of this, but when you "cook" (or whatever term you prefer) game-ready assets you want block compression even though it's bigger. You will eventually (presumably?) want block compression so that it can be used on the GPU, and so if you do it offline you can spend time on compressing and generating mipmaps and then have it ready-to-go at runtime.
(I'm not sure if that comment actually addresses what you were asking about, so apologies if not and you already know all of that 🙂 . But generally there will be some pre-processing offline stage and block compression is what you want for that, even if it is further compressed for loading like ZIP that Ravbug is talking about)

vivid barn
#

pngs are not good for anything tbh

cloud rivet
#

I am block compressing the images

#

I'm just doing it after I read the files

#

all at startup time

#

I spent like 3 months working on my asset pipeline for the original project that bears the name of this thread

pseudo dock
# vivid barn pngs are not good for anything tbh

I think I've read you (or others in this channel) say that before, so I intentionally added "or similar standard image compression formats" to try and cover that case 🙂
(I've worked with PNGs at more than one company and think they're fine, for what it's worth, but don't want to try and convince anyone differently)

cloud rivet
#

I had offline processing

#

I could actually reuse all that previous code, it still works, using that asset format I created idk

#

I'm just going to work on physics for now though, I'll check if I can make that exr load faster or I'll dump it

cloud rivet
#

woah a whole new project

astral hinge
#

172 loc to double a number 💪

astral hinge
#

an experiment in api simplification while retaining useful flexibility and perf (as outlined by that recent blog post)

#

at the cost of everything that isn't a modern dGPU

cloud rivet
#

When can I rewrite my project using graphics 2

#

gfx2

astral hinge
#

right now if all your project does is dispatch compute shaders that only access buffers

vivid barn
#

I'd do pointers in the other direction btw

#

gfx_host_to_device_ptr is bad

#

cuda also does that

#

bäd

#

it would be better to start off with device ptr and then have a function to map it to host

#

that way when filling out structures that are shared between host and device you don't need to gfx_host_to_device_ptr when writing the pointer and gfx_device_to_host_ptr when reading, you'd only need the reading call

#

perhaps make a gpu_ptr<T> type

#

anyway now tie it together with vcc.

astral hinge
#

yeah I think u're right

#

hmm, but being able to immediately write to the pointer you got is useful

#

I think it's not clear cut, but yeah I'll have to call host2devicePtr a lot more than the other way around

#

the good thing about the current design is that you can use it like normal malloc, then you have to do something special to pass it to the gpu domain

#

having it return a not-immediately-usable pointer that you have to call a function on to get the usable pointer goes against my intuition

vivid barn
astral hinge
#

that's a wrap(per)

cloud rivet
#

@shut hornet you were right about hdr, I switched to hdr and removed tinyexr. nvtt can load hdr but not exr and now I just have one image library that loads everything and the applicaition starts immediately

cloud rivet
#

I think exr is a better format overall I just don't right now want to put the work into it

shut hornet
#

i also have rapidjson, but switched to cereal, so i can remove that too

cloud rivet
#

alright I got to the end of chapter 4. I'm going to play around with some particle physics and figure out how to render some particles

#

I think the physics engine I will build as part of this book will be sufficient for my little racing game

cloud rivet
#

I'm going to figure out how to do a sphere acceleration thing

#

that's an option in OptiX

#

going to try to use that for my particle, it just has an origin and a radius

vivid barn
#

because it very well might

#

ik splines don't

#

but swept spheres I'm not sure

#

optix docs I swear

cloud rivet
#

isect?

#

it's just another form of a geometry acceleration structure

vivid barn
vivid barn
#

without it aabbs won't be intersected

cloud rivet
#

I don't think so?

#

maybe

#

let me look through the sample

vivid barn
#

and I'm wondering if it's the same for spheres

cloud rivet
#

it just uses a ray gen shader in the sample

vivid barn
#

i c ig then spheres work fine on their own, without IS

cloud rivet
#

hrm

#

intersect are their own kind of GAS I think

#

separate from spheres

#

I don't know

vivid barn
#

yes

#

ok nvm

cloud rivet
#

hrm

#

trying to figure out how to compute sphere normals

#

this is what the sample code has:

extern "C" __global__ void __closesthit__ch()
{
    float  t_hit = optixGetRayTmax();

    const float3 ray_orig = optixGetWorldRayOrigin();
    const float3 ray_dir  = optixGetWorldRayDirection();

    const unsigned int           prim_idx    = optixGetPrimitiveIndex();
    const OptixTraversableHandle gas         = optixGetGASTraversableHandle();
    const unsigned int           sbtGASIndex = optixGetSbtGASIndex();

    float4 q;
    // sphere center (q.x, q.y, q.z), sphere radius q.w
    optixGetSphereData( gas, prim_idx, sbtGASIndex, 0.f, &q );

    float3 world_raypos = ray_orig + t_hit * ray_dir;
    float3 obj_raypos   = optixTransformPointFromWorldToObjectSpace( world_raypos );
    float3 obj_normal   = ( obj_raypos - make_float3( q ) ) / q.w;
    float3 world_normal = normalize( optixTransformNormalFromObjectToWorldSpace( obj_normal ) );

    setPayload( world_normal * 0.5f + 0.5f );
}
#

pretty straight forward

#

hrmm

#

so the place hit is world_raypos

#

ok I don't actually need to get that

#

since it's just origin

#

and the radius is hard coded

#

I have to translate the origin though from the instance transform

#

via optixGetInstanceTransformFromHandle

#

I'm going to continue this at a later time as I am tired now and I have to back to work Monday

#

I think I will have particles before EOD though

pseudo dock
#

back to work Monday
Oh no, I thought you had off for the rest of the year! They are making you go back right before Christmas?

cloud rivet
#

I want to go back because I need to have a job

#

can you generally take a full month off where you work? it's not like they shut the company down

#

I personally don't celebrate christmas, it's not a holiday for my family

#

we do have holiday decorations up, because it's festive

dry apex
cloud rivet
#

that's an amazon link to a book

#

idk I just clicked the share link and I hadn't ever done it before

#

the url looks weird

pseudo dock
cloud rivet
#

that would be really cool if I did

cloud rivet
cloud rivet
#

I totally missed it

#
 OptixBuiltinISOptions builtin_is_options = {};

  builtin_is_options.usesMotionBlur = false;
  builtin_is_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_SPHERE;
  OPTIX_CHECK_LOG(optixBuiltinISModuleGet(
      ctx.game_ctx->optix.context, &module_options, &pipeline_options,
      &builtin_is_options, &ctx.game_ctx->optix.sphere_module));
// later..
    OptixProgramGroupDesc hitgroup_sphere_desc = {};
    hitgroup_sphere_desc.kind = OPTIX_PROGRAM_GROUP_KIND_HITGROUP;
    hitgroup_sphere_desc.hitgroup.moduleCH = ctx.game_ctx->optix.module;
    hitgroup_sphere_desc.hitgroup.moduleIS = ctx.game_ctx->optix.sphere_module;
    hitgroup_sphere_desc.hitgroup.entryFunctionNameCH = "__closesthit__sphere";
#

took me a long time to figure it out

vivid barn
#

😤 😤 😤 😤

cloud rivet
#

I need some kind of way to track these sbt records better

#

it's a mess

#

the number of sbt records is different than the number instances, I really need to think about a nice way

#

right now I have a hit record index I increment and store, but it's weird

#

I think I need to reorder some of this code maybe

#

it's just a bit error prone right now

#

there's my sphere though

#

I think I need to rewrite the optix init part, I had no idea what I was doing when I started and it's all very messy

vivid barn
#

I forgor how sbt looks gimme a sec

#

ok I reember now

#

I suggest you size hit SBT to be max no. of instances times max. no of geometries per blas

#

you don't have to hardcode either but these numbers have to be either decidedearly on or you need to be able to grow them at runtime

#

for a start I'd just hardcode them but avoid relying on them being hardcoded

vivid barn
#

if you assume there's one blas per object (which is a perfectly reasonable assumption don't @ me) it's very shrimple

#

you just fill out the sbt entries corresponding to that object with materials you want that instance to use

#

you can push choosing object indices etc to another part of code

#

but it's very shrimple just have a bitmap or w/e

shut hornet
pseudo dock
cloud rivet
#

farthest first?

#

fixed function?

vivid barn
#

fixed function yes

cloud rivet
#

hrm, I don't think I'm going to rewrite anything until I get to SER and callables

#

this shit's just going to get more complex

vivid barn
#

guh

cloud rivet
#

are you not using fixed functions?

#

I don't know what I'm doing long term

vivid barn
#

by fixed function I mean using optixTrace over optixTraverse

cloud rivet
#

oh

#

so traverse and invoke

#

vs trace

vivid barn
#

ye

cloud rivet
#

oh hrmm

#

I think I would prefer that

vivid barn
#

it's easier to iterate upon

cloud rivet
#

that's just like doing everything in ray gen?

vivid barn
#

basically

cloud rivet
#

fuck yes please

#

this currently feels as messy as working with descriptors

#

hrmm

#

I'll try that out

#

oh yeah

astral hinge
cloud rivet
#

so after a hit I can just get all the information in ray gen I could get in a closest hit shader

vivid barn
#

you should ofc still structure things reasonably so you'll carve closest hit part into its own bit but you won't have to deal with api split for now

#

if you want your thing to run fast you'll eventually want to get things back into FF traversal

#

also optix 9 was the one that first introduced ser right?

#

or was it 8

#

doesn't matter

#

in any case even with FF traversal closest hit invocation is now decoupled

#

so imo that's a pretty good balance

#

you can use SBT so that FF traversal can poke intersection and anyhit etc stuff as it needs

#

but choice of closesthit is up to you

#

and also you get berf

cloud rivet
#

ah I see, I will stew on it a bit while I work on physics

vivid barn
#

it requires the least thinking

#

FF traversal is a perf optimization more so than something convenient tbqh

#

I kinda don;'t like how it's like

#

a big jump from ray query to FF trace ray

cloud rivet
pseudo dock
#

The skimmer has new functionality!

cloud rivet
#

I am going to keep going with the FF SBT stuff. It’s kind of a fun challenge. Writing raygen shader code is going to be part of it anyway.

#

Anyway I got it working pretty well with gltf scenes and materials in a way that feels like can iterate and build on. It’s all the other stuff that I also want to do like particles, skinned animations and procgen that’s kind of where I have a lot of unknowns with respect to SBT stuff

#

My goals do not include a brdf super pathtracer with super amazing GI and mind blowing opacity and lighting effects

#

I am good with good enough

cloud rivet
#

#vulkan message I didn't realize there's NVIDIA specific swapchain stuff in VK, I should take a look at it and use it since I'm NVIDIA bound anyway

#

I'm going to create a ps_gpu.cpp/ps_gpu.h because my optix code is all over ps_game.cpp and p_scene.cpp and it's becoming unmaneagable

#

the thing I am actually working on is a smoke particle effect

#

just going to do a little bit of reorg

cloud rivet
#

I cleaned up a lot of stuff, if it doesn't have any business being a cu file I made it cpp and pulled out all the cuda/optix context stuff. I made a ps_gpu.cpp and moved all of the cuda optix context and gas/instance/sbt/pipeline buidling into it. I removed a ton of functions, I have large functions now but at least all the code is together now instead of spread across a bunch of files which led to a lot of problems with coming up with solutions to problems and made it hard to debug things.

#

I had all these dependencies across the scene building and game code that were hard to reason about, and nowit's all just in one place in big fat functions

cloud rivet
#

I should do really dumb things with cuda intentionally while profiling with nsight systems to see what those dumb things look like in the profiler report, like intentionally add a memory leak, intentionally over sync, create too many textures, write intentionally "divergent" kernel code, I don't know just break whatever I can think of.

astral hinge
#

make a loop in your raygen shader that traces rays

cloud rivet
#

I don't have skinned animations yet, but with skinned meshes where one has to rebuild the GAS per frame, one can just keep all the vertices in gpu memory and run the skinning in a kernel and then just call a rebuild on the same memory every frame.

#

that's how this is normally done I guess?

#

compute dispatch in vk is where you'd skin the vertices on a buffer used to build the blas

#

you wouldn't want to do all this on the host and then upload the mesh every frame I imagine

solid grove
#

yeah I do the mesh pose on the GPU in a compute shader writing to a storage buffer, then use the storage buffer to recalculate the BLAS

#

make sure to use update mode because otherwise the rebuild will be very slow

cloud rivet
#

the optix guide says to update, but rebuild at times otherwise the quality of the AS degrades

#

it's not more specific than that

#

I have an AS per fif so I dont think it will be too big of an issue to rebuild the gas when I need to

#

well the gas are not per fif, but I guess skinned meshes would need to be

vivid barn
#

armature deformations (skinning) aren't the only kind of deformations one might want

#

of easy examples there's also vertex deformations (shape keys or w/e called in blender)

cloud rivet
#

nurbs?

vivid barn
#

no

#

"vertex animations"

solid grove
#

common way to animate grass

vivid barn
#

haha.,,, grass....

cloud rivet
#

I see

#

I'd probably animate grass in optix using the built in curves thing

#

but yes

vivid barn
#

you can represent some limited motion in optix yes but that's intended for time sampling (so you can do good motion blur) rather than actual animations

cloud rivet
vivid barn
#

ok where's the animation here though

cloud rivet
#

oh

#

it's also vertex data

#

hrm

#

yes

vivid barn
#

anyway you animate curves the same you'd animate meshes

cloud rivet
#

The B-spline control points of each curve strand will appear sequentially in the vertex buffer.
The index array contains one index per segment, namely, the index of the segment’s first
control point. For example, a cubic curve with three segments will have six vertices. The
index array might contain {10, 11, 12}, in which case the 3 segments will have control
points: {v[10], v[11], v[12], v[13]}, {v[11], v[12], v[13], v[14]} and
{v[12], v[13], v[14], v[15]}.

#

yeah

vivid barn
#

if your mesh^W geo processing writes stuff out to memory it can be decoupled from the renderer

#

which is very nice

#

you have all the flexibility

solid grove
#

this reminds me, my raytraced shadows doesn’t properly handle vertex animated meshes. I’ll need to generate a compute pipeline based on the vertex shader to generate all the buffers for the BLAS builds

vivid barn
solid grove
#

might get gross for meshes that both have skeletal and vertex animations

vivid barn
#

ofkaslfkjasklfj

solid grove
#

well I want to have a flagpole and use bones for the primary motion and vertex animation for secondary motion

vivid barn
#

what stops you from having vs consume meshes written out by the compute dispatch that does the processing (deformations in your case)

solid grove
#

i don’t want to do that in all cases because of the extra memory it uses

#

my test track is already over a million tris

vivid barn
#

wow,... en entire morbillion....... that's like 24e6 bytes or what

#

time to stop talking brain damage

#

anyway yes that seems like not a lot

#

topo^Wconnecctivity-preserving processing usually only needs to touch position and normal no?

brisk chasm
#

i agree with nano here

#

what 1 mio verticles does to a mf

cloud rivet
#

my sbt setup fits in my brain now. I'm not saying it's good, but at least it finally makes sense to me

#

I have one hit group record for each of my particles types, one for my debug cubes, and then one for each of my gltf asset node instances

#

I only have two particle types right now, a projectile particle and a smoke particle

cloud rivet
#

but I can spam a lot of them and for each type of particle they all just refer to the same hit group record so I don't blow up the sbt records

#

the hard coded sbt records each consume a hard coded index, so for example the smoke particle gets a hit group at index 2. and after all the dedicated indexes the node instances are offset by the number of dedicated hit group record indexes and are just incremented

#

we'll see how this scales, probably wont, but it works for now

cloud rivet
#

the optix samples do a cool thing where they send a pointer to stack memory in the raygen shader along with the trace

#

they pack the pointer into two unsigned integers

#
static __forceinline__ __device__ void* unpackPointer( unsigned int i0, unsigned int i1 )
{
    const unsigned long long uptr = static_cast<unsigned long long>( i0 ) << 32 | i1;
    void*           ptr = reinterpret_cast<void*>( uptr );
    return ptr;
}


static __forceinline__ __device__ void  packPointer( void* ptr, unsigned int& i0, unsigned int& i1 )
{
    const unsigned long long uptr = reinterpret_cast<unsigned long long>( ptr );
    i0 = uptr >> 32;
    i1 = uptr & 0x00000000ffffffff;
}
#

this is way better than what I've have been doing lol

brisk chasm
#

can you use uint64_t?

#

and uint32_t?

#

<cstdint> or <stdint.h> idk if you still do c or not

spiral ice
#

This is CUDA code (unless you want to use cccl, there is no C standard headers)

brisk chasm
#

damn

spiral ice
brisk chasm
#

they seem to have uint16x4, float32x4 so might as well have uint16, float32, uint64

cloud rivet
#

the params given to trace must be unsigned integer

#

it's required by the OptiX API it's not a cuda thing

#

that's why they're being packed and unpacked

#

it's very burdensome to use the optixGetPayload_N and optixSetPayload_N just passing a pointer to a struct on the ray gen shader stack is brilliant

spiral ice
#

I am not sure what the performance implication of this is. But if even Nvidia's own samples just use the first two 32-bit payloads to pass pointers, it should be fine

cloud rivet
#

I think sticking more data on the payload impacts performance

#

I'm not sure how reading from stack memory in the raygen shader does

#

I don't really have any perf problems right now, I am barely doing anything

brisk chasm
#

its time to barely doing something then

cloud rivet
#

yes

cloud rivet
#

Been working for three days now on smoke particles. I am really close

cloud rivet
dry apex
#

bro actually cooked

cloud rivet
#

I wanted to have the smoke fade out but that would require I think rewriting my shaders to use any hit and traversal, which I will do at some point, but didn't want to do as part of this now

#

I currently want to go through the physics book and complete the physics portion of the game

solid grove
cloud rivet
#

I am using the built in sphere primitive which takes a radius and position for the vertex information to build a gas (the optix version of a blas), which requires an intersection program module to be specified when creating the pipeline

#

the other thing that was new to me that I used as part of this is the visibility mask property on the instance

#

it's really cool because you can have things be visible to some rays and not to others

#

I'm not using that feature here now for anything other than showing and hiding however

#

but you can use it for cutouts for example

solid grove
#

i wonder if that’s more efficient than removing the item from the TLAS, since that’s how I’m doing visibility

#

at least for full objects

cloud rivet
#

well I don't have rebuild or update the ias (the optix version of the tlas) when I change visiblity

#

well

#

I do

#

sorry that was misinfo

#

I was just already doing it

solid grove
#

I have to rebuild the TLAS every frame just because the objects move so maybe it’s free in that sense

cloud rivet
#

yeah yeah I have to do that too

#

I mispoke

#

it's easier for me in my code as of now to just set the visiblity than remove/add instances

solid grove
#

wonder if there’s any perf overhead for masked-out rays

cloud rivet
#

I am going to blindly guess it is O(N) for this, and not having the instance would make N less by whatever you're deciding to not draw and it won't matter much

#

I should increase the particle count until it blows up, let me try that

#

it slowed dramatically when I went up from 100K to 1M

#

this is 1M

#

it can't even emit them all

#

I think the number of instances does impact the ias perf

#

this is 100K, the perf just falls off a cliff suddenly

solid grove
#

I don’t think my particle system would work that well with 1M

#

overdraw hell

cloud rivet
#

I am going to see what this looks like in nsight systems

#

what the difference is

solid grove
#

the actual computation of the particles would be fine tho I think

cloud rivet
#

yeah I read something in the guide about number of instance perf

#

I'm also ignoring limits

#

so maybe this is ub

#

there's a limit to the number of instancs and I don't query or consider it

#

let me actually do that first

#

I don't think it will be interesting to investigate how ub impacts perf

#

I don't think I'm hitting the limit 2^28 = 268,435,456

#

profiling the two builds now

#

oh you know I should profile with a release build

#

and turn on all optix optimizations

#

still slow at 1m

#

trying the multi report view hrmm

#

so I see at 1M I in a "Blocked State" and I am not in 100K

#

that's dramatically different in the ETW Microsoft-Windows-DxgKml threads view

#

in 100k I am using 38 threads and in the other I'm using 40, I think I'm CPU bound

#

I think the GPU is doing less with 1M particles

#

the memcpy take 10x longer

#

I can keep all that memory on the gpu and do the work there

#

and then I can remove the memcpy

#

that makes sense, it is 10x to go from 100K to 1M

#

it ends up stalling out a bunch of other stuff

#

mystery solved

#

I am not going to move my particle math to the gpu just yet

cloud rivet
#

oh I can open the report in notepad++

#

let me dump it into claude and see what it thinks

#

oh the files are too big

#

I can take shorter profiles

cloud rivet
#

it's just too much data

cloud rivet
#

tscoding convinced me I only need a 2d canvas context and division by z so I'm gonna do that from now on

cloud rivet
#

I'm going to implement the book's force generator concept and switch my particles and the circuling cubes to use it, so now everything moving will be in the physics engine

#

I'm going to add that to my list of things I won't be doing

cloud rivet
#

I'm just going to use stretchy buffer anyway

#

ah man fine I use stb_ds

astral hinge
#

what for?

cloud rivet
#

dynamic arrays and hash maps

astral hinge
#

aren't you using c++ for your current project?

cloud rivet
#

yes

#

std is not available

#

in some contexts

#

and I don't want to use std

astral hinge
#

hmm alrighty

cloud rivet
#

I like stb_ds

#

ok I pulled my particle stuff out of game code and now have a physics subsystem responsible for doing integrations

#

I can start adding the force generators tomorrow

#

and then I can make the circling cubes, which are hard coded animations, actually be part of the physics engine

#

then the next chapter is springs, which I maybe I get to over the weekend

vivid barn
cloud rivet
#

yes I want to try doing more things on the gpu

sinful agate
cloud rivet
#

Yeah he does some cool stuff

cloud rivet
#

my game dev journey was a CLI hang man game with zig, a 2D opengl snake game with zig, a 3D opengl voxel game with zig, a calamity of failures ever since, all occurring after I joined this server actually. you know what I learned from joining this server is that I didn't actually know anything, when I thought I knew enough to make a game

astral hinge
#

you actually do know enough to make a game, but your ambition grew

#

now you're trying to make a 100% accurate physics based racing MMORPG

cloud rivet
#

with photorealistic PBR real time cinematic graphics

#

I'm going to complete this game it's going to be game like

#

no more fails

shut hornet
cloud rivet
#

the more I go the less I realize I know, it's just an endlessly deep abyss

cloud rivet
#

ok my particles are now using my force generators, next I will make the circling cubes particles that have a force applied to them to explain their circling instead of that just being a hard coded animation

#

the book uses virtual functions to emulate an interface, which is pretty convenient

#

but I made a tagged union for force generators and switch on the type and then have a function that does applies the force based on the type of force generator it is

solid grove
#

this may or may not be of interest to you but the way I did particles was as a sequence of compute shaders. init shader runs whenever a particle is created and sets the particle’s starting state, update shader calculates the new state of the particle. for mesh particles, a selector shader chooses which mesh in the set the given particle uses. with this I can make pretty much any effect I want, and also compose the parts, though it’s a little clunky to set up. I think with CUDA kernels this could be done a lot more cleanly

#

eg when you crash through an item box, the init shader gives the particle a random position, rotation, and velocity, the update shader implements a basic gravity system and causes the particles to bounce if their Y value goes below a certain amount (so they don’t clip into the road), and the selector shader chooses one of the pre-generated box fragment meshes

cloud rivet
#

I love that

#

Yeah I plan to move everything to the gpu

#

I think given I just have a pointer of particles it will work nicely on the gpu

solid grove
#

yeah for me the particle datas are stored in a single buffer with atomic counters to indicate the current count. The particle system itself decides what the layout of the per-particle data and what data it wants to store

#

eg “this effect has 16 bytes of per-particle data and the first 3 members are floats for the position”

cloud rivet
#

I think a union will let me have one size for all the particle types

#

That may turn out to be not ideal

solid grove
#

you end up having unused space per particle for simpler effects with a union

#

I found it wasn’t super difficult to make it configurable

#

The emitter just knows about the total size of the per-particle data and the shaders decide the layout since the emitter doesn’t care about that

#

basically just amounts to #include a struct and using that as the buffer’s per-element type in the shaders

cloud rivet
#

Nice makes sense

#

Your system is what I will aspire to

solid grove
#

the ability to have arbitrary code drive the particle behavior is a game changer for me. kinda weird that no other engine (that I’m aware of) handles particles this way

#

it’s always a parameter dump or a very limited visual scripting system that generally doesn’t allow for reading random buffers or doing conditional logic

cloud rivet
#

outside of a geometry shader experiment I once did in opengl this the first time I have had particles in a game

bronze socket
upbeat ember
#

you almost finish pushing the boulder and realize the boulder could be more efficient

cloud rivet
#

I'm not going to do this by simulating gravity or anything however

#

hrmmm

#

I'll iterate on it

#

it's just going to accumulate as part of the particle's force accumulator so other forces can affect the particle that has this generator, but I will start with a hard coded orbit, I could attenuate the force based on distance to the point or something idk

brisk chasm
#

3bodyproblem wants to have a word soon

cloud rivet
#

I never watched that show, is it good

brisk chasm
#

xD

#

the first season is ok, but then i read the books

cloud rivet
#

I don't even know what the show is about, I just know it's in the popular culture

brisk chasm
#

its an overhyped story, which is a little weird to read

cloud rivet
#

Idk why but I bought one of those raspberry pi 500+ keyboards

#

and a screen and a mouse, no idea what I'm going to do with it

#

I can't run my thing on it it has broadcom hardware

#

ok back to orbits

solid grove
#

i too have a collection of raspberry pis collecting dust

#

i used to run discord bots on them but I eventually moved those to a VPS free tier

#

very early on I had a build of my engine running on the pi but it quickly outpaced what the pi hardware supported

brisk chasm
#

donate it to some school, or have your kids code on them, if they want to

shut hornet
#

i just donate stuff, like anytime someone is like "may I need to get a new SSD" I'm like "you won't believe this"

#

i just gave an "extra" 5060 Ti to my buddy's niece yesterday

#

she's trying to play that Avatar Pandora game on a GTX 1660 💀

solid grove
#

my workplace has one of those buy-nothing channels and I've given away a lot of stuff there

#

i've also sold stuff there that is too big to sell on ebay

shut hornet
#

yeah, so down in my lobby where i live there is a table that has become the "free stuff" table

#

like every day there is at least 1 or 2 things there, sometimes new cloths people never wear or could be things like a silverware set or whatever

#

i left a PS5 game by the tree for xmas, or people leave cosmetics or whatever

#

the management sends an email every month that "that table downstairs is NOT a free stuff table" but been here 5 years, they can't stop us

cloud rivet
#

that aligns with the portland vibe

solid grove
#

my family gave away a plasma TV at a garage sale because we could not find anyone who wanted to buy it, even for $10

shut hornet
#

yeah, but people in portland are weird. one time there were used panties, another time it was a supermarket pack of meatballs

cloud rivet
#

we put free stuff on the curb all the time

#

other people in our neighborhood do also

shut hornet
#

no doubt

cloud rivet
#

yeah I put some free stuff out that was actually really expensive

solid grove
#

i managed to sell a USB PCIe card on eBay, but nobody wanted a similarly-priced WiFi card. that one became a work giveaway

cloud rivet
#

I bought these Williams-Sonoma cutting boards that turned out to be way too big

#

and we kept them around and they just took up space

#

they were really expensive, I should have looked at the dimensions, they were huge when they arrived, and I was just looking at the pictures

#

they should put a banana for size next to them

#

in the pictures

cloud rivet
#

my orbit math has issues, I think the next chapter or subsequent chapters will help me with it, would be cool to have generic orbiting force that works well

#

but it's all based on my physics engine now, no more hard coded animations

#

the problem with the orbit math is the damping I have to add, because the velocity accumulation turns it into not an orbit

#

anyway the spring chapter I think covers this

cloud rivet
#

I'm going to try to use a buoyancy force to simulate the hover, it was in the spring chapter. I will also use a stiff spring to prevent the orbit force from overshooting the orbit forcing the damping, and I'm going to do some other spring stuff

#

right now the skimmer is just in a hard coded position, I'll give it controls now, it'll be buoyant, I will set hover level as the plane on which it is buoyant. and then I can move around. I'll make the camera follow skimmer using a spring. I won't have collisions for a while yet

#

a couple of chapters out

shut hornet
#

you can cheat

cloud rivet
#

yes I can see that might work. I'm following along a book

#

the math in the book is pretty simple, there's a plane, there's a max depth, which will be the height of my vehicle, and then you apply a force equal to the weight (force of the vehicle's mass) for the amount of the mass that is beneath the plane

#

if the vehicle is above the plane there's no force, if the vehicle is completely under the plane it is the max amount of force

shut hornet
#

that was a hack, would not recommend it. just meaning you can use the functions you have to simulate missing functionality

cloud rivet
#

yeah I am pro hacks

shut hornet
#

especially since a lot of libraries don't even bother with stuff like air friction

cloud rivet
#

my initial attempt at a vehicle was all just a bunch of hacks

shut hornet
#

or tire pressure and stuff for serious racing games

cloud rivet
#

I have a drag force already, it will not be realistic however, it just applies a drag that increases as the velocity increases

#

the drag is equal to k1 * dt + k2 * dt * dt

#

k1 and k2 are constants, the k2 constant applies more drag than the first the greater the velocity

#

so right now I'm going to edit my scene a little to make it so I can navigate my skimmer around

#

not going to start with the track until I get well into rigid body physics since the track requires orientation

shut hornet
#

yep

cloud rivet
#

why the fuck did windows decide to lose all my pinned icons out of the blue in my taskbar

#

unpinned one, reopened the app, and it reloaded all the icons, ok great

shut hornet
cloud rivet
#

:(

cloud rivet
#

switched to agx tone mapping

astral hinge
#

your pixels are looking good

cloud rivet
#

thank you

brisk chasm
#

was about to say the same

#

and you changed the skybox

#

or its just a different angle on that germanly named berg

cloud rivet
#

different skybox

brisk chasm
#

warmer 🙂

cloud rivet
#

yes

#

I'm going to be moving around the skimmer pretty soon here, need to build out some terrain to move around in

brisk chasm
#

no more ribbon?

cloud rivet
#

oh I will bring that back I think

brisk chasm
#

ah

cloud rivet
#

it's going to be all flat until I have the physics for orientation

solid grove
#

When I was working on an aircraft simulation software I learned that in a lot of cases the aero people don’t even bother and just build physical models of their wings, stick them in a wind tunnel, and measure every 5° rotation increment

#

then the tables get imported into the software

bronze socket
#

that's pretty interesting

#

I had the idea forever ago to use some FOSS CFD software to do similar but for sail shapes, since a lot of the same principles apply

solid grove
#

you can use CFD on any shape, though for things like wind sails the sail itself changes shape as it interacts with the wind which makes it more expensive to simulate

#

a fixed wing aircraft also deforms a small amount but that gets captured in the wind tunnel test

bronze socket
#

yeah my plan would've been to just run them as if they were solid at various angles/curvatures and just build some kind of regression

#

would be cool to do sometime since I think that information isn't readily available anywhere surprisingly, I think it's all squirreled away to naval engineering firms

brisk chasm
#

i can see how DR builds a makeshift wind tunnel in his room

#

too big to enter/leave the room properly, you always have to do some sort of parkour

#

and everytime you open the door you bang it against the contraption

#

but when it runs, it vacuums the whole house in seconds

bronze socket
#

luckily instead of scrounging in the garbage for spare 100kw motors I can probably just use this

brisk chasm
#

but you miss out on the humm when the 100kw motor spins up 🙂

solid grove
#

I think we didn’t run CFD because we were making VR pilot training software and so it needed to run in real time

#

the project got cancelled before we did any meaningful pilot tests tho rip

cloud rivet
brisk chasm
#

that looks very cool already

cloud rivet
#

thanks, I'm really surprised by how dramatic colors are with agx

#

tone mapping is cool

#

going to work on gamepad controls next

cloud rivet
#

I can't get over how cool these colors look.

solid grove
#

very vaporwave

cloud rivet
#

oh I haven't heard of that, interesting

#

idk it works for me for now

#

eventually I'd like a height map based terrain I think

#

I wanted to be done with scenery and colors but I couldn't help myself

#

I'm done now though, back to physics

cloud rivet
#

starting on gamepad stuff

solid grove
#

gotta have shake to do a trick-boost from mario kart wii

cloud rivet
#

do xbox controllers have that functionality

#

thats what I have

solid grove
#

nope agonyfrog

cloud rivet
#

rip

#

I love xbox controllers

#

perfect for my hands

solid grove
#

i don't think any first-party xbox controllers have motion sensors

cloud rivet
#

that is sad

#

I remember reading once how microsoft spent $1bn on researching their controller tech

#

sounds ludicrous thinking about it now

solid grove
#

is that in total or for just one controller?

cloud rivet
#

maybe it was $100m

#

let me google it

solid grove
#

though the Xbox division at MS is so incompetently managed that I can see that happening

cloud rivet
#

$100m

#

my brain inflated it

solid grove
#

maybe that's what the equivalent is in 2030 dollars

cloud rivet
#

well this was apparently 13 years ago

#

I blame all the billions spent on ai for confusing me there

#

man

#

the native win32 api for xbox controllers is way better than the SDL stuff

solid grove
#

really? i thought the SDL api was pretty easy for controllers

cloud rivet
#

well I mean I have an event for all of the buttons

#

hrm

#

maybe I am missing something about the events

solid grove
#

there's SDL_EVENT_GAMEPAD_AXIS_MOTION

#

exerpt from my code:

case SDL_EVENT_GAMEPAD_AXIS_MOTION:
{
    // need to remap values in range: https://wiki.libsdl.org/SDL3/SDL_GamepadAxis
    float gaxisvalue = event.gaxis.value;
    switch (event.gaxis.axis) {
        case SDL_GAMEPAD_AXIS_LEFTX:
        case SDL_GAMEPAD_AXIS_LEFTY:
        case SDL_GAMEPAD_AXIS_RIGHTX:
        case SDL_GAMEPAD_AXIS_RIGHTY:
            gaxisvalue = remap_range<float>(gaxisvalue, SDL_JOYSTICK_AXIS_MIN, SDL_JOYSTICK_AXIS_MAX, -1, 1);
            break;
        case SDL_GAMEPAD_AXIS_LEFT_TRIGGER:
        case SDL_GAMEPAD_AXIS_RIGHT_TRIGGER:
            gaxisvalue = remap_range<float>(gaxisvalue, 0, SDL_JOYSTICK_AXIS_MAX, 0, 1);
            break;
        default:
            break;
    }
    ProcessAxisID(event.gaxis.axis + Special::CONTROLLER_AXIS_OFFSET, gaxisvalue, Make_CID(event.gdevice.which + 1));
}
#

there's also SDL_EVENT_GAMEPAD_ADDED, SDL_EVENT_GAMEPAD_REMOVED

cloud rivet
#

I want the shoulder and trigger buttons

solid grove
#

trigger is SDL_GAMEPAD_AXIS_LEFT_TRIGGER and equiv for right

cloud rivet
#

are you using SDL2?

solid grove
#

there's also SDL_CONTROLLER_BUTTON_RIGHTSHOULDER and equiv for left

#

nope, sdl3

cloud rivet
#

I don't see those

#

looking at the header file

solid grove
cloud rivet
#

oh

solid grove
cloud rivet
#

<SDL3/SDL_gamepad.h>

#

I was looking in events

#

SDL_events.h

#

it had like 5 gamepad events in there

#

oh these aren't events

#

ah I have to cast the event to a gampead event

#

ok this works

#

nice yes this gets me all the things I need

pseudo dock
# cloud rivet I love xbox controllers

They are also my favorite. I really like the asymmetry of the analog sticks. I also like the colors of the four right hand buttons (although they have moved away from that). I thought the triggers felt better than L2/R2 of the PlayStation controllers (the x360 triggers were my favorite, though). I also quite like the paddles on the elite controllers even though they don't come with the standard ones.

cloud rivet
#

I like the elites except the metal buttons would come off and I would lose them

#

if that's the elite I'm thinking of

#

I had a fancy version

#

I just by the regular controllers now they are really good

pseudo dock
#

I think my current one is the Elite 2, maybe? And I never had an original Elite version. There are metal magnetic things that come off but I haven't personally had problems with them falling off

#

Yeah, I agree with you, the controllers feel really good in my hands (except that I miss the x360 triggers hehe)

cloud rivet
#

it was't magnetic if I recall, they were replaceable, which is nice, but I just have the hardest time with those things, it was a really nice controller, it's just I am good at losing things

gaunt drum
cloud rivet
#

thank you!

cloud rivet
#

trying to get this thing to move rn

cloud rivet
cloud rivet
#

so as part of working on the springs chapter, the springs I will add are:

  • camera will be connected to the skimmer by a spring
    the camera itself will be a physics particle (eventually rigid body for collisions)
  • the skimmer will use a buoyancy spring to hover instead of being hard coded at a Y
    the buoyancy plane will be hard coded until I have collisions
  • I will add a homing projectile that will connect the projectile to its target via a spring
  • I will fix the orbital force to use a stiff spring so it doesn't require orbiting particles to have a severe damping value
cloud rivet
#

Another book I got

cloud rivet
#

I think my non-debug UI will be rasterized in CUDA, it'll just be a screenspace 2D texture atlas

#

I kind of want to add some audio and some non-debug ui before I go on to the next chapter after springs

#

the physics is going to be more interesting once I have orientation, without orientation the homing projectile will just move in a straight line

pseudo dock
cloud rivet
#

it looks like just an intro high level overview

solid grove
pseudo dock
#

ascent, you mean 😎

cloud rivet
#

I don't think my audio needs will be very complex, hope I can just get away with sdl audio

#

at least I don't want to grab a library until I recognize I have a problem that will be too time consuming and boring for me to work on. I don't want to by default be adding additional dependencies

solid grove
#

I use SDL audio, but I wrote a whole mixing and playback engine on top of it

cloud rivet
#

nice

#

I added nvtt because I don't want to work on texture compression and encoding, and I added imgui because it was easy enough and I like it. I did like my own debug UI though

#

I like stb ds too

#

SoLoud looks unmaintained, I think it actually stopped being actively developed in 2000 after looking through the history

solid grove
#

SoLoud is still functional though

#

i don't think it's ever going to stop working

cloud rivet
#

I think the raspberry pi I bought will serve as a good test run of changing to linux

#

I'll try and stick arch on it or something

#

and set up a dev env

#

and get a triangle rendering

#

I want to see if I can get my OneDrive on there too

#

I'm not going to try and run houdini or maya on a raspberry pi though lol

solid grove
#

do they even have arm Linux versions of those apps?

#

Ik Maya has a native arm build for Mac

cloud rivet
#

I have no idea

#

these are the supported distros:

Ubuntu 20.04+ LTS
Debian 10.0+
RHEL 7+  
Fedora 32+
CentOS 7+ 
Mint 19.3+ 
Pop! 20.04 LTS
Rocky 8+ 
Alma 8+
#

ah

#

it does

#
  • AMD: 24.Q2 or higher
  • Intel 30.0.100.9955 or higher.
#

it also requires an NVIDIA GPU

#
  • NVIDIA RTX & GeForce GPUs: 550.x Production/Studio Driver or higher
brisk chasm
#

that looks like driver versions

cloud rivet
#

It is VERY important that you install the latest driver for your graphics card using the proprietary drivers direct from the card manufacturer, not the open source versions.

#

maybe those are the recommended specs at the bottom, not required

#

Houdini may or may not work under Wayland. All of our test machines are configured to use X.

#

I think I just need a separate linux PC for dev

solid grove
#

I have a second drive and I dual boot my PC

#

you can also make a partition

cloud rivet
#

I am not going to dual boot

shut hornet
brisk chasm
#

not at all, if you keep the os physically separated on different disks

shut hornet
solid grove
#

I already power off my PC when I’m not using it so it’s not a big deal for me

astral hinge
#

I don't, but my computer randomly restarts anyway when Microsoft decides it's time to update

upbeat ember
#

I nuked that a long time ago

#

just set your internet as metered

cloud rivet
#

I don't turn off my computer

#

I also appreciate automatic updates

astral hinge
#

I begrudgingly accept that they are a bitter medicine

solid grove
#

Microsoft claims they aren’t updating windows 10 anymore but I’ve still been getting updates for it

#

I did not enroll in that extended support thing

cloud rivet
#

please don't ruin my schadenfreude

#

I don't understand what the matter with upgrading to 11 is I really don't

#

it's a free update

#

you can disable all the copilot stuff if you don't want it, but you know people are going to be people

#

seems irrational but this is really intelligent people deciding to not, so you know, idk

astral hinge
#

I am intelligent, therefore my decision to not update to windows 11 is justified

cloud rivet
#

idk

#

I don't get it

#

I haven't updated my work macbook to whatever the latest apple os is, because I'm afraid it's going to break something

astral hinge
#

I'm yolking

cloud rivet
#

that's a real fear

#

it's probably safe now

#

but I can't like not get work done

astral hinge
#

fear of change is the only real reason

cloud rivet
#

well, I can kind of see the argument is, why should I update when I don't have a need to

#

but the need now is, your OS is unsupported

#

allegedly

solid grove
shut hornet
#

Mac typically improves with updates

#

except they shouldn't have brought widgets back, that was a mistake

solid grove
#

there are widgets now for your desktop, but they didn't bring back dashboard

cloud rivet
cloud rivet
#

I'm gonna post that one in showcase lol, first time I ever posted anything there

#

I think a spring works pretty good

shut hornet
cloud rivet
#

I think the spring + lookat the skimmer is an interesting camera, probably more for a replay

#

the camera needs to be looking at what the driver in the vehicle would be looking at

vivid barn
#

make the camera be at skimmer's pos - camdist * normalize(skimmer's vel) and face normalize(skimmer's vel)

#

when abs(skimmer's vel) is below some threshold you'd move the camera to something -skimmer's forward facing direction instead

#

and camdist along with fov would vary with velocity and/or accel of skimmer

cloud rivet
#

I had that, but the problem with it is that you never see the vehicle turn, so there has to be a little bit of flex with how directly behind it. You want to see the vehicle angle a little bit when it turns and banks, you won't want the camera to bank with it. it has to give a little. It's obvious that now it does not work, but I thought a follow and look at would be the solution, though it looks cool,

vivid barn
#

hmm

cloud rivet
#

if you play redout you can see that you're not directly behind the vehicle in such that if you drew a line from the front to the back it would always intersect with the camera's center. the camera's position is like I guess moving around a frame and that frame is directly behind the vehicle

#

but the camera's place within that frame adjusts based on the vehicle's behavior

#

maybe that's what I need to try

#

so the frame is centered on the vehicle, and the spring is on the center of the frame

#

which will have a world position

#

the orientation is also a bit hard

#

because if the vehicle goes up a loop

#

if the camera is directly behind the vehicle

#

you end up colliding with the track

#

so the frame would need a collision but I mostly think the orientation of the camera and the vehicle should be the same

#

oh maybe your suggestion was more nuanced

#

when abs(skimmer's vel) is below some threshold you'd move the camera to something -skimmer's forward facing direction instead

vivid barn
#

no that's to handle normalize(skimmer's vel) becoming less useful when the skimmer slows down

#

so nvm ig

solid grove
#

the camera in my game is effectively an NPC that drives behind the object it's following

#

each frame it slerps towards the target and also slerps its rotation to align with the target

cloud rivet
#

yes I don't think that will work for me

#

add some steep inclines, declines and sharp turns in arbitrary directions and add the need for precise controls and movement at high speeds. I don't believe that such an approach is workable

cloud rivet
#

would be cool to have motion blur for when zooming

cloud rivet
#

man I have motion sickness now lol

#

too much zoomies

#

it's the camera though, not the vehicle's speed

pseudo dock
#

(I'm getting some faint vibes reminiscent of the game Sable from these latest two videos, maybe because of the smoke particles and the colors. Did you ever play that? https://store.steampowered.com/app/757310/Sable/)

Embark on a unique and unforgettable journey and guide Sable through her Gliding; a rite of passage that will take her across vast deserts and mesmerizing landscapes, capped by the remains of spaceships and ancient wonders.…

Price

$7.49

Recommendations

4985

Metacritic

76

cloud rivet
#

I wish I could make a game that cool

pseudo dock
#

I wish I could too 🙂

cloud rivet
#

it's kind of a shame how video capture can't capture how my game actually looks

#

it like loses a lot of the colors and details

pseudo dock
#

When you say it loses colors do you mean that the colors are actually different (rather than it just being that details are being lost from video compression)? Because if so maybe there's an actual issue like mismatched gamma or even primaries in the video compared to what you are rendering.

cloud rivet
#

even a screenshot doesn't capture the colors

solid grove
#

is it a color space difference?

shut hornet
#

I noticed recently that Shotcut has x264 and x264rgb codecs, the rgb version seems to work properly with OpenGL

#

it may have to do with broadcast limited colors or something, I'm not sure, but the x264rgb is accurate to OpenGL

cloud rivet
#

idk

#

had to clean my displays lol

solid grove
#

maybe your monitor is doing an extra vibrancy transform?

shut hornet
#

also, the OS does weird things with color profiles

cloud rivet
#

it looks much better in game

shut hornet
#

which may be saved in the screenshot

#

on Fedora it works now, but on Ubuntu I had to delete all the color profiles for the monitor, otherwise it saved images with a weird color transform

cloud rivet
#

interesting

shut hornet
#

surprisingly opening the images on a phone is a good test, cause Google/Apple typically handle this correctly

#

well maybe not surprising, since the phone has a fixed screen, so the profile is always correct

#

on desktop it is wild wild west. opening the same image on Mac/Windows/Linux gives different results, even with the same app (and the monitor itself adds variability to this)

cloud rivet
#

yeah makes sense

shut hornet
#

i do understand why, but it feels like they could have figured this out by now

cloud rivet
#

I just checked these discord messages on my phone

#

I can see the difference there

#

idk

#

maybe I'm seeing things

#

it's very clearly different on my desktop

shut hornet
#

what's the problem actually? i'm having trouble following

cloud rivet
#

the colors in my screenshots look washed out

#

compared to when I have the game open

#

so there's less hue

#

they're desaturated and a little bit brigther

shut hornet
#

how are you capturing the screenshots?

cloud rivet
#

with windows screenshot tool, the videos are OBS

#

it's not a problem

#

just wish it looked the same

#

nbd

shut hornet
#

you don't have HDR enabled in Windows do you?

cloud rivet
#

wouldn't that affect my game too though

shut hornet
#

it does

#

try using RivaTuner / MSI Afterburner cause that can capture PNG directly from Gl/Vulkan

cloud rivet
#

oh

#

I don't have HDR enabled

#

let me try and turn that on

#

that looks horrible

#

I disabled it

solid grove
#

most satisified windows HDR user

cloud rivet
#

now that I have agx tone mapping I played around with vertex color ranges up to 0 to 16 instead of 0 to 1, and it was crazy

#

maybe I can demonstrate

#

everything is 10x in the first image

#

it makes the sky look gross, like I'm under water

#

it makes the skimmer look dirty

cloud rivet
#

lol I got the buoyancy wrong and it looks like the skimmer went under water

#

it looks just like went into water

#

amazing, even the bugs look cool

cloud rivet
pseudo dock
#

That's looking pretty good! What does it mean when the camera stops moving? Is that a feature you're testing?

cloud rivet
#

I let go of the connection to the vehicle

#

the camera stops being influenced by the spring that's attached to it

#

I don't reset the spring though, so it can whiplash when I turn the connection back on

#

there's l of weird stuff that I need to polish after I get through the book some more

pseudo dock
#

In the final game will the user have any control over the camera or will it all be automatic?

#

(when the camera stops it reminds me of what some games do when you cross the finish line)

cloud rivet
#

I haven't really thought that through

#

would be interesting if anyone else ever does play it, since it requires nvidia hardware to work

#

I don't think I could like add it to steam

#

if I did sell this game, I would have the purchasing require having started the game once, so I don't charge someone for something that doesn't even run for them

cloud rivet
#

I'm kind of over springs, ready to move on to hard bodies. I was going to do more spring stuff but I can do more later.

#

they are very cool though

pseudo dock
#

haha

#

You've been very disciplined about implementing stuff in the book, I've been impressed! I usually read through things, but then I don't learn them as well without actually getting implementation experience

cloud rivet
#

yeah if I don't actually implement them I won't learn it, even then I end up forgetting things

pseudo dock
#

Yeah, same

#

But the spring stuff you've done with your camera looks good! I think you can move on to other stuff with no regrets

cloud rivet
#

thank you!

#

you know this is like the first time I have had fun in the actual game I have been working on since my voxel game

#

that voxel game was pretty amazing, and I miss it a lot, but maybe I will get to that with this project

pseudo dock
#

Congratulations, that has to be a cool feeling!

cloud rivet
#

it's good, it kind of makes me miss my voxel game even more though

#

that ship has sailed however :\

#

I wrote it in a very old version of zig and it's opengl

pseudo dock
#

Maybe you can return to it and update to your new OPTIX technology after you have finished Sponza Skimming (TM)

astral hinge
#

voxel racing game

solid grove
#

complete with cube wheels

#

that behave like cubes

cloud rivet
#

wait ravbug's racing game is a voxel game

#

it's been done

#

well voxel stylized

pseudo dock
#

Time to invent Bjoxel racing

cloud rivet
#

Bjoxel

#

yes

cloud rivet
#

I am made of Bjoxels actually

vivid barn
#

with that when you trace rays you specify 0 <= t <= 1

#

and it will trace against how things are at time t along motion curves you've specified when building ASes

#

now if you choose t randomly for every pixel you will probably get something that maybe doesn't look like motion blur at a single sample but should still be p interesting

#

pick t from blue noise for even better results

cloud rivet
vivid barn
#

and when you trace a ray you specify 0 <= t <= 1 and then you'll end up tracing a ray against the scene as if everything was at point t of their respective motion curves

#

ignore pivoting and shearing for now

cloud rivet
#

reading materials

#

motion blur requires using a motion acceleration structure

#

hrm

#

like the rest of the world would blur is what I was thinking

#

I guess I could build all the cubes with that, it's just one gas

#

oh

#

Motion instance acceleration structure

vivid barn
cloud rivet
#

just a cool picture I thought

#

will look better once I have AA

solid grove
#

did you add fog to the scene?

cloud rivet
#

yeah I have had fog for a bit

vivid barn
#

it will perceptually improve the image and it's cheap (in terms of headache) to implement

#

in general you can use any low discrepancy sequence to jitter

#

for DLSS in particular they really insist you use halton because that's what they trained some NN component in there with

#

and also only use the first N points (after which you start from 0)

#

but if you're not using DLSS I guess you could use any LDS

vivid barn
cloud rivet
#

I want to look into DLSS

vivid barn
#

and it has to explore the space pretty well within just those first N points

cloud rivet
#

make sense since I'm nvidia bound anyways

solid grove
#

a super simple AA you can do with ray tracing is to send more than 1 ray per pixel and take the average

vivid barn
#

na

#

the simplest one is to rely on your eyes doing the TAA froge_love

vivid barn
#

it's supersampling, just with in-place resolve

solid grove
#

get a VA panel and have built in TAA froge_love

solid grove
cloud rivet
hushed creek
#

O nice, multi camera

vivid barn
#

spinning cubes give me nausea

cloud rivet
#

yeah

#

me too

#

the whole thing makes me feel nauseous for like an hour after I work on it

cloud rivet
#

I made it so I can work on noise

#

it's the first ever actual kernel I have written that does something useful

hushed creek
#

O ok

cloud rivet
#

I don't have any complex sync for this, I just use cuda streams. My code is just effectively (with error checking omitted):

optixLaunch(pipeline, stream, params, params,sizeof(params),sbt, width, height, 1);
ps_magnify<<<dimGrid, dimBlock, 0, stream>>>(width, height, params.pixels);
cudaStreamSynchronize(stream)
cudaSignalExternalSemaphoresAsync(c2v_semaphore, &sem_params, 1, stream)

I think I can write CUDA kernel code that makes arbitrary changes to each frame's output, all on the GPU, sampling and writing functions and is done sequentially via cuda streams

#

I had a bug yesterday, and I just added a printf to my kernel code

#

I did it all in my ternimal I didn't have to spin up renderdoc or anything

brisk chasm
cloud rivet
#

I'm on a noise sidequest atm

brisk chasm
#

hehe, this looks very fun already

cloud rivet
#

thanks!

#

maybe, someday, when I make a game I really like with CUDA, I will build a few boxes that can play the game and give them away at some point or something

#

idk

#

it would be an expensive box

cloud rivet
#

I learend about isoptropic patterns

vivid barn
cloud rivet
#

I'm not

vivid barn
#

god the fucking uk keyboard layout is burned into my muscles atp I hate it

cloud rivet
#

I just learned a lot about blue noise from reading it

#

it also has a zip file of tons of blue noise

#

2D and 3D

vivid barn
#

yeah

#

what do you plan on using blue noise for remind me again

#

all the uses

cloud rivet
#

well you had suggested using it for t in motion blur

#

and I am working my way up to that

vivid barn
#

ok

cloud rivet
#

I just had zero knowledge of what noise was, why it was being used what the types were etc

#

so have been reading a lot

#

basically human eye balls hide artifacts if you use noise

#

is what I think the tldr is

vivid barn
#

the tldr is that blue noise has a particular spectrum shape with no energy in lower frequencies

#

which is useful for beside its psychovisual property you mentioned

#

anyway

cloud rivet
#

yes I have read that

vivid barn
#

that particular section

#

ok

cloud rivet
#

that actually links to the 3D thing

#

I linked to

vivid barn
#

yeah

#

anyway the "how to get more than one blue noise value" will come in useful once there's more stochastic things than motion blur that you wanna do

cloud rivet
#

well

#

I'm going to start by just adding a jitter to my ray

#

and see what it looks like

#

the motion blur thing requires I rewire my structures

#

so it's a bit of work before I get to it

vivid barn
#

if you plan for DLSS don't jitter rays

#

shift the entire grid by the same random offset pulled from an LDS

cloud rivet
#

I'm just going to see what it looks like if I wanted to do smething else later it will be easy to remove

vivid barn
#

oki

cloud rivet
#

what's an LDS

#

looking that up

vivid barn
#

low discrepancy sequence

#

but you should use the term "LDS" so as to keep amd fanpeople on their toes

cloud rivet
#

is what I found

vivid barn
#

lmao

vivid barn
#

btw you already have more dispatches than #1181368932637093888 does frog_pregnant

#

iiuc

cloud rivet
#

I have one dispatch :O

#

one thing I can't do look at what images look like on the gpu, I have to like create debug image viewer myself I think, which will be another dispatch. Anytime I do something other than a trace that needs to be visible it has to be a dispatch

#

I'm gonna be dispatching my physics too eventually

#

a debug image viewer UI could be a lot of work heh

#

I could just make them vulkan textures and use imgui

#

I should probably just do that

#

gross

#

less work overall though and I can use imgui

vivid barn
#

I would avoid interop

#

it's very annoying

#

write cuda/optix backend for imgui

cloud rivet
#

that would be a fun project tbh

#

I don't want to maintain such a backend for others, not that anyone else would want it

vivid barn
#

then don't? thinkin

#

anyway I expect it should not be hard if you don't try to be clever/efficient

#

and just barf out a lot of dispatches into a single cudaStream_t

cloud rivet
#

ya

cloud rivet
#

ok I am going to read the hard constraints chapter and think about rewiring my instances so I can stick a motion ias on there

#

that magnifier was a valuable addition

vivid barn
#

you probs want to evolve blue noise over time

#

i.e. scroll through those 8 or however many slices you have

cloud rivet
#

oh right

brisk chasm
#

that reminds me to fix my magnifier

cloud rivet
#

wow that looks so much better

#

I should record the whole display because the video capture is distoring the video when it's just the window

#

hrm, it looks worse in the video

#

it is a dramatic improvement in game

#

I don't see any aliasing at all

#

going to add it to my lighting too since I get some banding on some surfaces

cloud rivet
#

I'm not going to make a racing game. What I have now is more fun than I've had with a racing game like redout

#

I added some noise to my vertex colors I like it, Kind of addicted to noise right now, I am probably overdoing it

#

kind of have to zoom in to see the noise, it's subtle

#

a little more obvious

#

it's difficult to tell from the ground, but I am varying all of the colors a little bit for each of the meshes by using instance id as a seed

#

probably easier to see

cloud rivet
#

but you can get off the track and go around the rest of the map

pseudo dock
#

So still a skimmer, but you're not racing?

cloud rivet
#

yeah

pseudo dock
#

Cool

cloud rivet
#

I think I'm going to add combat and enemies. I know I said I wouldn't do a combat game, but I changed my mind