Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 24 Jan 2013
Offline Last Active Jun 13 2015 04:34 PM

Posts I've Made

In Topic: Generating random rays within a cone

18 May 2015 - 09:14 AM

IsItSharp: Yes, that's it :)


l0calh05t/Alvaro: The way I'm doing it is that I have changed my uniform sphere distribution for diffuse reflection (which I sort of stole from SmallPT in the "if(obj.refl == DIFF)" section) and I modified it so that it only chooses results between the angles I want. It's not rejection sampling, so I think it's working properly :)

In Topic: SetDlgItemText in a loop or function

18 May 2015 - 09:07 AM

Thanks for the replies everyone. I got it to work using threads as follows:


void on_press(HWND hwnd)
SetDlgItemText(hwnd, IDC_STATUS, "Starting task 1...");
SetDlgItemText(hwnd, IDC_STATUS, "Starting task 2...");
SetDlgItemText(hwnd, IDC_STATUS, "Tasks complete!");
//When the button is pressed:
thread t_button(on_press, hwnd);


...and it works as I was expecting :)


ankhd: I am using a dialog box created using the WIn32 DIalogBox() function which means that it creates its own message loop and as far as I'm aware it doesn't respond to WM_PAINT messages.


SmkViper: That's a good point about the controls, I will see what I can do! Thanks.

In Topic: Generating random rays within a cone

13 May 2015 - 06:34 AM

No problem. The full source is available from here:




in the 'files' section :)

In Topic: Generating random rays within a cone

13 May 2015 - 01:04 AM

Thanks for the feedback! The walls are infinite planes which are arranged perpendicular to eachother. Some tracers create walls using the edges of very large spheres but I feel better doing it with planes! Cool, do you have any demo pics yet?

In Topic: Generating random rays within a cone

11 May 2015 - 10:17 AM

Thanks for the help again smile.png I actually made a reference image using Blender's path tracer and got this:


Attached File  reference.png   458.08KB   4 downloads


Slightly different in colouring (and the spheres are made of triangles) but the reflections, refractions and caustics look on point smile.png I should have thought to do this before.