« first day (577 days earlier)      last day (4372 days later) » 

5:00 AM
@SethCarnegie it'd help me if i saw your code
 
The code in this project is very huge and it would be hard to seperate the GUI part
 
@SethCarnegie thats why i asked if you had teamviewer , i could meeting in and you could show me what youv'e got pertaining to painting
 
teamviewer is easy fast and free. and it's webscale
 
and secure
 
@johnathon is it webscale
 
5:03 AM
The wparam is weirdly 0 in the child's WM_PAINT even though I am passing the buffer to defwindowproc as the wparam
 
@SethCarnegie show me your create statement for your child window
 
I'll show you mine if you show me yours
 
handle = CreateWindowEx(NULL, TEXT("child_class"), TEXT("button"), WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 50, 50, 50, 50, parent_handle, NULL, GetModuleHandle(NULL), NULL);
 
ok yea, i really need to see your code
how many child windows does your main window have?
and btw, that first paramater
 
@SethCarnegie dude just teamviewer him in it'll be oever in like 2 seconds
 
5:06 AM
of createwindow ex
i do belive is the Window styels, and the 4th is the Ex styles
i may have that backwards
i do
 
yeah, first one is extended styles
 
how is your child class defined/
 
So is this right?
DefWindowProc(sender, msg, (WPARAM)backbuffer, lParam);
sec I'll get the child class
wndclass.cbSize = sizeof(WNDCLASSEX);
wndclass.style = CS_DBLCLKS;
wndclass.lpfnWndProc = ChildWndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = GetModuleHandle(NULL);
wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = TEXT("child_class");
wndclass.hIconSm = NULL;
 
ok , your class style should be CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS
thats part of your problem with your child windows not repainting
 
Aren't those two extra just for resizing?
yeah, I added them and it didn't do anything
 
5:12 AM
teamviewer
theres a few microcosims thats going on
in your code
and i need to see what all flaggs you have set and where, and trace this down with you
 
I don't think the company I work for would let me do teamviewer though
 
how quick do you think you could mock up a simple 2 window example thats like the code you have minus the mouse capturing to draw a line bs ?
 
I have a question about OpenGL ray tracing
its a general question
 
and THATS what we'll work on getting right
and then you can take what you learn there and apply it to your company's code
 
@johnathon I'll get working on it and then let you know, I don't think it will take long
 
5:14 AM
@ladiesMan217 fire away
 
@SethCarnegie right on, do you have a instant messaging system?
 
@johnathon naught but this chat room
@johnathon I'm gonna leave the line drawing in because it's an important part of it
without it we can't see if it's working
 
@SethCarnegie ok
 
I have a problem where I need to determine expressions that represent the number of ray-primitive intersections that need to be determined under various assumptions about how the ray tracing is performed. In each case, we assume that we are creating an n-by-n image of a scene involving N triangles. The expression should represent the worst case numbers
(a) One viewing ray per pixel, ambient light only.
(b) One viewing ray per pixel, shadow rays for each of N_L point
light sources
I got the first one
Since we dont know the size of the N triangles, we dont know whether they are 1 pixel sized or multiple pixel sized
in which case I just write that we need to shoot n^2 rays...which means, one ray for each pixel
but for the life of me, I cannot seem to think how to represent part (b) expression
 
N_L being number of lightsources?
 
5:19 AM
yes
Actually POINT LIGHT sources
 
@ladiesMan217 when you find the triangle that intersects with the ray for that pixel, you need to calculate a lighting value - to do this, there are a number of methods. the simplest does a ray-trace from that point to each light source.
 
actually I am not trying to find that
I am only asked to find the "possible number of ray-primitive intersections in the worst case scenario"
 
think it through. what I described is exactly what you're trying to do
what is the worst case for (a)?
 
I may be wrong but I think its n^2
1 triangle in each pixel
 
multiply that by N_L + 1
erm, or multiply it by the worst case for each N_L cast
I'm tired, do you get the idea?
 
5:25 AM
hmm I see...but why the "+1"
yes sort of
sorry to bother...
but your answer seems legit
 
