No video

Texture Sampling #1: Points & Borders

  Рет қаралды 33,442

javidx9

javidx9

Күн бұрын

Texture Sampling is fundamental to all grahics these days, but I thought I'd have a bit of an exploration of what exactly goes on trying to emulate what we have come to expect of GPUs. In this video, I establish a little framework, and then create a texture sampling class to demonstrate various methods.
Demo: community.onel...
Source: Released at end of series
Patreon: / javidx9
KZbin: / javidx9
/ javidx9extra
Discord: / discord
Twitter: / javidx9
Twitch: / javidx9
GitHub: www.github.com...
Homepage: www.onelonecod...

Пікірлер: 135
@stephenelliott7071
@stephenelliott7071 Жыл бұрын
Great to see you back and yes more regular content split over 2 or more videos given your new circumstances is a perfect compromise.
@javidx9
@javidx9 Жыл бұрын
Thanks, that is reassuring to hear!
@user-ck8kp8vb4l
@user-ck8kp8vb4l Жыл бұрын
@@javidx9 I agree with above! Sounds like a perfect plan to me. Hope x10 and the rest are doing well!
@karolisr
@karolisr Жыл бұрын
I’m just happy you do them. You have an exceptional ability to present these relatively complex topics in an accessible manner. Thank you!
@hinoshimizu8351
@hinoshimizu8351 Жыл бұрын
True, glad to see you in 2023 :D
@Colonies_Dev
@Colonies_Dev 11 ай бұрын
@@javidx9 why spend the first 10 min explaining basic UV space concepts tho ;-; i thought we were gonna do different types of interpolation
@inlandchris1
@inlandchris1 Жыл бұрын
Glad to see you back at any duration of time, thank you for your time
@duncangibson6277
@duncangibson6277 Жыл бұрын
And Javid is back with a new series of educational videos. Brilliant! Looking forward to the rest of the series.
@lephobix
@lephobix Жыл бұрын
I love to hear "more frequent videos"! I don't care how long they are. I just always find your videos to be very interesting and enjoyable, no matter how long the videos are. Good to have you back😁
@flo-plus
@flo-plus Жыл бұрын
I‘m glad that new content is coming:)
@gedaliakoehler6992
@gedaliakoehler6992 Жыл бұрын
Very hyped to watch this later tonight 😂🎉
@gedaliakoehler6992
@gedaliakoehler6992 Жыл бұрын
Great video as always :) Thanks!
@michipeka9973
@michipeka9973 Жыл бұрын
Great stuff, I like the shorter format. However, an actually useful "mirror repeat" does not behave this way in most DCC softwares or 3D engines. If you plot the UV coordinates in both axes they should be akin to a triangle wave in every directions and not a sawtooth (I don't know if I'm clear).
@diontarrant5805
@diontarrant5805 Жыл бұрын
Man all your videos are great, I've learnt so much about programing from them
@jeffdowling1682
@jeffdowling1682 Жыл бұрын
After watching the nes emulator videos and learning pge I am hooked so any content is better than none. I have been working on a snes emulator to get better at coding. Had to start over a few times after learning something new(like being able to define a 24bit uint). After hitting outside of the nes scope I am completely lost and maybe get a few lines of code written a day with the rest of my time researching and figuring out what needs to happen. It’s frustrating as heck so having a short video to distract me while still helping me learn is great. Thanks for making learning to code approachable to new programmers like me.
@urinater
@urinater Жыл бұрын
Wouldn’t be a Javid video without normalised space. Glad you’re back, happy and healthy.
@javidx9
@javidx9 Жыл бұрын
Lol
@KerboOnYT
@KerboOnYT Жыл бұрын
I subbed because I find your content interesting. Whether it's one video a year or one video a week I'll still be here watching. Cheers from Missouri, USA
@javidx9
@javidx9 Жыл бұрын
Hey thanks Kerbo!
@medicallyunexplainedsymptoms
@medicallyunexplainedsymptoms Жыл бұрын
Videos this length are perfect for lunch-break viewing, so it works for me.
@imaymakesomevids
@imaymakesomevids Жыл бұрын
30 minutes is a good length, good to see you back!
@DaTux91
@DaTux91 Жыл бұрын
Good to see a wonderful new video from you! I, for one, am very happy to see somewhat regular content in more bytesize chunks, if you'll pardon the pun.
@RichardSmithers
@RichardSmithers Жыл бұрын
Good to see you back. Hope all is going well with the family.
@jhfoleiss
@jhfoleiss Жыл бұрын
I'm glad you're covering texture mapping! This is a topic that computer graphics books and courses usually treat as trivial, thus good educational materials are scarce. Any chance you'll be explaining to us how to map textures to non-rectangular quadrilaterals? Thank you very much for these amazing videos!
@wowLinh
@wowLinh Жыл бұрын
It's been a long time since I come back to seeing your videos... and oh boy do I regret it. You keep on amazing me. Impresive videos and very well explained. I learn a lot!!! About the specific question you make, I am quite happy to see shorter videos. I do not mind having a long topic being split into different videos.
@javidx9
@javidx9 Жыл бұрын
oof an original OLC! I think there's still a GitHub issue from yourself lol!
@allmycircuits8850
@allmycircuits8850 Жыл бұрын
Funny that there are still no standard remainder (modulo) function which would consistently return positive numbers at least if divider is positive. All we have is a % b = a - (a/b)*b which works "strange" for negative numbers and almost always needs some workaround! I remember trying some sine interpolation where first step was getting arbitrary argument into 0..2pi region. But of course formula like that from above could return anything in -2pi..2pi region! Standard division rounding toward zero is also not good when doing fixed point math as it make zero region "very special", double the width of others which lead to artifacts! And here once again it lead to problems with periodic bordering.
@whickervision742
@whickervision742 Жыл бұрын
Yup. It's no surprise textures use powers of 2 so that bitwise AND could be used. In this example of a 256 pixel width texture, (-1 & 255) = 255 ; (-10 & 255) = 246
@EximiusDux
@EximiusDux Жыл бұрын
Interesting video. Texture mapping explained in a simple and humane way.
@plueschAMAZONE
@plueschAMAZONE Жыл бұрын
Love to see you back in businnes!
@tgd2096
@tgd2096 Жыл бұрын
Great first video of 2023!
@tclards4349
@tclards4349 Жыл бұрын
Always love seeing an upload from you! Your channel has been one of my favorite places to spend my free time since I first started my CompSci bachelors degree. I always learn something!
@geehaf
@geehaf Жыл бұрын
Thank you for this - really good. Very happy with smaller time-frame but more frequent videos. Great work.
@teucay7374
@teucay7374 Жыл бұрын
Very interesting video, you never disappoint! So grateful that you are making these videos again! I hope you and your family are doing great.
@jakasnazwa123
@jakasnazwa123 Жыл бұрын
Very nice to see you again
@andrewdunbar828
@andrewdunbar828 Жыл бұрын
The quality are improving. The grammar are good.
@mr_noodler
@mr_noodler Жыл бұрын
I like how he is wearing an original 1991 Batman with Michael Keton t-shirt, the true mark of an original gangster
@RetroCoderTV
@RetroCoderTV Жыл бұрын
I'm happy to see you back and happy to have shorted videos if that fits in with your schedule better. But I would still like to see the stuff where you made complete programs such as the pixel racer game, Worms, etc, and lots of the other good stuff. We learned so much from you there when you run into small snags or challenges that need your math and/or coding skills .
@chasehamling1745
@chasehamling1745 Жыл бұрын
Thank you for making these.
@juliannicholls
@juliannicholls Жыл бұрын
I'd always prefer two videos of 30 minutes over one of 60 minutes, even if that means waiting a week for the next piece.
@SassyToll
@SassyToll Жыл бұрын
Thank Javid that is brilliant, looking forward to the rest of the series. Johnnyg63
@ciachn
@ciachn Жыл бұрын
Finally! I get to be one of the first to arrive early to see Javi's amazing videos. 😊🙂🙂🙂
@Aeduo
@Aeduo Жыл бұрын
I like when you do the transition from screen to talking to the camera, you leave in the time you look from the screen to the camera. It reminds me of something I would see on PBS or something.
@frankkubrick865
@frankkubrick865 Жыл бұрын
The legend returns!!! Always great to see a new video
@0__alfie__0
@0__alfie__0 Жыл бұрын
I have noticed in every video I have watched that you have made there is a Vimto can lol. Good video
@bytesandbikes
@bytesandbikes Жыл бұрын
Doing any videos with a new kid is pretty impressive! 😁
@maheshx2k
@maheshx2k Жыл бұрын
Please upload more regularly. You are great
@jsflood
@jsflood Жыл бұрын
Excellent video with very interesting topic. And nice to see that you have left the balls and started with cubes :P Thank you :)
@jsflood
@jsflood Жыл бұрын
@LET'S talk on Teleegram apk_@Javidx9_1 😂
@__hannibaal__
@__hannibaal__ Жыл бұрын
Ah. … . Here it is. How are you? I m programming from 1993, (mostly in computational calculus PDE and simbolique calculus with mathematica); You are the most one that gave very deep course about Graphic and deep Core C++. _thanks_
@davep7176
@davep7176 Жыл бұрын
great to see more vids.... hoping for more in due course
@mr_noodler
@mr_noodler Жыл бұрын
This guy is legendary, programming 100 in skyrim
@nextlifeonearth
@nextlifeonearth Жыл бұрын
Few things about the code: Don't use system time, unless you want system time. Use the steady clock instead. You can get weird behaviour if the time is updated while your application is running. A switch doesn't need semicolons. Rule of zero. Don't place a default destructor without the copy and move constructors and operators, unless you need to make it virtual, because it's an interface/abstract class.
@DFPercush
@DFPercush Жыл бұрын
Javid, I've got a burning question ever since watching Tsoding try to render 3d graphics in C... and that's how do you interpolate along the Z-axis in a perspective transformation? I know how to do a bilinear interpolation on the two sides of a triangle, and I know any triangle will remain a triangle with straight edges, but you've still got the perspective where closer texels will appear bigger than far ones. I hope that will be a part of this series.
@javidx9
@javidx9 Жыл бұрын
Covered exactly this in Part4 of my CIY 3D engine series.
@DFPercush
@DFPercush Жыл бұрын
@@javidx9 Awesome, thanks! It's all in the W, of course. W is underrated.
@BelovMr
@BelovMr Жыл бұрын
Each video like a little present
@Will-vj5bc
@Will-vj5bc Жыл бұрын
I see a new JavidX video, I click. Nice to have to back.
@alierenesen2422
@alierenesen2422 Жыл бұрын
such great content! lots of love from Türkiye.
@GNARGNARHEAD
@GNARGNARHEAD Жыл бұрын
nice one, hey the demo is a great touch 👍
@Mel-mu8ox
@Mel-mu8ox Жыл бұрын
as a learner small vids that explain one or two concepts are easy to understand gives me time to digest the information during breaks and let it soak in Longervids I find myself watching 4 - 6 times, might be great for the algorithm, but not for learning :( I'm glad the vids are shorter, can watch one all way through then quiz myself. since the stop gap is already there for me I don't end up pausing or time stamping the vid, only to go bk to it realising I've stopped it to early and missed a crucial point second way on long vis can be frustrating :(
@tomkirbygreen
@tomkirbygreen Жыл бұрын
Can it be? Whoopieeee! To the coding cave!
@arsebiscuitsandwine
@arsebiscuitsandwine Жыл бұрын
Shorter/small series works well for me for exactly the same reasons! Between work and the kids I've got about one short video of time as a viewer too 😅
@setharnold9764
@setharnold9764 Жыл бұрын
Make whatever length videos are fun to make on whatever schedule is fun. I don't know how you find time to make these in the first place.
@londonbobby
@londonbobby Жыл бұрын
Very happy with the shorter video lengths. Does this mean we won't be seeing the end of Space Thing or the completion of the hurdy-gurdy build?
@ui6144
@ui6144 Жыл бұрын
Batman is back!
@postlinux
@postlinux Жыл бұрын
Thnx to comr back
@allocator7520
@allocator7520 Жыл бұрын
Lets goooooooooooooooooo
@Nunya58294
@Nunya58294 Жыл бұрын
I was mid-sentence when I seen this video and was like "HOLY SHIT!" haha
@Gameplayer55055
@Gameplayer55055 Жыл бұрын
26:34 is it the reason why Minecraft TNT has mirrored label ТИТ from the north side?
@gower1973
@gower1973 Жыл бұрын
Isn’t your y axis flipped though, the 0,0 point for UV’s by convention is bottom left not top left, although I guess you can use any arbitrary coordinates system if it’s consistent.
@ratchet1freak
@ratchet1freak Жыл бұрын
a better periodic computation is x = x
@thebasicmaterialsproject1892
@thebasicmaterialsproject1892 Жыл бұрын
i rememebr when you had to accesse the graphics memory directly !
@javidx9
@javidx9 Жыл бұрын
Yeah... Not like that anymore lol
@gianfrancobruschetta2423
@gianfrancobruschetta2423 Жыл бұрын
Better short and more often if possible 😁
@gsestream
@gsestream Жыл бұрын
as the game engine is very sprite and texture heavy, try 3d sphere map object sprites, yes, very complex objects reduced to pre-rendered angle dependent sphere maps, that are very much easier to render than the triangle meshes that make up the object. only a somewhat more complex than normal sprite pre-renders from multiple angles, 2d and 3d, maybe affine transforms can be applied into 3d sphere map versions of the sprites too.
@gsestream
@gsestream 11 ай бұрын
try surface bump maps (ie sphere/cube equilateral rectangle depth maps, with texture and depth/alpha map), instead of triangles or voxels, more compressed data friendly and smaller storage, only image regular spaced png/jpg compressible data with gray scale depth data, stored in image buffers and files, bump maps on regular shapes, sphere/cube, make a more dense defined objects data
@dbl777
@dbl777 Жыл бұрын
Wow! This is exactly the knowledge I need, please, can you do a subtitle. if possible. It will be very international friendly. Because I want to understand every word you say.
@Nikkes02
@Nikkes02 Жыл бұрын
It's Batman! 😲
@keyboardcrash38
@keyboardcrash38 Жыл бұрын
Ayy I have such a great day today, your video is fantastic!
@nandukrishna8142
@nandukrishna8142 Жыл бұрын
Hey can you please help me with a video, ray tracing with optimization techniques?
@zxuiji
@zxuiji Жыл бұрын
4:35, says X then Y, does Y then X, if I didn't know any better I'd say javid was trying to confuse his viewers XD
@EximiusDux
@EximiusDux Жыл бұрын
That depends on how you think about it. X is how much he went to the right, and Y is how much he went up.
@zxuiji
@zxuiji Жыл бұрын
@@EximiusDux I was referring to the lines he drew, those are the axis
@EximiusDux
@EximiusDux Жыл бұрын
​@@zxuiji Ill try to explain. X is the width, Y is the height. He looks at the left side as the 0 point, the start of the axis. Placing something on the Y axis means moving up. he moved upwards from the left. Placing something on the X axis means moving to the right, he moved from left to right. It can be confusing when not paying attention, but it makes sense once it hits your mind.
@zxuiji
@zxuiji Жыл бұрын
@@EximiusDux And YOU are clearly not getting the point, he said AXIS, not dimensions which you just referred to
@EximiusDux
@EximiusDux Жыл бұрын
@@zxuiji How do you draw a line to the dot its X position on the axis, how do you draw a line to the dot its Y position on the axis ? Think about it.
@xriuk
@xriuk Жыл бұрын
Personally I'm not a huge fan of long videos, of course yours are entertaining but it's pretty hard getting a half an hour or even a whole hour of time to watch a single video at least for me. I'd love a series of smaller videos like 10/15 minutes long.
@wxwf934
@wxwf934 Жыл бұрын
😃
@thebasicmaterialsproject1892
@thebasicmaterialsproject1892 Жыл бұрын
before direct x heck even before windows 95 cornered the graphics memory
@LaZZeYT
@LaZZeYT Жыл бұрын
Did you intend to put this unlisted video inside the "Interesting Programming" playlist?
@javidx9
@javidx9 Жыл бұрын
Lol yes, I do this each time but you're the first to notice 🤣
@Seppelicius
@Seppelicius Жыл бұрын
wb
@Jkauppa
@Jkauppa Жыл бұрын
projected textures (or directional sampling), nice
@Jkauppa
@Jkauppa Жыл бұрын
or just use full/extra super high resolution megatextures
@Jkauppa
@Jkauppa Жыл бұрын
or just texture LODs for different sampling distances, to get full pixel resolution always
@Jkauppa
@Jkauppa Жыл бұрын
over-resolution to satisfy everything accurately is always better
@Jkauppa
@Jkauppa Жыл бұрын
wow this is very basic level L1 tech
@Jkauppa
@Jkauppa Жыл бұрын
no offense indended
@bob-zb3ed
@bob-zb3ed Жыл бұрын
Day 2, of asking javid to make a video about meatballs and isosurfaces.
@javidx9
@javidx9 Жыл бұрын
Meatballs? I did a cooking video on second channel a while back.
@bob-zb3ed
@bob-zb3ed Жыл бұрын
@@javidx9 I meant, metaballs.....................................................sorry
@marsovac
@marsovac Жыл бұрын
manipulating textures and pixels on the CPU side does not seem very clever. It will be a serious performance bottleneck for the engine.
@javidx9
@javidx9 Жыл бұрын
Yes...
@michipeka9973
@michipeka9973 Жыл бұрын
Although It's interesting to understand or remind how this process is actually working.
@muhammadhasnain6327
@muhammadhasnain6327 Жыл бұрын
Hello javidx nice to meet you i like your programming style if you READ my comment i am very immense fan of you as a developer you are such a nice person i want to know about how i approach you both online platfoam can you share me your active platfoam ???? 👤 please. Share i am your fan
@javidx9
@javidx9 Жыл бұрын
Hi Muhammad, thanks for your kind words. The easiest way to join in the chaos is on the Discord server, myself and others are very active there. Click the link in the video description.
@muhammadhasnain6327
@muhammadhasnain6327 Жыл бұрын
@@javidx9 thanks javidx .
@whickervision742
@whickervision742 Жыл бұрын
The % operator misbehaving is a never-corrected mistake of the C language. I've never seen going negative have a practical use. Whereas wrapping queue indexes, wrapping back from 0 minutes to 59 on a clock, or rotation angle wrapping from 0 degrees to 359 degrees expects the positive wrap. An often-used solution for speed is to use powers of 2, using the bitwise AND operation. It would work here in the texture world, because we can take the (texture coord & 255). But there is no shame of detecting a negative result and then adding the wrap value for non powers of 2.
@stasdev
@stasdev Жыл бұрын
auto-like, period.
@bravefastrabbit770
@bravefastrabbit770 Жыл бұрын
The 3 dislikes are simply misclicks by people who actually wanted to share the video.
@BrendonHolden
@BrendonHolden Жыл бұрын
RUN://_LOAD://Pixel-001/OPEN://Pixel-001 The pixel is in the milliseconds, which was an entire screen of work that was Saved as Pixels-001. Instead of the preprogrammed pixels to create an image he can use a new type of pixel…. Neat, Thanks for the video, - Brendon
@ClaytonMalarkey
@ClaytonMalarkey Жыл бұрын
#epicviralcontent @mmobyte
@RealNekoGamer
@RealNekoGamer Жыл бұрын
Very interesting topic to touch on, and congratulations on the kid! You'll be a great dad!
@lozD83
@lozD83 Жыл бұрын
wb
Texture Sampling #2: Bilinear & Bicubic Samples
29:49
javidx9
Рет қаралды 24 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 23 МЛН
طردت النملة من المنزل😡 ماذا فعل؟🥲
00:25
Cool Tool SHORTS Arabic
Рет қаралды 24 МЛН
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
Мы сделали гигантские сухарики!  #большаяеда
00:44
olc::AllSorts - Text/Commands/Sounds/Jams
21:55
javidx9
Рет қаралды 32 М.
Brute Force Processing
52:50
javidx9
Рет қаралды 156 М.
Coding Quickie: Handling Periodic Numbers with C++ Templates
17:13
I Made the WEIRDEST ASCII Renderer...ever.
8:02
Yusef28
Рет қаралды 7 М.
Dithering with Floyd-Steinberg in C++
26:53
javidx9
Рет қаралды 55 М.
How To Write Fast Shaders
10:33
Jump Trajectory
Рет қаралды 19 М.
Texture - The Magic Ingredient For Music Production
14:14
Weiss Advice
Рет қаралды 17 М.
Counter Strike's setting that nobody understands
8:07
3kliksphilip
Рет қаралды 314 М.
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 23 МЛН