Marcus Mathiassen
Marcus Mathiassen
  • Видео 11
  • Просмотров 187 246
particle test
particle test
Просмотров: 465

Видео

Hello Triangle OpenGL 4.1
Просмотров 2,6 тыс.6 лет назад
Using GLEW and GLFW
Hello Triangle OpenGL 2.1
Просмотров 1,3 тыс.6 лет назад
Using GLEW and GLFW
P2Dv06 QUADTREE 25082016
Просмотров 3727 лет назад
github.com/MarcusMathiassen/P2D
Quadtree vs Spatial partitioning
Просмотров 15 тыс.8 лет назад
source code github.com/MarcusMathiassen/P2D
Spatial partitioning 2D collisions
Просмотров 5 тыс.8 лет назад
source code github.com/MarcusMathiassen/P2D
Basic raytracer in 30min C++
Просмотров 82 тыс.8 лет назад
Basic raytracer in 30min C
C++ Make an image
Просмотров 78 тыс.8 лет назад
C Make an image

Комментарии

  • @raulguerreroflores1460
    @raulguerreroflores1460 Месяц назад

    apple sucks !!!

  • @jesuslovespee
    @jesuslovespee 4 месяца назад

    Yo! Thx for github.

  • @lanchanoinguyen2914
    @lanchanoinguyen2914 Год назад

    Real time ray tracing is what we want,ray tracing is simple.

  • @qr2693
    @qr2693 Год назад

    Idk why this is in my Rex but I like it

  • @vadiks20032
    @vadiks20032 Год назад

    i thought i'd understand visually how it works but i guess i was wrong

    • @vadiks20032
      @vadiks20032 Год назад

      okay i see it. when theres a lot of items on the screen and theres only 4 partitions, its lagging and slow. once you add a lot more of these, stuff gets quicker

  • @CookedChicken1
    @CookedChicken1 Год назад

    Hmm why my .ppm file does not exist anywhere, please help

  • @oussamamoussaoui7131
    @oussamamoussaoui7131 2 года назад

    One thing I didn't understand which is why you made the direction vector of every ray constant (0,0,1), I think it must be calculated as the direction from the camera towards the pixel. I'm I right or wrong?

    • @MarcusMathiassen
      @MarcusMathiassen 2 года назад

      You’re right. I think I made some type of faux orthographic raytracer but honestly I don’t remember.

    • @oussamamoussaoui7131
      @oussamamoussaoui7131 2 года назад

      @@MarcusMathiassen okay, thanks!

  • @davidjandula4161
    @davidjandula4161 2 года назад

    which sublime text theme is that?

  • @rj-roblox7626
    @rj-roblox7626 2 года назад

    RTX ON

  • @Lvjy
    @Lvjy 2 года назад

    If I wanted to create a for with a different image each a time how could I do that?

  • @sruthisrinivasan3622
    @sruthisrinivasan3622 2 года назад

    I ran the code in visual studio code and a ppm file "out.ppm" got generated. But it has nothing in it. It shows 0 bytes. Could you please tell what might be the error?

  • @Thinzy
    @Thinzy 2 года назад

    this is awesome

  • @raianmr2843
    @raianmr2843 2 года назад

    For all the Windows people, if you want to open the file with your default viewer like him, the command is "explorer picture.ppm". That is, you should be writing system("explorer picture.ppm") instead of system("open picture.ppm")

  • @psychoinferno4227
    @psychoinferno4227 2 года назад

    The R, G, and B components are usually in the range of 0 - 255 inclusive, so you should mod by 256, not 255.

  • @simracing8055
    @simracing8055 3 года назад

    This is very impressive. If you could make a video explaining line by line, that would be awseom

  • @thesila2000
    @thesila2000 3 года назад

    wait so we dont need images?

  • @destructorextreme707
    @destructorextreme707 3 года назад

    It's out of focus can't read it.

  • @chriss4154
    @chriss4154 3 года назад

    Thank you very much. Modified it slightly to print custom barcodes from 1s and 0s to a pbm file. Github is: Chrissavi :D

  • @yosefaregahegn1682
    @yosefaregahegn1682 3 года назад

    The process cannot access the file because it is being used by another process. in visual studio 2019

  • @yosefaregahegn1682
    @yosefaregahegn1682 3 года назад

    This is exactly what I was looking for! Thank you very much!

  • @justinjiang1052
    @justinjiang1052 3 года назад

    This content is gold!!!

  • @h_it
    @h_it 3 года назад

    О, спасибо (thank you)

  • @jpalacios117
    @jpalacios117 3 года назад

    "Lemme just feed this object into this shit ton of linear algebra"

    • @particlecat3142
      @particlecat3142 3 года назад

      Pretty much describes most low level graphics programming.

  • @user-kc2eb1ib7e
    @user-kc2eb1ib7e 4 года назад

    How located coordinate axises? X-axis to viewer, Y-axis - right, Z-axis - up?

  • @MazeFrame
    @MazeFrame 4 года назад

    Exactly what I wanted, huge thanks!

  • @techsb5995
    @techsb5995 4 года назад

    if you do this code also show similar thing what is this man code: #include<iostream> using namespace std; int main() { system("1.png"); }

  • @PauloDutra
    @PauloDutra 4 года назад

    Shouldn't the ray origin be 0,0,0 and ray direction x,y,1 ?

    • @MarcusMathiassen
      @MarcusMathiassen 4 года назад

      I think this is more of an orthographic raytracer, so you can use your own "camera" if you'd like. Though there really are better videos than this. Use it more as a guide than anything.

  • @wannurdalila3338
    @wannurdalila3338 4 года назад

    how do you get to the bash?

  • @forloop7713
    @forloop7713 4 года назад

    You should do an ideal gas simulation

  • @epicbule1979
    @epicbule1979 4 года назад

    Which compiler are you using?

  • @iamsofuckingmad
    @iamsofuckingmad 4 года назад

    #include <fstream> using namespace std; const int width = 255, height = 255; int main () { ofstream img ("image.png"); img << "P3" << endl; img << width << " " << height << endl; img << "255" << endl; for (int y = 0; y < height; y++){ for (int x = 0; x < width; x++){ int r = x % 255; int g = y % 255; int b = y * x % 255; img << r << " " << g << " " << b << endl; } } system("open image.png"); return 0; }

  • @nabelwangwe2192
    @nabelwangwe2192 4 года назад

    Hey Marcus, i followed through the video but when i run it, it generates an O file which cant be opened on Win 10. I did it on Code::Blocks. Please help.

    • @MarcusMathiassen
      @MarcusMathiassen 4 года назад

      Nabel Wangwe .o file? As in Object file? Pass it to «cl» to generate an .exe

  • @darthvader8469
    @darthvader8469 4 года назад

    Eres ua bestia amigo :3 Wou justo yo buscando cosas sobre Ryatracong y tu pones este video. Perdon si no hablo ingles xd

  • @zuxel6
    @zuxel6 4 года назад

    Is quadtree faster? Did I understand correctly?

    • @MarcusMathiassen
      @MarcusMathiassen 4 года назад

      Here, yes, but I remember being sceptical of the performance difference.

    • @TheLeontheking
      @TheLeontheking 3 года назад

      I guess it depends on how uniform your distribution of objects is.. If you end up having very many objects, densely together, then trees will bring you more benefits than a uniform grid.. On the other hand, a hierarchical grid may also bring you some of the benefits :)

    • @olivieero123456789
      @olivieero123456789 3 года назад

      @@TheLeontheking Isn't a quadtree a hierarchical form of partitioning?

    • @martingrof1685
      @martingrof1685 3 года назад

      @@olivieero123456789 Yes. What they probably mean by hierarchical grid is either or both of two things. Multiple resolution grids for different object sizes, and multiple bit arrays at lower resolutions to represent something like a quad tree without an actual hierarchy.

  • @nintendoblood4835
    @nintendoblood4835 4 года назад

    In case anyone is confused, he is using pure C++ with fstream library (file stream - useful for creating and working with files of all types) to create a .ppm (portable pixel map / a very inefficient and uncompressed image filetype) file containing information of a sort of "snapshot" created using ray tracing techniques. The console is not a renderer, so when you compile this code do not expect to print the image. The code compiles and generates the .ppm file from source, which you can view with something like gimp or photoshop or fileviewer or most text editors.

    • @domsau2
      @domsau2 3 года назад

      PPM is a very simple and easy ASCII format. I love it!

    • @yugiohonline26
      @yugiohonline26 3 года назад

      How would you print out the file in Windows?

    • @nintendoblood4835
      @nintendoblood4835 3 года назад

      @@yugiohonline26 What do you mean by print out?

    • @nintendoblood4835
      @nintendoblood4835 3 года назад

      @@yugiohonline26 Imagine this file type as a huge 2d array of color values. This code is programmatically generating the ppm file with a raytracing algorithim. If you want to view the file, open it with some software that can view ppm files.

    • @yugiohonline26
      @yugiohonline26 3 года назад

      @@nintendoblood4835 Ok when I run g++ test.out or a.out it doesn't create a ppm file at all. Could it be because I'm on Windows?

  • @liondemare2918
    @liondemare2918 4 года назад

    *_Please Source Code_*

  • @liondemare2918
    @liondemare2918 4 года назад

    *_Please Source Code_*

  • @liondemare2918
    @liondemare2918 4 года назад

    *_Please Source Code_*

  • @liondemare2918
    @liondemare2918 4 года назад

    *_Please Source Code_*

  • @TheFozze
    @TheFozze 4 года назад

    How would you go about making a bounding box? i cant figure it out for the life of me and all the other "tutorials" ive seen use much more complex and messier code making it hard for someone whos new to the whole raytracing thing to follow along and actually understand whats going on.

  • @MarcusMathiassen
    @MarcusMathiassen 4 года назад

    Remove the «system» call. It has nothing to do with creating the image and should have been left out. Save yourself the compiler error and remove it.

    • @arashshiri5256
      @arashshiri5256 3 года назад

      Wonderful, it helped me a lot. But how to remove system call? What should be replaced?

    • @MarcusMathiassen
      @MarcusMathiassen 3 года назад

      @@arashshiri5256 replace «system» by nothing and open the output file manually

    • @Eshanthakshan
      @Eshanthakshan 3 года назад

      I use system but declaration error accures .How out of the error?

  • @adamhostetler7873
    @adamhostetler7873 4 года назад

    it says system is undefined and it wont work

    • @MarcusMathiassen
      @MarcusMathiassen 4 года назад

      Adam Hostetler Just remove the line. Check my answer in other comments for details.

    • @adamhostetler7873
      @adamhostetler7873 4 года назад

      Marcus Mathiassen If i remove system(“open picture.ppm”) nothing happens.

  • @younghsiang2509
    @younghsiang2509 4 года назад

    This looks so good! Thanks for the tutorial...

  • @rawwars
    @rawwars 4 года назад

    if you dont comment whats the difference from simply read the completed code?

  • @existentialchild698
    @existentialchild698 4 года назад

    i *literally copied the code* and it didn't work....... **confused screaming**

  • @sohilsarode6300
    @sohilsarode6300 4 года назад

    Can it be used as background so that we can print statements on it

  • @sk-ov2pq
    @sk-ov2pq 4 года назад

    When calculating the discriminant, isn't the formula (-b +- sqrt(b^2 - 4ac))/2? If so, why do you not divide by two in Sphere::intersect?

    • @inlandish
      @inlandish 4 года назад

      Oh he just remembered a little bit of stuff from others videos and made a "tutorial" out of it, the dude does not actually understand what he is typing

  • @kaitsurugi3280
    @kaitsurugi3280 4 года назад

    Next time put some bg music! Overall nice vid.

    • @MarcusMathiassen
      @MarcusMathiassen 4 года назад

      Kai Tsurugi it’s a BYOBG video. I’ll do voiceover on whatevers next

  • @domsau2
    @domsau2 4 года назад

    With vector, you can make more complex images, with fun and calculations.

  • @svens3722
    @svens3722 4 года назад

    how much particle? why u use textfile as console? great work.

    • @MarcusMathiassen
      @MarcusMathiassen 4 года назад

      Particle count is the 'OBJ' counter in the window title. And that is the macOS Terminal, though i see how it might look like 'TextEdit'.

    • @svens3722
      @svens3722 4 года назад

      @@MarcusMathiassen argh lol ok sorry. iam noob.