because if you do (x * N_L) you only have the number of N_L
wait, nevermind the +1
that's what I get for being tired
 
@stdOrgnlDave lol
 
the double-buffering is flickering in that example (lol) but not in my code, but I think it might be obvious to you why so I will just give you what I have and work on it some more on my own too
 
@johnathon Can you help me further?
 
:-(
@ladiesMan217 doesn't like me
 
5:29 AM
@ladiesMan217 you mean std''OrignlDave?
 
@johnathon I didn't make any modifications that you suggested, I just did it based on what I had before
 
oh sorry @stdOrgnlDave I thought you were going to bed :(
 
so you could see where I was basically
 
I definitely need your help thenn
 
@SethCarnegie forgive me, but isent the child supposted to be a layeredwindow?
 
5:31 AM
Is it? I don't know
you mentioned that the extended styles didn't matter so
 
@SethCarnegie how is your child transparnat?
 
@johnathon it's not
 
@stdOrgnlDave This is the last one. (c) One viewing ray per pixel, shadow rays as above, reflection and refraction rays to a maximum tree depth of d.
 
@SethCarnegie ok. that claifies a lot
 
@johnathon but I'm trying to get it to be
so that you can see the line behind it
 
5:32 AM
@SethCarnegie that requires layered windows
 
Also adding the WS_EX_LAYERED extended style to the child makes it disappear immediately when the parent repaints
 
@ladiesMan217 for (b), imagine that the ray you send out hits a surface, then at that point you know what that pixel is 'looking' at, but you don't know how well lit it is. so now you have to discover what that point - a 1x1 buffer - can see in terms of light sources; you have to do N_L casts from that point to get to the light source
@ladiesMan217 when we do this we get a sort of a "tree" - one "ray" splits into N_L "rays"
 
@SethCarnegie it shouldent dissapear immideatly at all, sighs why are you trying to paint under your child window
?
 
I see...like anti aliasing?
 
@johnathon so I can see what's behind it when the child paints with a non-opaque color
Also returning 0 in the WM_ERASEBKND message for the parent window solves the flickering btw
 
5:35 AM
@SethCarnegie then the child definatly needs to be a layered window, and im looking up right now as we speak if a child can be a layered window
 
@johnathon that's the problem I mentioned before, when the parent repaints, the children don't
 
@johnathon only in windows 8 i believe
 
@stdOrgnlDave So it is n^2 * N_L
 
@ladiesMan217 however,each ray that is traced - be it the one from the pixel, and then the N_L rays from there, can hit a reflected or diffracted surface. each time it does, that ray registers another hit
@ladiesMan217 correct
 
@johnathon here's the slightly modded version pastebin.com/TwYmujZw for removal of flicker
 
5:37 AM
when it hits a simple mirrored surface, you just use the surface normal to "bounce" the ray
 
now all that needs to happen is the line to be visible through the child window
when the line is drawn behind it
 
at each reflection source, you need to cast N_L more rays, unfortunately
 
is this the part (c)?
 
okay I got lost on that..
 
5:39 AM
@johnathon not that this helps, but I was thinking that you'd need to just iterate the child windows and send them a WM_PRINTCLIENT with the backbuffer so they paint into it after the parent has painted
 
Can we try this again...
 
@SethCarnegie forive me, but this code creats two distinct windows does it not, not one window includinded as a child of another. Also, you'd probably be better of using regions than a seperate window do do what you want to do
 
so let's imagine you have a pixel. you cast out a ray and it hits a surface
now we need the lighting value for that surface, so we cast "at" the first lightsource to see if we are occluded
 
So if we launch R_reflec and R_refrac to a depth of d
 
@SethCarnegie whats your target platforms?
 
5:39 AM
@johnathon doesn't the WS_CHILD style make it one window included as the child of the other?
Windows I guess, not sure what else it would be
 
then how would those play into equation?
 
however, this lighting ray hits a reflection source. you then need to cast N_L additional rays - one to each light source
 
@SethCarnegie no, the hwd of the parent window has to be passed into the create call of the child
 
@johnathon OOPS
I'll fix it
 
it ends up being (N*N) * (N_L ^ d)
 
5:40 AM
@johnathon that's a problem in the example though, my company's code is correct
that's my mistake
 
N_L being the point light source
 
@johnathon oh wait, no it's not a mistake, I have passed the handle to the parent to the CreateWindowEx call
so it's correct isn't it
HWND text = CreateWindowEx(NULL, "transparent_window", "", WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD, 50, 150, 100, 50, wnd, NULL,  hinst, NULL);
 
so we cast (N_L * d) rays for each pixel of interssection
 
the wnd is the parent's handle
 
5:42 AM
oh sorry
thats
 
@SethCarnegie yea, im tired, lemme compile this
 
N_L^d
 
in worst case, yes
 
Downloading things at 2.5MB/s makes my laptop freeze. Stupid piece of crap.
 
however, it gets a little more complicated
@CatPlusPlus check if you are in PIO mode
 
5:42 AM
@SethCarnegie what compiler are you using ?
 
Oh I see..
 
@ladiesMan217 so far we have only taken into account if a ray hits a solid triangle without reflecting first
 
with more depth
more rays shooting out
 
@johnathon VS 11
 
5:43 AM
beta
but it should work on any VS
 
you say we are only considering a solid triangle
 
@SethCarnegie it does, i just was wondering which set of windows.h you was working out of
 
whats the complication?
 
it's rather trivial. the first ray is followed through at most d reflections until it hits the target where we need to start doing N_L ^ (d - wherever we are), so the worst case bound is in fact N^2 * N_L^d
 
I see..No I get that..I just visualized that sort of scenario
 
5:45 AM
@SethCarnegie now, tell me in deital what you trying to accomplish one more time, i think you want the line to show up in the child window right?
 
@johnathon yes
no flicker, transparency
 
So for anti aliasing I know we shot a number of rays per pixel
so if we shoot k^2 VIEWING rays per pixel, how would the above equation change?
 
there's no antialiasing going on at the moment
ahhh
 
just for the VIEWING
sorry that was shoot*
the past tense changed the whole meaning of the question
 
well, let's start with (a) for antialiasing, where the worst case complexity was N^2 before we added antialiasing
 
5:48 AM
sure
btw, thanks for all of this..
you've been really helpful
 
no problem
as long as you are following me :-P
 
now lets resume
I am :D
 
what form of antialiasing are we using? 4x = 2*2 for each pixel?
so with k = 2 we are doing 4 samples?
I mean, yes.
let's assume k is 4.
4^2 = 16. that means for each pixel, we are doing 16 rays
that would mean for (a) the worst case goes from N^2 to (k^2) * (N^2)
or, 16 * (N^2)
 
hmm..one second..let me check
 
@SethCarnegie your company is using 2 windows like this?
@SethCarnegie or are theay using regions?
 
5:53 AM
@johnathon Two windows
actual windows
 
It just says that we are shooting "multiple viewing rays per pixel (k^2)"
 
OK
well if k = 4, we are doing 16 per pixel. that means we just multiply the WHOLE thing by 16
so K^2 * N^2
that leaves worst case bound for (d) of k^2 * ((n^2) * (N_L ^ d))
 
Oh I see
 
that's a shitload
hehe
 
hahahaha
thats prohibitively expensive
now...worst is yet to come
suppose I make this shit look more glossy
in that case
 
5:57 AM
oh fucking no you don't
 
I will need k^2 * Ray_reflect
 
wait what do you mean "more glossy"
what is ray_reflect
 
@johnathon if you take my example and make the child window WS_EX_TRANSPARENT, it disappears. Any idea why?
 
for each reflected ray\
 
@SethCarnegie yea, im working on it
 
5:58 AM
I can shoot more rays to make the surface being hit by the reflected ray to look more glossy
1 sec
 
@johnathon I really appreciate the help
 
so you mean, each time you hit a reflection, you shoot ray_reflect more rays?
at said reflection?
from the source?
 
k^2 rays for each original reflected ray
 

« first day (577 days earlier)      last day (4372 days later) »