#Rosy
1 messages · Page 9 of 1
I don’t interfere with it
I see that chosen format in renderdoc
It looks correct
might be worth checking vulkan-samples for compressed textures?
mayhaps theres a small man who dun goofed up somewhere inside the code
Specifically a dds compressed format in vulkan
Nah i am sure i have a bug
I tried other loaders
compressedisms are blocky formats, maybe some shit isnt aligned properly or doesnt come in 4x4 or whatever that block format is/was
i touched it only once in opengl a decade ago briefly
I think I probably have UB somewhere
I made comprehensive changes, a lot of really great ones, so there’s no going back and this is an issue that just prevents anything from working so I have nothing to do other than to fix it. I can’t ignore it
VK_FORMAT_BC7_UNORM_BLOCK specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.
I have an idea
I create a 4x4 texture
Just 4 x 4 pixels
And see how it looks
The make it increasingly larger until it breaks
I start with just 1 pixel actually
how about you use your own format
so you know what is going on
I don’t understand how that helps with compression
It’s just compressed RGBA values
Oh I think I understand
So do not save as dds
So I don’t have to worry about that files headers and whatever bullshit
Oh
That makes sense
You have to have some header 😄
I went that route of not using dds and doing my own stuff
This is kind of a fun and challenging problem tbh
yeah I am going to make my own format, I understand how the memory is laid out now in the buffer by vulkan, the levels and layers are documented, I have a rough understanding of the different compression format layouts. I can just see the bytes in nsight easily. I am removing the black box. I will just be able to debug everything without worrying about not understanding some aspect of someone else's format. It will be all my own bytes. I'll start with just getting linear working
I bet there's just a one line code change that fix will fix some UB somehwere though that's the cause of all this
The cornell dragon bug was a one line ub fix
looks kind of cool all broken though
circuitboard aesthetic
I'm going to have the most sophisticated drag a cube on a plane demo ever by the end of this journey
my first starting image for my new texture format
I will use this nice cube as the test scene with the 1x1 pixel texture as the material
here's how it looks with the current broken dds compression
this is a 1px texture image
so
I figured out how to look at the dds bits and saw it is a trivial format and figured out what I was doing wrong
I'm going to cancel the rosy texture format world domination plans
fix the srgb issue and fix mipmaps and I think I can wrap this up
the dds header is tiny
I got it working I'm good
that was a trial though, I learned a ton as a reward I guess
I'm going to be working on fbx import by tomorrow I think
I will have a fully automated texture mipmap/compression and I have so many improvements I made as part of this, back to using vma for images, no more ktx, all my images have debug names now, I can distinguish between images of different types so I can change the vk format to fix my normal map srgb issues etc
huge wins, totally worth it, even if I did step on a rake couple of times and spammed my thread too much
will continue to use nvtt it is great
wish I could see its source
I think my mipmap math may be wrong
You calculate which mip level to read manually
oh that bug was my memcpy offset was missing on the buffer
I was just copying at offset 0 at each iteration 
Jesus

