karansher / computer-graphics-ray-casting

Computer Graphics Assignment about Ray Casting
1 stars 0 forks source link

bunny takes forever... #6

Open sonnyffff opened 1 year ago

sonnyffff commented 1 year ago

I am trying to run the program with bunny.json as input, however I kind of encountered infinite loop. Other pictures worked fine though.

MurraySmith27 commented 1 year ago

My bunny took around 15 minutes to render. If you think about it it's a lot of processing. 1000 triangles * 230400 pixels, each one solving a 3 x 3 system of equations to find t, alpha and beta. If you want to test quickly try turning the resolution down in main.cpp.

I am also kinda concerned about this though and would love to hear from a TA. Is there a timeout on the testing machines? Can we expect the correct solution to take this long?

alekao commented 1 year ago

Mine also took a long time to render at first (around 5 min). After enabling compiler optimization it was basically instant. Instructions are at the end of README.

sonnyffff commented 1 year ago

My bunny took around 15 minutes to render. If you think about it it's a lot of processing. 1000 triangles * 230400 pixels, each one solving a 3 x 3 system of equations to find t, alpha and beta. If you want to test quickly try turning the resolution down in main.cpp.

I am also kinda concerned about this though and would love to hear from a TA. Is there a timeout on the testing machines? Can we expect the correct solution to take this long?

Thanks for the help, I changed height and width to 1/10 of the original and it took only about 30 seconds to render. Though the pictures are a bit small, they are enough to check the correctness.

shahmeerathar commented 1 year ago

Try compiling with optimization level -O3; significantly sped it up for me :)

henrytwo commented 1 year ago

Are we allowed to modify the script to use multithreading? After making this change locally, I'm able to render the full image in 5 seconds (fanless M1 Macbook Air btw)

henrytwo commented 1 year ago

I suppose we aren't going to be uploading main.cpp anyways, so it shouldn't really matter

cherylchen2 commented 1 year ago

Mine took 150 mins :') image