Making Models in 4 Dimensions - 4D Golf Devlog #6
HTML-код
- Опубликовано: 26 окт 2023
- Wishlist 4D Golf on Steam: store.steampowered.com/app/21...
#4dgolf
Devlog #1: • So I Guess I'm Making ...
Trailer: • 4D Golf | Release Date...
Support me and innovative projects like these!
Patreon: / codeparade
Ko-fi: ko-fi.com/codeparade
Merch: crowdmade.com/collections/cod...
Music (CC BY 4.0)
Mindseye - A Vibe Nostalgic
freemusicarchive.org/music/Mi...
"ok, now that Hyperbolica is finished I'll just do something easy like, idk, golf in 4D?"
several years from now: "now that I've created a time machine I can kickstart the creation of Unreal Engine's 4D project support, this is so I can make the grass texture on this mini-golf course look a little less flat"
"now that 4D golf is finished, I'll just do something easy like, idk, game about actually realistically falling into a blackhole, swapping space and time there and rendering the ringularity"
@@seekvapes9641 Jesus christ 😂 That's the logical next step after this
If he keeps making something simple at an exponential rate, he should be doing full, feature/physics complete planetary simulations with full periodic tables in 30 years
I feel it's not just a the technical hurdles, it's also game design of a fully 4D-supporting game, where it isn't just a gimmick, but something that is crucial for the gameplay which you can learn, meaningfully interact, progress and have fun with...
Now that my game about actually realistically falling into a blackhole, swapping space and time there and rendering the ringularity is finished, I'll just do something easy like, idk, game about simulating the multiverse with evolution and human civilizations with scrollable timelines across all realities including the one we're living in.@@seekvapes9641
"For every triangle you can see, there's probably at least 10x as many that you can't see."
Sounds like someone needs to invent 4D occlusion culling, lol.
watch him invent a 4D occlusion culling algorithm to play mini-golf and it being better at generic rendering than any other process by orders of magnitude.
The phrase "UVW unwrap a tetrahedralized mesh" is _unbelievably_ cursed.
oh boy, time to uvw unwrap 4d shape straight into hell
Hearing that was the hardest I've laughed in a while. This project is an insane challenge for anyone to set themselves. He could probably get multiple academic papers out of it.
"I don't really want another multi-year project like Hyperbolica, so this will probably be a relatively short and minimalist game that I just spend a couple months on and release." - CodeParade, July 2022
- all programmers who have ever or will ever live
@@Android480 Indeed I feel this.
Famous last words
Easy and 4d should not be in the same sentence
Except in the case of "4d textures and features are not eazy"
wait until someone makes a 5d game
@multiarray2320 what about all the needed dimensions for string theory
@@multiarray23205D Checkers with Universe Space-travel
@@multiarray2320 ive made 2 6D board games, though anything past 4D takes AGES to play with "perfect" players
Imagine time traveling back 20 years
to tell people a 4D golf game is real
I'm gonna make some people feel really old now: 20 years ago is 2003.
They'd react the same way someone today would. They weren't cavemen lol. At least I wasn't.
We have nothing today that isn't something that hasn't existed since at least the 80s. It's all just better and cheaper now.
In 2003 I was playing a game that came out in 1998 called "Hypercube: a 4d game" by "Harmen van der Wal" . It wasn't as good as this of course, but I'd call it a basic 4d golf game.
In a strange coincidence, it is almost exactly 20 years ago that I first read Flatland and was thinking about 4D geometry for the first time. Though the notion of a 4D game was probably beyond me back then.
Tantan?? Is that really you? Come on. As a based Rust-lang enjoyer, you should know that for anyone with a solid grasp of mathematics, this isn't exactly a ground-breaking concept. These ideas aren't new. Only thing they'd be impressed about is the rendering maybe.
"They don't look like leaves." Bruh you are inventing 4D leaves, they can look like whatever you want 😂
I can already tell the speedruns for this game are going to be INSANE
So will the speedrunners for it.
Someone will probably beat the whole game within 4D seconds.
@@theapexsurvivor9538 Can't wait for SmallAnt's Joker arc after 5 minutes of 4D Golf speedrunning
There is actually a nice way to extrude a shape made of triangles into a shape made of tetrahedra in a way which always guarantees the edges always line up.
The mathematical structure which accomplishes this is called a simplicial set. It's basically a way of organizing simplices and gluing data to form shapes.
The key ideas to how it works are
1) Having the edges of each triangle ordered so that the way they're glued to each other is compatible with that order
2) Keeping track of "degenerate" simplices. For instance, you can consider a line as a degenerate triangle where one edge has length 0. This of course wouldn't need to be rendered. It would just go into the algorithm for tetrahedralizing the prisms.
From here, the Cartesian product of the simplicial interval with the simplicial set which represents your surface will produce a simplicial set for the solid, and all the edges will naturally line up. I believe simplicial sets are implemented in Sage if you want to check it out.
You're speaking a language I don't understand, but maybe CodeParade does, so I hope he sees this.
Yes, I too upvoted this despite not understanding a thing.
I understand exactly enough to know how much I don't understand. It does seem like it should work assuming that I'm not missing anything obvious.
You can also make a conical extrusion this same way, by gluing all the points of the original simplex to a 0-simplex (a point).
bumping so it might get noticed by cp
Something tells me you're gonna be one of those programmers that falls ass backwards into creating an entirely new standard in generalized engine building that gets picked up by everyone. Like the adoption of quaternions in game physics
Wait is there a story to why Quaternions are in everything?
You got me curious now lol
@@SheepUndefined because they are just better and can properly represent any rotation
@@O5MO Oh I know that very well, I mean more like how it initially came about I guess
We're literally watching him develop a game that people are going to read about in textbooks 50 years from now.
quaternions were invented cause a guy couldn't invent 3d coordinates that work similarly to 2d coordinates lol
Dude... you are really breaking new ground and discovering new frontiers here. Things that no one has ever done before.
Please keep making these, documenting all the problems you encountered making a 4D game.
I find these problems fascinating. These are problems you wouldn't even know existed unless you were trying to build a 4d game world. So cool.
To boldly golf where no-one has golfed before!
4D Miner is a cool project too.
Miegakure has been in development since 2009 and they've surely encountered these issues too. There's also 4D Miner which is gaining popularity recently. Not to discredit CodeParade, but this is far from being the first time someone explores these concepts in gaming.
I was wondering how this project went along, glad my expectations have been met and you've properly went insane
Keep going!
More like he's went super sane and that sanity looks like insanity to regular sane people. 🤷🤣
@@deoxyplasmic It's spelled "super saiyan".
New 4D Golf Devlog? I watch it immediately!
Apparently not, since you chose to write this!
ye, exactly me
@@Tay10rdwhat if he wrote it while watching
@@vindi167 “I’ll watch”
shortened form of “I *will* watch”
= Simple *future* tense
I love how there's so much nonsensical random content on RUclips, but every so often, there's something so brilliant that represents the culmination of so much work, and I happen to be around to witness it!
This channel *really* has a longstanding tradition of glossing over/subtlety flexing/giving for granted really High level math skills and use it as tools for it's projects
I wanted my grass to look more "grassy", -here is my pier-reviewed article in Annals of Mathematics on Painting N-Dimensional Surfaces Using 3D Toruses with Radially Repeating Shading.- Rice looked bad, so I used a mint, and i think it looks a lot more "grassy" now
@@randomnamegbji Man, I wish my papers were reviewed by a pier
We're back at "shit that's whyld"
Like, yea, conceptually it's pretty much the same as when I said that 4d isn't blowing my mind anymore, but seeing a 4d tree move into view somehow is much, much cooler than it should be!
Someone should make a lovecraft inspired adventure game with this tech... a complex model like a chtulu lerping into 3d space must look soo wild.
4d miner has 4d spiders that attack you. nowhere near lovecraftian horror, but still freaky to see a handful of legs appear to pop in and out of existence as they run towards you
I was actually thinking about something like this pretty recently, because I've been on a bit of a cosmic horror binge, but I lack a good enough understanding of how these sorts of projections are actually performed to even begin to have the confidence to try. Imagining how one would even begin to throw skeletal animation (or anything similar) into the mix, in order to produce animated characters, just breaks my brain a little bit.
But moreso than that is the idea of actually creating the character models themselves. Do you manually create a single model, and extrude into 4D? I feel like that would look... Not great?
Or, do you create a handful of intermediate meshes of the same character, and write a script and figure out some rules for how you want to generate simplices between the triangulated polygons? I feel like that would look better, but it actually sounds like a newly discovered level of hell.
I guess for a retro aesthetic you could make the characters by composing different 4D objects together. That could work, and might even look pretty good. The animation is still a headache, but it could be worse.
And then the issues with polygon count, and that sort of thing, like CodeParade mentions here. But as long as the player is restricted to a 3D world, with only one aspect of it being 4D at any given time (Like Cthulhu, or some other Lovectaftian entity), then maybe that would be such a big problem.
I love the idea, and I wish I had the knowhow to even begin to work on something like that, but... Oof.
5:04 HoxelDraw!
I saw that, too!
Your ravenous desire for long-term gritty pain is both admirable and horrifying. I love your commitment, truly astonishing work. ^^
I really appreciate how you've kept at this incredible challenge given basically every already complicated aspect of making a game has an extra dimension of all the usual problems except with no intuition about how to address them.
I can't wait for 5D Golf with Multiverse Time Tree-vle
i love how towards the end of a project it's less about accurately figuring out how to calculate some crap, but just about how to hack your way to the goal
This channel is just amazing. I have legtimately zero idea (and this is not a hyperbole) how any of the programming or the mathematics behind it work, but just being exposed to these ideas is immensely interesting and the way you present it all and tie it together, with your calm narration and superb explanations is both mindblowing and captivating. Please keep making these, I just wanted you to know how much I appreciate your videos and your work.
Your explanations of how 4D space works are my favorite on the entirety of youtube
I gotta admit, watching these devlogs is incredible not just because of the concept, but because of your dedication to it. So many people try to make ambitious projects like this only to abandon them when they start to run into complex problems or just run out of passion halfway, but you're still going despite having to work with problems most people (myself included) don't even understand because it's a dimension higher and anything we're used to. Truly an inspiration to watch
you could totally make a really long version where you explain the problems in great detail and we would all watch it
Holy shit Zoboomafoo clip in 2023??? Love it dude
the more you know, the more you know that you dont know and this video transfered that message again in a humbling way
"I hope I didn't break your brains too much with this one"
I wish you could see my face the entire video...
Today I learned my lawn is a 3d projection of green 4d peppermint candies.
I remember trying to visualize a hypercube for an arbitrary number of dimensions. I started by creating an n-dimensional drawing system similar to OpgenGL, where you draw triangles and decide if you want them to be separated, in a strip (this means n vertices creates n-2 triangles) or in a loop (this means n vertices creates n triangles). Except in my case I would use (n-1)-dimensional simplices. So I had built the system, it worked, now I just needed to find a way to create hypercubes and preferably in a way that optimizes the amount of simplices that need to be drawn for it. There was a rare moment where I was not feeling too prideful and googled for the algorithm instead of coming up with my own algorithm. Fortunately I did, because there was a paper written about it that explained that it is very hard to do optimally. So I ended up doing the "easier" thing and extrude from a lower dimensional hypercube and added optimized cases for 2, 3, and 4 dimensions (from the paper).
This ended up being a very time consuming project to learn that I should have done it with ray tracing from the start.
The box turn into a tree!
man, I cannot express to you how much this game excites me.
More tangents please, seeing the 4D tools are very interesting.
i remember running into the edgeflow/triangulation orientation problem
i had an n-gon on a mesh i made in Maya, using the "auto" triangulate feature in maya had a "handedness" a tendency to choose one orientation for the triangle to form in a rectangle
Substance painter had the opposite handing, so my model would shade correctly in mayas native renderer, but would form vertex shading errors in substance painter.
moral of the story is its important to know what your automatic tolls actually do, and im glad i learnt about topology before getting into the habit of letting the software think for me
There's actually a shockingly simple algorithm for choosing valid orientations for the diagonal lines on the tetrahedral prism faces. Instead of a graph *coloring* problem, you can model this as taking the undirected graph of the triangle-mesh edges and choosing a *direction* for each edge, where the direction expresses which of the two orientations the diagonal on the prism face corresponding to the edge will use. Then, the requirement is that for each triangle, its three edges' chosen directions can't all point CW or all point CCW.
How do you choose such directions? Give each vertex a unique integer ID, then direct each edge from the lower-numbered endpoint to the higher-numbered one. That's it. That's the whole algorithm. I've used this for making a tet mesh from a tri mesh and it works well (though it wasn't in 4D 😛).
Next time, please go on as many tangents as possible! This topic is very fun
One thing I hope developers will keep in mind about adding motion to trees or foliage in games to provide more atmosphere is the fact that the motion should not be continuous. Model the motion as well, using some form of random time interval for on/off. Wind rarely ever blows continuously and even more rarely - continuously and evenly.
Sometimes, it is the smallest details about the environment that have the biggest impact on the experience.
and here I thought the Devlog for Hyperbolica was good. You just keep blowing me away, this is amazing.
You know you accidentally created an awesome story for a game you open a box to find another then another until your in a box dimension trying to find your package
3d games used to not run smoothly with older graphics cards, but now they run really smooth with modern graphics cards that almost everyone with a computer has. right now, as you mentioned in this video, the game has to be low poly to run well. so eventually, maybe graphics cards will get way better and we can make better quality 4d games and have it run smoother. or we will just find a ton of huge optimizations for 4d graphics rendering
when your textures grows in Θ(n^4) ⚆_⚆ (n is the resolution)
Most software problems can be broken down into 3 categories: fun the the programmer, fun for the player, and fun for the computer. This game adds a fourth dimension of fun for all involved.
It's interesting how many of the little parts of this project could be spun off into their own things. Like, if you just took the whole 4D models thing and made a "hyper-sculpture museum" where maybe people could even make and share their own models then that would make for an interesting result at the end. But then this particular thing has the 4D trees AND it's also a golf game, which is interesting.
You are the most hardworking person I’ve ever seen
Working with rotation in 3d with quarternions is quite a ride so I can't even begin to imagine how this shit works in 4d
Honestly man i could listen to your random problems in making a 4D game for hours, so please dont ever leave anything out, im glued to the screen
I have the feeling you described in the intro.
Very cool food for thought as I experiment in Pure Data, an early audiovisual node-based programming environment. I recently got glsl shaders to do things in it, seems like it would be able to do things like this too, especially with ample use of swizzling and manually plugging in the algebraic reductions of the more complicated matrix operations.
Looking forward to release. I also enjoyed the Kratt bros and Courage clips.
man this devlog series is so cool
You should make a video about how showing stuff that you can't see because it's in the 4th dimension but in the same spot so it's greyd out (kinda like how the 4d googles in 4d miner work) is done using 2d and 3d because I'm trying to imagine it but it's hard and the whole concept is definitely more complicated than it probably seems I bet.
Keep up the good work! Loving everything you make, hyperbolica, 4d golf, and everything!
It’s hard to make something that’s impossible to comprehend.
5:12 this made me click the perception of 4D, cool.
Making 4d trees on a 2d screen in our 3d world, potentially in an 11d universe
What you talkin about you break my brain every time you release a video 😂
I have no idea whats going on during these explanations but it's cool and I'm glad I've been exposed to this project
I don't know why, but seeing the dimension shift whenever the ball hits a wall is really interesting.
Looks like the game is coming along nicely. Great work!
Inspiring to hear about your work with 4D tool chains
Excellent video! I love it! It would be much better if you could explain in more detail the "two coloring of the edge graph" around 2:30 in the video. I find this part challenging and don't understand the motivation for jumping into this part.
i honestly think this is a really cool concept, and I might play it once it releases
So might you play it on the 22nd of March?
I enjoy watching these videos even if my brain burns out by the explanations.
Your devlogs are always super inspiring for me
You've dragged this project so far from where you started and it's so cool, probably won't play it but will definitely continue to watch the devlogs, this might become a great and simple introduction to 4D modeling and etc stuff for anyone interested as well! Might even set the standard for these types of games and tools, the simplified formulas used are very interesting (though i don't understand anything that's going on lol).
Bro can write 10 different scientific papers about this process
Can't wait for the sequel, 5d golf.
I like your fancy words, magic man.
I’m excited for hypercube additions
So many unexpected nuances when you go up a dimension!
If I had to create 4D models, I would create a machine learning model to do it naturally
Well watching the 4D golf trailer makes my head hurt just as much as 4D Chess.
I don't understand why you can rotate through the 4th dimension (slices) while the golf ball is moving. While you're aiming this makes sense, as you're aiming through another dimension (and we have to slice through it so our little 3d brains can understand), but while the ball is moving it's like you're giving it additional momentum through the 4th dimension.
Low-poly, my favourite vg aesthetic
Its a pure joy when CodeParade uploads!
Absolutely crazy stuff. Well done!
the absolute madman has done it😄
Tetrahydralize sounds like a complicated chemical procedure...
this is literally insane oh my god??
ong your explanations of the 4th dimension are scarily similar to my dmt trips
You’re so cool and smart for figuring out how to do all of this. Keep it up king.
"If you wish to make an apple pie from scratch, you must first invent the universe" -Carl Sagan
Looking great! And quite fascinating
Man this project is really going somewhere, Wish you the best luck bro!
I get and can understand the concept of 4d. I really want to play this when it comes out
Then know that it releases on the 22nd of March
the most counterintuitive stuff with hyperdimensions that I saw to date is that the volume of a sphere tends to 0 as the number of dimensions tends to infinity. This is proved analytically and numerically with Monte Carlo integral.
Generally I'm a dumbass when it comes to 4d, but this actually kinda makes sense to me.
Like I know that for the edge of 1 a square, cube and a tesseract "volume", for a lack of better word is 1^n for n dimensions, i suppose it's the same for higher dimensions(?).
And a circle or a sphere with a 1/2 radius is kinda the former square and cube but with missing pieces, so it does make a bit of sense to me that if you keep on adding dimensions there's less and less material to work with.
Obviously correct me if I am completely missing smth due to my massive oversimplification.
@@MrMiddleWick Yeah, that is essentially the point. You can get an explicit formula for the n-dimensional volume of a ball and see that it goes to 0, but the inuitive reason is because to be in a ball of radius 1, if you have coordinates (x1, x2, ..., xn), then this point is in the unit ball if x1^2 + x2^2 + ... + xn^2 4, the diameter will be larger than 1, i.e. the sphere in the middle pokes out of the cube. The reason is because spheres are pointy, their points can only have a few large coordinates, but cubes are not pointy, all of their coordinates can be large.
This is so impressive, I can't wait for this game to release!
What about some 4D LOD?
Divide meshes into little slices, and turn them off when they're not showing, keeping the low poly stuff for the ghost meshes.
Or just ignore it, since it works well enough, and you're close to release. :)
instant click to see the video.
maaaaaan, what a work!!
and what an amazing project!
Hope we get a way to add the obstacles to our own levels with the editor and maybe even make some of our own, along with more complicated track pieces, stuff like that!
yeah yeah everyone knows that feeling when youre trying to model a 4d tree but first you need to develop a linear time heuristic for an NP-complete problem. we've all been there
I got a nosebleed watching this video
Your whole game breaks my brain but that's why its so cool
”for the same reason we can’t use a 2d tree in a 3d game” yeah right
CP:Let's make a game! - Me:Hmm, that is hard. CP:No, let's make a game an Steam that is commercially successful. - Me:Dunno That is really hard man... - CP:Pah, peanuts. Let's make it in 4D or it would be too easy...
I don't know if I'll ever have the brains to properly play 4D Golf, but I'll be dammed if it isn't going into my collection...
This video hurts my way in the best way possible
5d golf with multiverses and time travel
Imagine how insanely brain-melting a 4d factory game would be to play.
My dude, you are a wizard. 🧙♂️🪄
POV-ray has 3D textures. They're based upon such structures as the rings of a tree, perturbed by some function. Maybe a 4D raytracer would be easier, than a bunch of polytopae.
Meanwhile the 4D Cthulhu monster developers struggling with 5D