| |
| |
| |
|
Page: 1 2
Comments:
<0> hi yall <1> Does anyone know where I can find some detailed tutorials on the theories behind metaballs or volumetric lights? <2> does glut provide real-time input? <0> define real-time? <3> you prob. need to rely on other libs for input <3> i may be wrong, but i've never seen any input related extenions in glut at all <1> there is a function that recieves input etc <1> I've seen it :P <1> http://www.swiftless.com/tutorials/opengl/keyboard.html <2> thanks alot <1> :) <1> Now can anyone tell me where I can find some tutorial on doing volumetric lights? (using GLSL) <1> Is there anyway in GLSL to check the previous stored Z value in the fragment shader? <1> ok I'm really going nuts, how are volumetric lights done? <4> by faking it, obviously <1> even the ones in HL2?
<1> should I try a billboard approach? <4> I don't remember how those look :p <1> 1 sec <1> http://www.petertorpey.com/tutorials/volume_light/final.jpg <4> hmm, let's see, I guess you could do it with particle effects, a simple cone or shaders <4> and probably a ton of other ways that I haven't thought of :p <1> I don't want the cone to be rendered like a triangular cone obviously <1> and I want to make the sides faint <4> and you want it to be visible from within the cone itself? <1> hmm nah <1> it won't matter <4> then I'd probably use a very simple shader for the light <4> eh, for the cone <1> how would I make the cone sides faint ... <4> a blinn-phong shading model, affecting the alpha instead of the intensity maybe? <1> on screen dot product? <1> so you're suggesting multiple cones lit up? <4> eh? <4> I'm thinking a single cone <1> ok <4> I can do a little experiment on it in 45 minutes, if you can wait that long :p <1> sure :D <4> see if I can make something that doesn't look like crap, I doubt it though <1> Damn , so many tutorials on how to do it using various programs, but not a single one explaining how to code it or the theory behind it <4> well, there's a lot of ways to do it <1> I just need to know how to do the fall off on the edge <1> brb in 10 minutes <4> well, you could do it with vertex colors for a really cheap hackish solution that might not look good, and probably won't look all that good (well, it'll probably look pretty bad I guess) <1> yeah <1> Hmm... <1> dot (normalize (texel screen position-light screen position),normalize (midpoint screen position-light screen position)) ? <1> midpoint some point in the middle of the cone <1> whould that work? <1> determining fall off based on that <1> and also <1> One thing's for certain color is based on FragCoord.xy <4> I wouldn't use the light position at all, I'd simply use vertex colors to determine the falloff from the light, then use a modified blinn-phong shading model to detirmine the falloff to the sides, using the view vector for the light vector, and using the intensity of the light to determine the alpha <1> Hmm <4> I'm not sure if that would look good or not, but it seems like a reasonable solution to me <1> Dude that's brilliant <1> I totally forgot the eye vector dot reflection <1> that would be very reasonable <4> it's really easy to test atleast <1> because on the sides, the reflect vector would be pointing way out of your view <4> yeah <1> or even better <1> normal dot view <4> that would be a very effective way of doing it <1> and texel distance for origin with a cut-off value would be good for normal fall-off <4> just give it a shot, and see how it looks, shouldn't take more than a few minutes to implement <1> hmm sure <1> after I come from the washroom <1> :D <4> hehe <4> how'd it go qman? :p <1> arrgh <1> I'm back <1> well <1> It needs more polygons for smoother fall off <1> more 'round' cone results in more smooth fall off on the sides
<1> That brings me to the conclusion that I need a better way to emulate the fall off <4> use a pixel shader <1> Even with 100 triangles on the sides of the cone, you can still see the flat shading problem :P <1> I am :D <1> both pixel and vertex linked <1> Maybe ... <1> I can try this in combination with distance <1> with* <1> in** <1> argh w/e <4> you still need to generate proper normals, and interpolate them per fragment <1> proper normals are generated ;) <1> maybe you're thinking about ... normals different per face? <4> just like normal per-pixel blinn-phong shading, except the light is the eye, and the intensity controls the alpha <1> Hmm <4> you have a working blinn-phong implementation? <1> I'm using a static mesh right now (a cone I just drew up and exported from 3dsmax) <1> Yeah but in a more complex shader <4> hold on, I got something here... <1> give me a moment let me try something <4> ok, I got something fairly simple here <4> it's just a single light, textured, blinn-phon, per-pixel shader <4> *blinn-phong <1> my phong shader would look nice if all normals spread out circle-wise <4> man, I must have been drunk when I wrote this thing, no comments at all :p <1> so I could interpolate then across the triangle <1> and normalize <1> I'm sure this would look superb <1> damn flat normals <1> like normals/flat face <4> http://pastebin.ca/344992 <1> don't worry I need to stop using this static mesh for that purpose X_X <4> just generate the mesh at runtime <1> arrgh <1> I have homework <=( <4> :p <4> could you take a screenshot of the results you got now? <1> argh sure <1> it's a cone test btw ;P <1> http://img258.imageshack.us/my.php?image=weqg7.jpg <1> dot product raised to the 4.0th power <4> well, there's one big problem with that, the light isn't brightest at the top :p <1> well I'll use a distance factor too =) <1> 20/texel_dist_from_light_src <1> or something like that <1> if < 1.0 set 0.0 <4> well, if you're doing it linearly, you could just do a simple vertex alpha <1> smooth interpolated normals across the cone surface would make it look alot better no? <4> you mean if < 1.0 set 1.0? :p <4> yeah <1> that's what I will do after I finish my calc 2 homework =) <1> factor = 20/texel_dist_from_light_src <1> if factor < 1.0 factor = 0.0 <1> gl_FragColor = factor + phong_term <4> won't you get a div by zero error then? <1> 20 being cut off distance :P <4> oh, nevermind <1> if texel_dist_from_light_src == 0.0 texel_dist_from_light_src = 0.001 <1> ./* :D */ <4> yeah <4> hehe :D <5> wana know whats even more fun than picking your nose ? <5> picking your nose scabs with pliers and then chewing on them <5> its a really tough skin not like regular scabs <5> dont take my word for it <5> I incist <5> momma allways sayd the best things in life r free <6> You must be a hit with the ladies. <6> Nothing they like better than a nose-picking geek on IRC. <7> I want to blend two textures together using a noise map. How should I do this? <8> the speed of glGetUniformLocation ? is it okay to call it every frame, or should I buffer the locations? <9> i dont know about the speed, but you can buffer the locations, as they wont change until the next link command <9> personally, id buffer them, as string parsing needs to be done to figure out which uniform you want to get the location of
Return to
#opengl or Go to some related
logs:
#nhl #eggtcl #goal #computers #heroin #computers #politics #3dsmax #politics #gentoo
|
|