90

I literally spent 3h looking at all the freaking formulas in my pathtracer which was producing the wierdest psychedelic images for no reasons... And then I finally found this... And I want to kill myself...

Comments
  • 19
    I wanna see the fucked-up ones!
  • 7
  • 6
    upload a picture! :D
  • 4
    Come on OP, please deliver.
  • 11
    The functions do nothing with the position vectors passed as arguments but instead returns things which appears to be globals.kill me already
  • 0
  • 3
    @anekix also the exchanged lines were just edited...
  • 1
    really makes you appareciate metaprogramming (ex in ruby)

    attr_accessor :field_name , :field_name_2

    and it writes the getters/setters for you.
  • 1
    Op overexaggerated, so no pics for you.
  • 1
    that really made my week
  • 1
    Wow, did not expect so much reaction, but that's awesome (I don't feel so much alone anymore haha)!
  • 0
    So first, it's not a global, it's simply the default material in the base Shape class. Nothing fancy because I am just checking how fast and how complicated it is to write a pathtracer from scratch (just the algorithms, no optimizations), before I introduce that with HS students as a project to apply highschool algebra, physics & CS.
  • 1
    Also, sorry no I did not keep the crazy pictures, I was too upset haha. But basically it looked like laws of physics went nuts in terms of energy transfer (for some reasons especially in reflexions... wtf...). Add to this that at that time I did not clamp/gamma remap values in the output PNGs (because, you know, speed programming... And it wasn't supposed to go nuts anyway) and you get those "rainbow" patterns on top of the shapes in the scene.
  • 2
    I already corrected the error in the code but then reverted the correction to make the screenshot (I guess this is where the green highlight comes from in VS) because I'll include that in the presentation for the project. What a perfect real life educational example for the students, to tell them: yes, the guy in front of them, all teacher he is, makes cow dumb stupid mistakes too, so they don't need to worry haha
  • 0
    @DrPenguin genius .No one noticed that🤡😂
  • 3
    @DrPenguin @anekix No, that's actually not a genius reflection at all... :-)
    VS highlights *everything* you've added/changed since you ever opened the doc in the current session, not caring about compiles, etc.
    But I still replied anyway to explain the green highlight for full disclosure haha
  • 1
    @xanathor ohh I didn't know that😅
  • 0
    @xanathor share the screenshot with us, we are all intrigued :)
Add Comment