thanks so much for your help
you are welcome
nvtt was clutch
also images encoded BCn are bigger in size than pngs. In my format I compress encoded image with zstd
the ktx2 images were also smaller in size, I guess they were supercompressed
I wonder what they use
I saw your zstd use in your code ,looked cool, you write good code
easy to read your code
also
I appreciate how you had multiple blocks of the same code
where you were making the same operation but for I guess different image types
albedo/metallic etc
that's how I write my code too
I really find it helpful to see the full sequence and not stick everything in a bunch of helper functions
The different image compression could be done a little better but doesn't matter. It would make the reading of the code harder. You had seen I use lambdas for repetitive small code snippets.
yes
If you want to see hell checkout how I process mesh
I don't use lambdas much right now, but I think they are good to use
a good tool, it's interesting how lambdas can capture values
in any case I now have a lot of stuff that is better
my normal maps are no longer srgb format in vulkan, I no longer have to manually generate my mipmap/compression, my debug image names have the file names of the images, I am no longer using libktx, I am uploading the images using vma, it's all great
hopefully you use BC5 for them
I am using bc7 for both but I specify them independently
for color and normals
so I can change it
BC5 is special made for normal maps
oh
it can only store 2 channels so you gotta do some compression
You can choose how you compress them nvtt has 4 different methods
I use unsigned I hope its correct 
I will do what you do
hmm I think I am wrong 
yes
Can you take some screenshots of normals and then try BC5 and report to me back if you can get away with unsigned 
screenshots before the change?
yes
But for sure I am wrong because for z it doesnt matter if its x or -x but for x and y you need to have negative
well these are my normals right now
also checkout the sponza from bottom
hrm
kind of same
yeah same
Oh I know why
I am stupid
textures are always 0-255 aka 0-1.0 so you gotta do normal.xyz (for RGBA) * 2.0 - 1.0 to make it -1.0 - 1.0
@cloud rivet BC5 and BC5 UNORM is fine
ok good to know thank you
ok trying bc5 now
I need to rebake my textures
I dont' have many
oh
that looks better
this looks a lot better
was before
I made that floor in my sponza it's not the normal sponza floor
I think this is so much better
I still meed to mikktspace my tangents and my x axis is flipped on all my assets, I want to transform all the vertices when I port them into my asset format not in my engine
but things are looking much better
I want to work on fbx format and skinned animations first before I do that
you can compute tangent and bitangent in shader using derivatives
I compute the bitangent in shader, I didn't know about tangent
I use the lengyel method
it's super late for me, I'm going to bed, thanks again 
this was a struggle but I learned so much and everything is better
I will try that tomorrow thank you
i like the box
thanks!
once I have fbx and animations and I add mesh processing all my tangent & mesh woes will be handled
I am going to add the flip x axis fix in today though, I am tired of seeing that everything is backwards
should be tiny, not another thread that undoes another sweater
I keep finding bugs I just need to fix every single one of them before I do anything else. These things are compounding
the first thing I have to fix is my object space
I thought it was just the coordinate system, but there are more problems, but that seems to be the root of a lot of it, it's like I worked around some of these issues so much shitty code piled up
from now on if there's a bug I am stopping whatever I'm doing and I will fix it
it's affecting tangent space, lighting, rotations, translations, normals, everything really
new marmoset toolbag tutorial https://www.youtube.com/watch?v=J7t-llWjYy8
⛰️ Master material layering in Toolbag with our new video tutorial!
Introduced in Toolbag 5, material layering lets you create complex, blended multi-material effects for your meshes, with or without UVs. In this tutorial, 3D artist Stephanie Everett walks you through all aspects of the material layering system, teaching you how to add dynamic...
incredible stuff tbh
if I wanted hats or tools or clothing my characters could wear I would have to first transform that hat from whatever asset bound object space it was in into world space and then to the character's model asset space
I don't have just an object/model space
I have an asset + object space
whatever coordinate system that thing came from, it's in that
[[nodiscard]] glm::mat4 get_world_space_transform() const
{
const glm::mat4 t = translate(glm::mat4(1.f), world_space_translate);
const glm::mat4 r = toMat4(angleAxis(world_space_yaw, glm::vec3{0.f, -1.f, 0.f}));
const glm::mat4 s = scale(glm::mat4(1.f), glm::vec3(world_space_scale, world_space_scale, world_space_scale));
return t * r * s * object_to_world_transform * object_space_parent_transform * object_space_transform;
}
whatever the item I'd want to put on the character, I just would have no translate/rotation/scale on it whatsoever, I would do that within the character's asset-object space I think.
I'm storing the assets_coordinate_system as a std::array<float,16> on the asset format now, for gltf it's a identity matrix only the first diagonal component is -1
for some other asset from some other format it would be different
I think if I did it differently whenever I wanted to apply a transformation derived from the asset itself, like an animation I would have to always transform it back into its original asset coordinate system, apply the transformation, and then apply the back out of that space transformation like, if I wanted to apply transform T and the model came from coordinate system a where A is the transform from a to my coordinate system: A * T * A'
idk this makes sense to me I don't care
look how they massacred my boy
axis still flipped
finally
so much stuff is broken now that I fixed my object space, because I kept adding work arounds whenever something didn't look right, I'm never doing that again, I'm like I will fix that later
later:
ok levels are fixed now too
✅ object space fixed
✅ levels fixed
❌ game play movement broken
❌ lighting broken
I will fix those other two tomorrow
I thought I just had a flipped axis 
I had a 🥫 of 🪱
Maybe I underestimate how much my background saves me from friction while writing games
I should be kinder to deccer when he's struggling with openspace
I like kindness
I was being really lazy and naive with the dumb stuff I was doing
I knew better
I am being really explicit and naming parameters, fields and variables based on the coordinate system they are in now. It is verbose but I will not make this mistake again
yet another reason to use zig cc https://ziglang.org/devlog/2025/#2025-02-24
https://learn.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170 isn’t on by default? Heh
I should check
None such things are on by default because they add noticeable overhead
You can periodically check your engine with a bunch of tools like asan, just to be on top of things
Maybe once a month or so
Makes sense
Yeah Asan is quite slow
I will turn it on and fix whatever it reports
Whenever i read Asan i read Azan
the dude who calls for prayers in countries with mosques 🙂
uh, Bjorn left?
nope he's still here
not on this server
wait why is discord getting shittified?
I'm lacking context
are we getting a forum?
wow a forum would be like ultra cool
using a forum at 32 like I used to at 12
no
bjorn is very emotionally reactive he will return eventually
a year ago or so we were just brainstorming, because some shit was introduced to discord, and we were making things up of where we could move to if discord becomes more shit
otherwise we'll go and bring him back ourselves
and i kept saying IRC, because this is the best chat platform ever and always has been, i also grew up with that, maybe thats why
newer irc clients today even render links as images or embed it otherwise
noooooo if he don't come back, i will leave as well 😭
uh that might be necessary
gob will have to apologize though I can't just go like "nooo gob was kidding" it would be silly
first time I've seen some just.
leave discord.
without even really telling people.
like
actually leave all servers and remove friends from friends list sorta leave discord
wow he left gamedev league too
removed me from friends too
it's kind of an overreaction I think
Huh, wow. I hope he comes back
Dang Bjorn was great
We should probably go find him eh? It would really suck if he was gone for good
:(
can we talk about zig?
quick someone doxx him so we can get him to come back
demongod can take a quick stroll over to his home
tbh, must have been considering getting off discord entirely already for one comment to trigger that
dammit you were meant to be in his walls already
you had one job
he reinforced his walls
Oh no what happened
I have some catching up to do but Bjorn is gone it seems 😦
Well, shit.
He'll be back, needs some space and time to cool down
🤞 I hope you are right, he is a good friend and inspiration to many of us here
He was
I’m like
99% sure based on other conversations

Is there a way to contact someone on github? He made a commit 14 minutes ago
We could all leave issues on the rosy repo asking him to come back 
his email is listed on his github
spam like 👍 https://github.com/btipling/Rosy/issues/83
if he actually wants to leave i think we should respect his choice
we have to show we care
true
if he leaves github because of us there's no choice
we'll have to visit in person
knock on his window at midnight :>
doesnt this usually mean the account got deleted? and the deleted user thing comes soon?
yep
Not necessarily
Means you’re not friends with the account and share no servers
See: above
It’s basically a
you shouldn’t really be able to access this user’s profile, but you’re here anyway notice
If I were to leave both this discord and the bepu physics server, deccer would see it for my profile too
But that doesn’t mean that my account is about to be deleted
Discord’s been implementing privacy/security related features recently 
and some of these features get in the way of intended app usage 
actually tbf my main think I’m complaining about there is the cdn stuff but like. Those cdn changes broke many links to media shared between servers, and for a while also broke the gif picker
yeah, this is also how I know it
rip
btw deccer the C++ channels on libera are killer, haven't been on them in a while but they're probably the best place to talk C++ stuff
sorry, 2nd best after #opengl
tccpp is also pretty good to get C++ help 🙂


👀
shh don't stare, let him come to you
I finally got instanced draws working just today, been putting it off forever, last few months I have been mostly taking Maya courses and working on my level editor, which is very rough, and my asset format. I also added animation, but I am still learning how to do my own rigging and animations in Maya, so don't have a character yet.
When I have a nice enough thing I made it I put it on my artstation, but I'm still very new to it https://www.artstation.com/rosygamestudio
All the models I have made I can load into my game and if they have animations I made in Maya they run
lighting looks excellent
Firefly has been active on a 3D art channel I have been in and saw all the things they've been working on so wanted to see what the Dusk Engine was looking like
idk if that music is in the game or in the background but it already feels like a vibe
nah it's a YT video in the background, but that is the kind of music I would like in the game
no audio yet
I need HDR IBL lighting still, the black pillar is actually supposed to be brushed metal but I haven't done that work yet
the goal with that is to be able to just load polyhaven HDR images and configure the level lighting the same way I can in Maya
wb @cloud rivet ❤️
I like the weird machine. Very nice modelling work
Lookin' good.
Thanks I am really close to being able to replace the cube with an actual character model
I try to divide my time evenly between asset work and writing code, doing both every day
lookin good so far
And welcome back
I’m curious how maya compares to blender tbh
no comparison
if you go to ArtStation and filter by things created with Blender then you will see incredible things that people have created with Blender, it is capable of many of the same things as Maya and if you want to use it as your tool you'll be able to build likely anything you want for your game
it is open source and free, there's an ecosystem for it, there's a community, if you pick it and it works for you, you're golden
but I hate Blender and I will never use it unless I just can't afford Maya anymore
the main asset format I work with is FilmBox now anyway
the FilmBox SDK is incredibly capable, it supports NURBS for example, and I can edit the asset and create my geometry and materials with just the SDK
I can change the coordinate system and set tangents etc
anyway
regarding Maya
my favorite feature is the marking menu
I feel like a wizard using it
the other thing is I just have spent probably hundreds of hours now on courses and working with Maya, and I know how to generate UVs for complex models, I know how to model with it, with faces, vertices, edges, creating and modifying edge loops, quad draw, multi cut, etc.
it comes down to a personal preference and I'm really happy with Maya, and I also use Marmoset for painting textures, the thing Maya sucks at is organic modeling and I'll probably pick up Zbrush for that
I am also planning on eventually setting up Substance Painter and Substance Designers to create trim sheets and use Houdini for a bunch of the procedural stuff, and Marvelous Designer at some point when I have some non robots
I'm going to be spending half my time just modeling to create content, constantly, it takes me like 2 weeks to create a model I need to get it down to like 1 to 2 days, including UVs and painting
a character can take a bit longer
I also have to design a nice UI, primarily in Photoshop I think, and do audio at some point so lots to do
I'm building out my own level editor, here's a video of me making a new level, it's super rough, but it'll get better
nice
oh bjorns bike nice
this is my very much in progress character model for a placeholder character that's a step up from just a cube
it's way harder than making props :/
I just need something to rig and animate and put in there for now that's not a cube
I'm going to take dedicated zbrush and character modeling courses and practice a lot
looks like a character from Robots
it's going to eventually be more Rosy like
once I have the skill to do that
but still very much a robot
your character has the boots, now it's just missing the snoot
that's it, I'm done with the modeling for now, it's good enough for a placeholder
I'm going to do retopology, uvs and then rig
added a snoot
side snoot
that'll look a lot better after the retopo
Did you not smooth shade the upper arms?
this is all junk geometry, it all gets deleted after I retopologize
I merge all this junk into one giant mesh, make it live, and then use the quad draw tool to clean it all up, then I can smooth it out
Quad draw is really cool, I wish blender had it
when the thing is live it just sticks the vertices from the quad draw tool directly to the surface of my reference
yeah it is incredible
I just extrude entire edge loops really quickly
I just do half the model and mirror the rest
I like to keep the high poly original looking nice though, since I use it for normal baking
I bake in marmoset, I take the same model and bake it onto itself, I don't really need a lot of detail in my game since you wouldn't be able to see it at my camera distance
also I need to make a lot of models and I'm not very skilled at the details
bake it onto itself? I assume there are some differences?
well by baking onto itself I get ambient occlusion maps and stuff
and I get uv islands
all kinds of things
I get a normals map
I can paint a bump map in marmoset
it has smart materials, like I can paint scratches with a mask
it has procdural noise and stuff
I don't do any of that in maya
Are you still using houdini in your workflow?
maya is just for geometry, uvs, rigs and animations
I'm going to use houdini for the environment
maya for props and characters
I will likely use houdini for fx also
so all the floors and walls of the level will be done in houdini
So what is done in engine then? just lights and stuff?
I haven't figured that workflow out yet, but I understand that I will use substance designer to do trim sheets which I then import into houdini to generate the level
lights, decals, shadows, IBL,
I am not sure yet
but the props, geometry and characters are all going to be created in DCC, my engine has a level editor
Your game is gonna be all indoors right? no terrain
I’ve been making my own character model for the past like
week
I have not done any retopo and my geometry looks good
Granted I have sorta used like 3 tutorials and kinda redid it whenever my topo got bad
It do be a lot of work
nice!
I don't think anything I do looks good lol, but I am learning
I like not having to worry about the geometry at all as I model
as it's really easy to clean it up
it takes me many weeks to make a simple props atm
You can do this thing where you think it looks good, for your skill level
My skill level is basically non existent, so I’m basically just comparing to images I’ve seen and my own mental model of what I want
- a lot of blender tools do seem to be designed around preserving/creating good topology, so I’m kinda probably having my hand held a little by that
Unsure about maya’s tooling
unironically, I do see how that could take a few weeks
It ain’t much, but for a learner, it’s honest work
Does also look good
I will get faster
I'm am pretty good at UVs now
a lot of it was like oh I beveled something badly and now the UVs are hard, and I had to redo a bunch of stuff
I’m curious; what’s your workflow like?
Personally I like to do 1-3 throwaway prototypes, take what I learned from those, and make something intended to be a "permanent solution" (mostly do this for programming, but ended up doing it for models too)
Which, typically gets stuff done fairly fast for me
I do a blockout and add details
any uvs are better than mine, lol
I am not texturing my model, I am texture mapping it; making the texture via manipulating the UVs
Looks pretty good to me
I like the rosy logo
It looks like the unreal logo but cooler
it's a bit weird, it was a project mostly for learning how to export animations out of the fbx
it doesn't look like this in my engine because I don't have IBL yet
Looks cool anyway
and because that's marmoset RT render engine which I will never even get close to
I took paid for courses in learning how to do all of this, via flipped normals and some artists have their own websites
This is an unironic screenshot of my UV maps
… and a lot of this is deliberately and manually arranged too
I use projections and cut and stitch tools to do uvs
it goes pretty quickly if I do my geometry well
yeah that’s the sane and good way
I need to create good UV islands or uv shells so I can assign materials in Marmoset
if it's a mess I can't paint it
Mine’s a mess because this is like a 3x6 pixel area I’m looking at
My texture is flat because I’m going for a toony style; figured I might as well challenge myself to make my texture dense
you're making a game?
Not currently
I am still doing graphics programming
I split my time in two
well if there's graphics programming work
mostly just been working on my level editor
I’m trying to get over burnout 
but I did just clean up my vulkan sync
I became obsessed with maximizing my UV coverage. So now my UVs look like this.
Sync is definitely a good thing to do well 
I try to keep the UVs the same scale for everything
basically you need to straighten all the external edges to a rectangle so you can pack them better
it doesn't always work out
for characters I try to give extra resolution for the face
True
I'm really trying to go easy mode with my game
indoors, small levels, big camera distance, baking as much as I can
and
and it will still take years
I couldn't make ASO
It's OK they will be fun years
that game is incredible tbh, I think about your leviathon a lot lol
It remains to be seen whether I can lmao 
What I’m trying to do is two things with the same model:
- vr character model, not for a game
- model which I can pose and then sketch over for drawings
Character being the character in my pfp
I'm going small, and I'm still slow
that's really cool!
How it all started (for 3d)
yus
retopo is fun, it's like puzzle solving
I can relax all that geometry as I go and it straightens it all out
I think there is an addon that does something like that but I'm not sure. The quad remesher can be useful sometimes as well but that's for different stuff.
You can do edge extrusion with surface snapping fairly easily though so I've never had much trouble with retopo
idk, I'll see how the UV unwrapping goes, if it's not a disaster I will try and rig it
I might paint it before I rig
it will look much better once it has materials also, if this turns out bad I will start over, I learned a lot from this process.
it's just a better placeholder than the cube anyway
I fixed that hard edge on the nose, I hadn't noticed before the render
Nice, character work can be quite a challenge when you don't do it regularly. Seems like you're making good progress. 😎
Thank you, I just have to keep practicing
I need to make props and the level as well while also working on the engine itself
I have been working through an instancing bug the last couple of days. I wanted to have per instance timelines and somewhere through inheritance of the scene graph, instances are inheriting writes to a shared ancestor, which tells me that I need better guard rails. I think it might be UB because I don’t see a way it is possible and because of how hard it has been to debug the issue.
hrm, no I am not using refcounted handles, there's a scene graph of nodes, and each node has a list of instances and stores per instance data, which are identified by uint32_t unique ids. The nodes have child nodes, which all also have their own instance data. My per frame code directly requests a flattened array of nodes for its render data for all of its instances without knowing anything about a scene graph
went ok I think
I could use separate udims, and get more dense UVs
I will try this first
I can also adjust the uvs in marmoset
as in density I think
I'm going to try and export into marmoset and do a quick test paint tbh
I think I just figured out what my scale should be
the visor color is incorrect in game because I don't have IBL yet
my metals all look terrible
anyway
uvs and test painting went ok
and now I have a character in the game, just need to rig and animate now tbh
I don't know where I got those colors from, just was having fun with it
here's what the visor looks like in Marmoset, this is like full slow 20 second raytraced with a whole bunch of fancy lighting and render options enabled so my engine cannot compare
I'm pretty happy with it however right now, happy enough to just move on to rigging and animation
thanks!
per instance timescales
I also have an fps independent global timescale
really useful for debugging
pretty fun
I think I need to paint some weight around the elbow though
that elbow is definitely all kinds of wrong, but I'm pretty happy with how it's not a complete disaster
I kind of like my placeholder character
some progress since lol
I'm going to do skinning on the GPU via compute dispatch because shadows
I'm a ways away from that yet, I don't even have good rigs yet
Are they just shadow maps?
Compute skinning is probably not worth it just for shadow maps
Check how much time your Vertex shader is actually taking
You may very well lose performance by adding the extra Compute pass
yes
My skinning basically doesn't show up in the profiler
Yeah but just having one costs something
You may as well have it do something
If it's gonna be there
And you will likely save on memory bandwidth
If you instance your meshes
I'm just saying I would avoid overengineering until you have actually identified a performance problem
I actually want to overengineer just a tiny bit to learn about it and get some better understanding of vulkan sync
I have a lot of frame time to spare right now, my frame time is basically just all MSAA
appreciate your insights though thank you
there's going to be a lot of things animating, basically robotics and machines everywhere
lots of lights, lots of animations
kind of like factorio
just stress test regularly and you'll be alright
my cadence for asset work after I'm through with skinned animations is going to be to work on two new props and followed one new animation, after every 4 props I will work on a new character and just repeat. I'm going to focus on quantity and speed instead of worrying about perfecting the assets. I'll get better and build skill this way. Eventually I will have to add 2D to this to work on the UI and the actual environment for the level. For engine work the plan after skinned animations is IBL, followed by walls and floor designs and tools, and then outlining and 3D picking to make level editing easier, then I will start putting a lot of work into UI.
idk maybe I skip the compute skinned animations, I can do that later if I needed to, that's fine
yeah thank you for setting me straight
I've never done compute skinning yet although part of that is because I didn't have many passes
Skinning in the vert shader works fine
yeah I don't really see the benefit
In some ways VS could even be a benefit since it's easier to instance the mesh
With compute skinning you're basically duplicating the mesh N times
I guess compute skinning gained popularity when raw vertex numbers became absurd
You'd have to do a careful perf analysis to see if the arithmetic is really bottlenecking you
The situation where it's probably an unequivocal win is when you have a relatively small number of characters, a large number of vertices, and a large number of passes (shadowmaps etc)
If your scene has 100 characters in it you're going to 100x your mesh memory which could be significant
compute skinning is required if the transformed vertices have to end up someplace to be used for e.g. raytracing
Yeah I was just about to say
Raytracing is a case where you'd have to evaluate the mesh thousands of times
So it's definitely saving you a ton of work
well someplace else is during shadows
I have to skin the same vertex for every face of a shadow cube, every layer of a CSM etc
so I figured I can just do it once in compute
also physics
collisions
idk
well not every layer of a CSM if they don't overlap with my current frustum culling
I'm not going to worry about right now, if things get slow I will profile
Skinning in compute is extremely trivial to do anyway
It will take you 10 minutes to implement the shader
So I wouldn't worry
Here's my super basic metal shader for reference it's apple's compute shader sample but instead of an array of ints it's an array of vertices and instead of multiplying each element by itself, I multiply by some matrices
#include <metal_stdlib>
#include "SharedTypes.h"
using namespace metal;
kernel void skeletalAnimate(
device const SkeletalAnimDataVertex* animDataIn,
device SkeletalAnimVertexPositionVertex* animOut,
constant matrix_float4x4 *boneMats,
constant matrix_float4x4& modelMat,
uint index [[thread_position_in_grid]]
)
{
auto vert = animDataIn[index];
matrix_float4x4 boneTransform = boneMats[vert.firstBoneIDs[0]] * vert.firstWeights[0];
boneTransform += boneMats[vert.firstBoneIDs[1]] * vert.firstWeights[1];
boneTransform += boneMats[vert.firstBoneIDs[2]] * vert.firstWeights[2];
boneTransform += boneMats[vert.firstBoneIDs[3]] * vert.firstWeights[3];
boneTransform += boneMats[vert.secondBoneIDs[0]] * vert.secondWeights[0];
boneTransform += boneMats[vert.secondBoneIDs[1]] * vert.secondWeights[1];
boneTransform += boneMats[vert.secondBoneIDs[2]] * vert.secondWeights[2];
boneTransform += boneMats[vert.secondBoneIDs[3]] * vert.secondWeights[3];
auto bonedPos = boneTransform * float4(vert.position, 1.0f);
auto bonedNormal = boneTransform * float4(vert.normal, 0.0f);
animOut[index].position = (modelMat * bonedPos).xyz;
animOut[index].normal = normalize((modelMat * bonedNormal).xyz);
}
So you can add this at any time in the future no problem
2 bone sets?
the tutorial I followed for skeletal anim lets each vert be affected by at most 8 bones so I kept it that way, I think the most I've had so far was 6 bones? I don't remember
with a mixamo rig
but a lot of people I've read say 4 is enough so maybe I misremember?
I am pretty sure most games keep it to 4 to this day
it's very possible 4 is enough, I only ever used a single animated mesh so far, when I add in more I'll revisit the issue and see if I can reduce it
I assume depending on your source format you can probably have the whole vert * bone matrix of theoretical weight paints in the source data
but dropping them for the top4 seems sufficient to me
Firefly can handle all of them extra twist bones. 😎
Yes most of the work would be getting the sync right
I still might want to do it just for the exercise in working with a more complex sync
Not for any performance reasons
I need an excuse to build a rendergraph as eventually I will be making even more complex render changes
The only thing hard for me or any work at all with Vulkan is just the sync. I go weeks without even looking at vulkan code
Well if I get into some details about some of the math in the spec that is always a challenge
I meant hard in terms of what I am doing so far with my rendering not all of Vulkan
VMA is also doing a lot of heavy lifting
do you have anything resembling a frame graph
Not even a tiny bit
if you're screwing around with more complex sync you might wanna invest in that
Yeah
level 1 for a frame graph, if you could even call it a frame graph at that point, is just associating a state tracker with each resource (particularly images)
which reduces the mental load from thinking about previous and current state to just current state
Yes I want to do to work on that
I'm not having fun any more with this project, it just feels like a second job. I'm gonna do something else graphics related. I don't think making a game is for me. Probably just using C, Vulkan and Windows APIs. idk.
Just shelve it for a while who knows when you'll find interest in it again
But yeah making games is definitely a slog
And doing it from scratch is even more insane
It's like one of those toys that's a chain of 20 gears put together so that turning the gear at one end causes the other end gear to rotate at a ratio of like 1:1000000000 so that even spinning it at one end nonstop for years would never spin the other end gear fully
Yeah makes it real impressive that people like David Rosen pulled off what they did, although he basically made it his job
Or the df guys 
yeah
I just find the graphics portion fun
I'm just going to render stuff that's fun and if it's not fun then I'm not going to do it
The gameplay stuff is fun if it's technically interesting imo which is why I am making a sandbox game
But if I wanted to make a regular content-driven game I'd probably use an engine
The purpose of my game is mostly to be a programming sandbox
that sounds like you're having fun
This is going to be my third vulkan renderer. I am gonna start with a frame graph this time. Just because I want to. I am going to try and learn to use 4coder as my editor and build via CL in a bat file and use the rad debugger or remedybg. And Just .c files
return to monke
I like working on my game because there is so much work to do that I can pick whatever feels the most fun to implement at any moment
but the problem many people run into is that you can't ignore the unfun stuff to get a playable game
Yeah
Also real monke for real, I am going to build my own arena memory allocator, just because I want to
You could try using one of the Vulkan abstractions like vuk or daxa
Someday I should probably try that myself
But I just like GL
That's why I pick higher level APIs 
C is high level
some people also promote 10xeditor for c++. I didn't use 4coder but I use a less known editor written in jai that is small enough that I can make my own adjustments. 4coder is closer to that iirc, everyone has their own config
lol people on reddit do not like it
https://www.reddit.com/r/programming/comments/122wrdv/10x_editor_version_10_released/
An editor written in jai
Cool
I saw the 4coder dev give a talk at handmade seattle
Probably why I want to try it
also sometimes people lack clear game ideas and instead focus on bikeshed. that was the case with my previous endeavours. knowing exactly what you want to do and having to work on a vertical slice of that to validate the idea is encouraging, ime
I concur. knowing what I want the end result to look like has made me very focused and relatively productive
I sort of know what I want to do, but bikeshedding the parts that are fun to design is part of the point
But yeah having a huge list of things I want to implement helps drive development
Yeah I dunno, do whatever you find fun. But I will say one of the things that keeps me motivated to make a game, is that you guys play my game. Let other people try your project, even if it doesn't seem like its "ready"
ASO is fun
Are you writing jai?
nah, still going with odin
also, occasionally rust. made a small rust+macroquad game as an exercise. I figured this statement above and my next game idea doing that, rather I already knew what my issue was, but it helped me to figure that I can find good game ideas and design games
Oh interesting
I was looking at some forum threads for 4coder from 2018 and saw Ginger Bill was actively posting
yeah, both odin and 4coder is from handmade circle from casey muratori era
hrm it looks like 4coder is abandoned actually
After 5 years of working on 4coder as a side project, I open sourced the entire code base and have retired from work on it.
hrmm
yup
idk it still looks like a cool program. I am going to give neovim a quick try though and if not I may try out the community fork of 4coder
I used vim for many years but before neovim was a thing
nice I got neovim nicely set up, it's working great for me, also I'm going to retire this thread thanks for all the help with rosy ya'll 🙏
will u make a new thread for this?

You could repurpose your thread for every new project
oh is that better behavior
I wasn't sure what I was going to do, it's not going to be very graphical for some time
it's lazy behavior lol (I do it myself)
but the nice part is that everyone who's already in this thread can see your new stuff without having to subscribe to a new thread
ok I keep this thread, thank you
my new project I am calling Palinode https://en.wikipedia.org/wiki/Palinode
I have been setting up neovim, I have treesitter, tree-view, lsp for C set up and telescope, I think that's good
I'm configuring my .clangd so I can tell it I want latest C, I am using the msvc compiler though
my builder is just going to be a bat file, I looked at handmade hero's bat file and that even after 670 episodes is still a very simple bat file, Per Vognsen and Ryan Fleury also just use a bat file. I am going to manually specify command line arguments for the compiler and linker
neovim is pretty amazing tbh
this is already better than visual studio O_o
so worth it
^^ F5 builds, Shift+F5 opens debugger, then I demo an LSP clang error with an auto fix
my vim is still pretty rusty
so I'm a bit slower than I used to be with the keyboard shortcuts
what a turnaround, I went from a depressing daily progress grind on my game to be excited to do programming again
forgot I needed autocomplete also 😅
and I need a nicer theme
we need a neovim setup guide on the blog 😛
I literally don't remember where I got my configs from
I think I got lucky being recommended youtube videos now and then and I basically pasted in stuff if it seemed useful
yeah thats how it goes
i keep forgetting the shortcuts after not using vim for a day or two again 😄
I think I know like 1% of the shortcuts and capabilities of vim but that's already smoking a standard editor
basically just modal navigation and regex find/replace
Vim is big; so big that it does some very useful things that are often overlooked. Plugins can buy us a lot of functionality, but they can add a lot of burden in the form of dependency complexity. In this talk, we'll explore some of the tradeoffs we can make between plugins and "vanilla" Vim features that achieve similar results, including:
- a...
a good portion of my vimrc, even before I used nvim, came from this
the most important one by far though was the netrw file navigation because I can just open a file by typing :fin startOfFileName and hit tab to autocomplete
but a lot of this stuff is not too useful now that I use nvim because you can and should be using a real lsp
has neovim crashed on you yet? That's the one thing keeping me on standard vim
the thing I hate with vim is hitting caps lock by accident
it's never crashed once for me, at most I occasionally need to restart it because clangd starts hogging memory and slowing down after a while
yeah idk what life was like without it
you can just remap it to something else, or remove the bind altogether
neovim hasn’t crashed on me so far. I am only setting up as I need things.
I have added very little and it’s already really good
I also use LSP, it is great
I think I am going to just try to focus on a very specific niche, getting really good at rendering with vulkan, on windows using an nvidia card. That’s it. Nothing else. Anything else is too much. At least for now.
That’s already a lot
I am going to learn C, the vulkan spec, windows, the nvidia driver, make use of NVAPI, tracy and renderdoc integration and improve my math and understanding of graphics techniques.
Anyway as long as it is fun
I might as well remove the entire key, the only time I press on it is by accident
I think someone said something similar above but personally I learn best when I have a goal/something concrete in mind
otherwise I find it hard to find the motivation and remain consistent
im also very content with my kb shortcuts in vscode or clion or rider, no need to switch to *vim for me, but i am a little jealous that you can do fancy things of you know the right keycombo
i never had issues with caps lock, maybe my hands are too smol or yours too big 🙂
frankly the main reason I use vim it's because it's bloat free
it's installed on every Linux machine by default
every 5 years I try an IDE (cough eclipse cough) and after 30 minutes I uninstall it
ah and also I can use vim over ssh so that's awesome
yeah regular vi/vim is what I use over ssh when necessary
only thing i occasionally miss from clion/vscode is multicursor, tbh
and clangd is a bit of a pain to set up for cross compiling
there is multicursor in nvim I think, I just have windows copy paste enabled so I can't use it (ctrl+v)
yea block visual works kinda like mc in some use cases but not all
you can disable system clipboard on the terminal and access it with "*p to get the shortcut back, btw
i get both because mac uses command for copy/paste (but instead lose option as a key for shortcuts since macos uses that for special character input)
I looked at multi cursor nvim and saw all the dependencies it required and decided to just avoid it for now
yea i tried it and it was super buggy and awkward
just decided to go without it and tbh i find alternatives anyway
line visual and :s is goated
i used to use it all the time in clion as well, you find alternatives
for aligned cursors block visual works great
Yeah
and for the find next case regex find/replace is very fast
I don’t understand why there wouldn’t be a good nvim extension for it
doesn't really fit the vim way of doing things, i think
Maybe I finally learn how to use record and replay in vim
the existing ones are just kinda awkward when it comes to working with different modes
i still have no idea how this works
honestly i'm probably using like 2% of vim features
I just accidentally hit q sometimes and my life is over
Until I remember to hit q again
there is multicursor in clion/rider/vscode
yes but those are stinky and bad
: )
Super stinky
(nah ides are fine but once you get used to a vim workflow it's so much nicer tbh)
yeah, thats what i mean with me being jealous about those who learned all the vimisims
one thing i will absolutely miss about clion
is it dealing with the horror of c++ build systems for me
Another day, another IDE vs. Vim war. 
Just a moment ago in another chat someone was arguing that operator overloading is bad. :')
using nvim makes me wish i was writing rust even more 
😄
average bikeshed moment
get oxidized
I am going to write my own math in C and I already know lack of operator overloading is going to suck
Idc
tbf i love operator overloading but "wtf operator overloading bad" is a reasonable reaction to std::chrono
I am sticking to C
i dont mind pure functions
Yeah, the person claims to be "tired" of defending their stance though because they have to do it at "work" all the time. So they must be very smart and amazing and clever and the gooderest coder.
we have plenty of those on the server 🙂
honestly i've been writing mostly c lately for uni, and i like it
That's what that person I'm referring to should do that seems to really dislike all of C++. 😂
much nicer to write than c++ because it doesn't have all the nasty complexity grafted on
I just want to keep it simple
I like pick and choosing the amount of complexity I have to deal with, so I use both some modern C++ features and ancient C-style bs
This is a hobby
yeah c is nice and simple (because the compiler sweeps all the complexity under the rug for you and you can pretend you're writing code for a fast 386)
this is also a sane approach, tbh
I am too dumb to understand cppref documentation also
dw it's actually just ass 
It’s too complicated
It could be worse, you could be given a link to cplusplus.com instead
i mean it's good if you can parse it but def not well written to be readable
rust documentation has spoiled me
I added a key mapping that opens the C language reference Microsoft docs and it is great
I can read and understand it
be glad you're not dealing with metal at least, apple's documentation is shit 
i'll give that to microsoft, their documentation is very good
Yeah it’s like a mix of objc and metal and c++ yeah?
or at least used to be, they probably started writing all of it with gippity now 
The forbidden word.
metal itself is an objc api like most of macos (that's fine really, objc is weird but kinda nice), msl (the shading language) is basically c++ 14
it's honestly a very nice api
Yeah msdn has a gippety box at the top of search results now
I use Kagi to search the internet nowadays, but it's a paid service.
but apple's docs can be lacking and msl has a buggy ahh compiler
I also use Kagi
It is good
I am going to try and use by default mesh shaders and see how far that gets me in what will be my 3rd Vulkan implementation
Starting with a render graph from day 1
I am going to just do some stuff with instanced simple geometric shapes, build my own imgui as I need it and eventually work my way through the khronos gltf samples, building my own gltf parser.
Do the sponzas and bistros and then just have fun doing fancy graphics stuff as I learn
That’s it
Ambitious (this message was brought to you by the Vulkan triangle gang)
yeah it took me a few vulkan attempts to get something I was happy with
I don't have the best RHI but I don't think about it and don't have much interest in picking at it, it just works
which is actually great
I kinda nailed it on the first try (first try that I actually wrote real Vulkan after bouncing off it 3 times) and that's where I developed my now signature engine architectural style
But that was for a very specific game
I had no RHI
Just hard coded functions for drawing terrain, drawing the cockpit, drawing external stuff, etc
for me the main thing has always been discardability because the engine dev cycle is making some stuff in a spurt and then looting the corpse of that version for parts
I just made something flexible enough and stable enough that I'd carry it over instead of tossing it
Yeah
Mine was a giant kludge because I was porting a large and messy existing codebase and basically out of necessity it forced me to take the most decoupled approach possible
Otherwise I'd have to wade through thousands of lines of terribly abstracted rendering code from my first ever graphics project
Including like custom GUI and CPU algorithms processing GPU-generated buffer contents and all sorts of crap
Nailing something on the first try is both the best thing and the worst thing at the same time, haha.
anytime I have seen Demon's code it's been emaculate, nothing like my own code
I always dread having to reproduce success, haha.
When I have to ask myself to do a thing again 😭
I try to just fail a little bit less each time
The power of practice.
yes
writing my own memory allocation, the mesh shader and a rendergraph will all be new things for me
this go around
I'm also going to write my own vulkan loader
I don't think most of those things will be a lot of work
didn't they officially add it recently?
for like an mvp
How many story points are we allocating for these tasks? 
13 the coffee pot card
My goodness, deccer, please, at this company we use a power of two counting system.
I'm going to actually follow Per Vognsen's bitwise arena allocator implementation and try to build it myself https://github.com/pervognsen/bitwise/blob/master/ion/common.c#L1
yes

whoever loses is deallocated
for some reason that made me remember the stickfigure kungfu flash thing from 20 years ago
Looks like I've got the upper word!
Proto-Lofty
hehe
I think the most boring painful thing I'll end up having to do is read jpg and png images that are in the khronos samples 
and then do the compression for them and mipmaps
that's a ways off though, a long way off
the best arena allocator is just malloc(999999999999) and then increment the pointer with each alloc from the application
Not gonna use stb for some of it?
I think I could be forgiven for using Sean Barret's code
idk
I'll poke into it a little bit
see if it is something that won't be too awful
but if it is I might cave and use stb
Convert all the Khronos sample textures to BMP 
t was worth a shot
do I have 999999999999 memory
virtual? sure
you can unironically do that if you know the scope of your allocations
even your htop is comic sans
the whole system is
comic sans and a transparent window
transparent windows always look cool
but then I use them and I can't read anything
I imediately turn it off, I tried just slightly increase the opacity a little bit at a time and my brain can't deal
I think the comic sans, transparent window and color scheme look great though in the screenshots
alright gonna try and make some progress now
arena allocator is actually a broad term I've learned
you harness the power of addition
i did a simple one in like 10 minutes for a uni assignment, just a linked list of ~1mb blocks sequentially assigning memory, add block if there isn't enough space and free the whole thing in one go
that's not an arena to me, that's a slab allocator
an arena with a bumpy allocation scheme is super shrimple though
no reuse and it just wasted any space left over in a tail block but whatever
never heard of the latter tbh
an arena to me is basically like a block you append allocations at the end to
but on top of a single, existing allocation
right
basically a stack
ur prof should've taught the virtues of virtual memory by making the blocks a hundred GB each
yea the class expected us to check every malloc for some reason
prof was an older guy and bit of an industry veteran so probably some 80s brainworm
because any modern os will happily let you malloc a tb without ooming
I don't think the mvps will be hard, it's just new to me is all
i heard about it in OS class
i have an os class next semester so maybe i'll find out then who knows
Adults know not to steal the slab
the slab guy wasn't even the worst
they had some scary uncanny 3DCGs
this one got to me
i sometimes wonder what you guys watched as children
globglogabgalab
slab guy is from Courage the Cowardly Dog
the guy I posted is too
that must have been after my time watching cartoon network
cat in the hat was crazy
that cat reminds me of bjorn :B
Salad Fingers 
seeing a sesame street episode in the US the very first time was really weird
I signed up again for Handmade Seattle this year, last year was pretty good, so going again this year. It's Dec 13-15
the tickets were $198 or something
you could watch the videos from the previous events to see if it's something appealing to you, it's not necessarily always about games or graphics
there were a couple of controversial not really low level programming talks that Abner said he would avoid in the future, so if you see those, those were an aberration
I wonder if it's related to this
https://handmade.network/blog/p/8989-separating_from_handmade_cities
upon further investigation, I don't think it's related and I still dunno what you're referring to
yes it's related to that
Abner Coimbre is the founder of the Handmade discord and the meetups https://handmadecities.com/about/
yeah I checked out the website
at somepoint he took a break from the community to work with Jon Blow on a game, but then came back
but he had handed off the community
there's new leadership, but they were really friendly
but there were some talks last year, specifically from Andrew Kellye, creator of zig, that were taken as "communist" or something
I read a blog post of his saying he wants to do 80% software engineering talks and 20% other stuff
I didn't take it that way
I thought Andrew gave a good talk about keeping software good
but he said would take unionizing engineers or something
idk
anyway
and some of the talks were more about programming as an art
which were also not popular I guess
but the rest were very technical and interesting and I was glad to go
anyway I didn't really follow the drama, idc, I just was like if you watched the videos and saw one and were like wtf is this, that's not happening again
ok let me go find that in the video
that's the art one
followed by another art one
this one directly links to Andrew's talk https://handmadecities.com/media/seattle-2024/hms-day-one/
The year that triggered the Handmade civil war
Partly due to our keynote talk (timestamped), Handmade Cities paid a price for it. This was, however, not the only reason. In response to everything, we ratified a new advisory board.The Twitch stream is not available as individual recordings yet, but luckily our team archived a backup on YouTube.
anyway
there were technical talks that were cool
ok I see what you mean by programming as an art
it's like a story with a programming theme if I understood correctly
it was actually really interesting imo
yeah
definitely not what I paid to go listen to though so I understand why some people were upset and he created a board to help pick this year's talks
one of the talks talked about hacking the linker process
and I learned a lot about how the linker works from it
the goal was to learn how to make linking faster
oh the guy said some p*litical things just before your timestamp
yes
wait compile c/c++ in a single tu?
that sounds insane
unity builds are common but they also break some semantics
how's it even work, no c compiler i know works that way
hrm?
unless you like, do everything in a single source file
some build system flags just append all the TUs into a single chungus one
no you don't do it manually
oh
it's just including the cpp files
https://github.com/pervognsen/bitwise/blob/master/ion/main.c <-- this is a unity build
anyway I don't like it because now it's impossible to have file-local statics
this is Per Vognsen
oh that is manual unity building
sounds like it would solve some of the compile time issues with templates though right? wrt code getting compiled multiple times for each tu
not just that, but any header
well
in the Handmade community people are using .cpp files but mostly writing C or just writing .c files
there's no templates being used
ya
though you would lose partial builds as well wouldn't you
yeah rip incremental builds
well
so that would increase compile times unless you do a full rebuild
but these people probably have like 2 second builds anyway
hehe
hmm this convo has inspired me to try livepp
what's livecpp
c++ hot reloading
visual studio has it but it's very slow. livepp is probably much faster
oh boy
I feel like with games maybe not as important if you can reload your shaders assets and lua
inb4 it's joever the moment you include a stl header 
idk anything about it
wdym

