Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


george7378

Member Since 24 Jan 2013
Offline Last Active Yesterday, 04:21 AM

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...");
doTask1();
SetDlgItemText(hwnd, IDC_STATUS, "Starting task 2...");
doTask2();
SetDlgItemText(hwnd, IDC_STATUS, "Tasks complete!");
}
 
//When the button is pressed:
{
thread t_button(on_press, hwnd);
t_button.detach();
}

 

...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:

 

https://sourceforge.net/projects/gktrace/

 

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   0 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.


PARTNERS