Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-03-06 Thread Michael Guerrero
For anyone following this: Colt McAnlis just posted his GDC talk about NaCl here: http://www.youtube.com/watch?feature=player_embeddedv=R281PhQufHo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46074#46074

Re: [osg-users] light position through uniform

2012-02-02 Thread Michael Guerrero
Hi John, A few things come to mind that might help: 1) Make sure when you do your calculations, everything is in the same space. For example, if you wanna get the direction from the vertex to the light in view space (lightPos - vertex) then both the light position and the vertex need to

Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-01-17 Thread Michael Guerrero
Here's a breadcrumb trail for anyone wishing to go the NaCl route. It's a zip containing a detailed list of changes needed for osg 3.0.1, a custom GraphicsWindow derivative (GraphicsWindowNaCl), and a sample application that will render a triangle as shown above. If something is not clear or

Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-01-12 Thread Michael Guerrero
Just wanna post an update on my progress here. The good news is that today I managed to get things rendering: [Image: http://img337.imageshack.us/img337/5662/osgnacl.png ] That bad news is that I don't have much time left to work on this and I currently cannot get the triangle shown above to

Re: [osg-users] Shader that can calculate pixel depth in meters

2012-01-03 Thread Michael Guerrero
Hi Ethan, I did this a little while back using information from that page as well. I'm guessing real depth here just means that it's in whatever units you've modeled your world in. For instance, if the near plane is at 1.0, what are the units of 1.0? My purpose was to make sure that clouds

[osg-users] Bringing OSG to Google's Native Client NaCl

2011-12-22 Thread Michael Guerrero
I've recently begun digging into NaCl with the exciting possibility of using tons of existing native C++ (especially OSG) inside of Chrome (and possibly other browsers that follow suite). User Assaf Raman has done some great work in doing it for Ogre which can be found with explanation here:

Re: [osg-users] Ambient Occlusion Implementation 2 review

2011-12-20 Thread Michael Guerrero
Wow, really great work! You really made my eyes happy this morning. I'd love to see this distributed as part of OSG. Michael PS Looking forward to reading your paper. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44427#44427

Re: [osg-users] Opaque black shadows since moving to OSG V3.0.1

2011-12-01 Thread Michael Guerrero
Hi Wojtek, It certainly did seem as though I completely missed the addition with gl_FrontLightProduct[0].ambient. Unfortunately what happened was that after I copy/pasted it in the message I removed the quotes around it and more importantly the comment characters //. Here is a link to the

Re: [osg-users] Opaque black shadows since moving to OSG V3.0.1

2011-11-30 Thread Michael Guerrero
I am also experiencing the same thing upgrading from 2.8.5 to 3.0.1. For a while I thought it was completely opaque until I looked closely at my lcd monitor where I found it to be just really really dark instead. Here is the relevant frag shader code from 3.0.1: Code: void main(void) { vec4

Re: [osg-users] Setting modelview matrix with viewer.getCamera()-setViewMatrix(modelViewMatrix) not working

2011-11-29 Thread Michael Guerrero
You could also prevent the trackballmanipulator from being created and used by doing something like this: Code: osg::Camera* cam = viewer.getCamera(); cam-setAllowEventFocus(false); // Prevent the manipulator being used and taking over -- Read this topic online here:

Re: [osg-users] [osgOcean] Culling and intersects with ocean and model...

2011-09-28 Thread Michael Guerrero
Skylark wrote: You're welcome to do it differently if you want and submit the change. In fact it would really be nice if you could merge your technique into osgOcean's own code and submit the change. I'm sure many people would appreciate such functionality, if you have the time to do it.

Re: [osg-users] [osgOcean] Culling and intersects with ocean and model...

2011-09-27 Thread Michael Guerrero
I've just managed to get the technique described above. Here is the result: [Image: http://img825.imageshack.us/img825/926/stencilsolution.jpg ] I've also posted a video showing the difference here: http://www.youtube.com/watch?v=Rf1yJObCLKI In order to get this to work I had to first

Re: [osg-users] [osgOcean] Culling and intersects with ocean and model...

2011-09-14 Thread Michael Guerrero
Hi, I have a decent solution to this problem that doesn't require modifications to the shader and can work with any number of ships in the scene. The stencil buffer can be set up to mark the fragments on the inside of the boat as ineligible for rendering upon by the ocean. Then when the

Re: [osg-users] [osgCompute] PostProcessGL

2009-10-02 Thread Michael Guerrero
So on to the next hurdle... It seems that the post process example only works for a single render. I didn't notice this at first since nothing was moving in the scene. However, if we make it match what the osgPrerender example does by having an update callback rotate the cow, nothing happens.

Re: [osg-users] [osgCompute] PostProcessGL

2009-09-30 Thread Michael Guerrero
Looks good! With the sobel filter I get ~360 fps. With the 5x5 Gaussian blur I get ~300 fps. The graphics hardware is a GeForce GTX 280. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17750#17750

Re: [osg-users] [osgCompute] PostProcessGL

2009-09-30 Thread Michael Guerrero
Sure, after removing the filter I was getting ~530 fps. Since fps is nonlinearly related to frame time, here's the breakdown: 530fps = ~1.89ms 360fps = ~2.78ms (sobel) 300fps = ~3.33ms (5x5 guass) So the cost of applying the slightly more expensive 5x5 filter kernel cost about 3.33ms -

Re: [osg-users] [osgCompute] PostProcessGL

2009-09-30 Thread Michael Guerrero
So I've been studying the example code and the first thing that sticks out to me is that they require some default shaders to be set even though they do nothing special. Why doesn't this work with the fixed function pipeline? -- Read this topic online here:

[osg-users] [osgCompute] PostProcessGL

2009-09-25 Thread Michael Guerrero
with steps 1,2, and 3. What's the best way to do this? Michael Guerrero -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17662#17662 ___ osg-users mailing list osg-users@lists.openscenegraph.org http

Re: [osg-users] Restarting a canceled thread

2009-09-08 Thread Michael Guerrero
So to clarify exactly where the exception is thrown here is the call stack: ot11-OpenThreadsd.dll!OpenThreads::cooperativeWait(void * waitHandle=0x00b0, unsigned long timeout=4294967295) Line 53 C++ ot11-OpenThreadsd.dll!OpenThreads::Win32ConditionPrivateData::broadcast() Line 73 +

[osg-users] Restarting a canceled thread

2009-09-07 Thread Michael Guerrero
Hi guys, I don't have that much experience writing threaded code so please forgive my ignorance. I've written a very simple test application using OpenThreads which runs a thread, stops it, and then tries to run it again. Seems straightforward but I get an unhandled exception from the

Re: [osg-users] Restarting a canceled thread

2009-09-07 Thread Michael Guerrero
Thanks for the reply Paul. I was calling join because i wanted the main calling thread to block until myThread was finished. I know it doesn't make much sense to do it that way in this contrived example but in my actual application it would be nice to do this between scenario teardown and

Re: [osg-users] How to apply LISPSM shadows to a scene with different shaders - Part 3

2009-06-08 Thread Michael Guerrero
Sorry, that link just isn't working at all for me. Could you give me a different one or someone relay that information here? Thanks for your help, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13710#13710

Re: [osg-users] How to apply LISPSM shadows to a scene with differentshaders - Part 3

2009-06-04 Thread Michael Guerrero
Wojciech Lewandowski lewandow...@... writes: Miguel, I am not sure whats the problem. Shadows on the ground look ok. So the matrices must be ok as well. All I can notice is improper self shadowing on soldier models. If this is the case then look at following thread:

Re: [osg-users] Rendering image to memory

2009-06-04 Thread Michael Guerrero
Vinay Shah vinay.s...@... writes: Hi, I would like to render an image to a scene that is later used for image processing. I am hoping to have the image in memory as an 24 bit RBG image. Is this possible without drawing it to the screen and taking a screen shot? Can I render

[osg-users] How to apply LISPSM shadows to a scene with different shaders - Part 3

2009-06-03 Thread Michael Guerrero
, gl_TexCoord[3]).r; Here's an image showing what I get as a result: http://img269.imageshack.us/img269/5712/shadowerror.jpg Has anyone gotten this to work? Is there an extra step that I'm missing? Thanks, Michael Guerrero ___ osg-users mailing list osg

Re: [osg-users] osgPPU osgShadow

2008-10-07 Thread Michael Guerrero
Hi Art, thanks for your attention. I've constructed an example for you by minimally modifying Example viewer. Below is the modified view.cpp. It has an additional createScene function that sets up a shadowed scene. Also note the #define ENABLE_SHADOWS. Commenting that out will use the default

Re: [osg-users] osgPPU osgShadow

2008-10-07 Thread Michael Guerrero
Awesome, thanks for the correction. I see that my initial example forgot to actually add the model to the shadowed scene :P But that wasn't the real problem. The real problem was giving osgPPU the same node that i was using for shadows. After seeing what you did in your correction I rearranged

Re: [osg-users] osgPPU osgShadow

2008-10-02 Thread Michael Guerrero
I just get a black screen. Maybe the initial screen render is not passed to the PPU's correctly. Michael ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] osgPPU osgShadow

2008-10-01 Thread Michael Guerrero
Hi guys, I've recently delved into osgPPU and am loving it. I have a scene beautifully rendering with HDR. However, when I tried adding osgShadow ShadowMap to the scene I had conflicts. I don't yet know exactly what is going just yet but I was wondering if anyone has had success combining these

Re: [osg-users] How to apply shadows to a scene with differ ent shaders- Part 2

2008-09-22 Thread Michael Guerrero
Thanks Wojtek, that was what I needed to hear. Currently I'm filtering the shadows (similar to the soft shadow shaders i imagine) by averaging 9 texture samples. This gives decent results but in the event that more precision is needed, storing a custom texture matrix in a uniform sounds good.

[osg-users] How to apply shadows to a scene with different shaders - Part 2

2008-09-17 Thread Michael Guerrero
fixed function vertex processing and I believe I can see where it's coming from. In ShadowMap.cpp there exists the macro constant IMPROVE_TEXGEN_PRECISION. What I have in the shader doesn't take this enhancement into account. Anyone know how this can be done? Thanks, Michael Guerrero

[osg-users] Bug in qtutils.cpp

2008-08-20 Thread Michael Guerrero
Hey guys, i recently integrated video playback into our engine using the quicktime plugin (osgdb_qt). I came across a bug where if you load a movie then quit/delete that movie and then try to load another movie, the QuicktimeInitializer will be NULL. The reasons for this can be seen by examining

Re: [osg-users] Plugin problems with Visual Studio 2008

2008-07-21 Thread Michael Guerrero
I just recently encountered this same problem. Here's my situation: i had both vs2005 and vs2008 installed and had no problems as Paul mentions. Then I removed vs2005 and after that the osgdb_png plugin could not be loaded. I traced it all the way down to DynamicLibrary.cpp at line 96: #if

Re: [osg-users] Coordinate Systems and Quaternions

2008-06-10 Thread Michael Guerrero
Mrs. Mister [EMAIL PROTECTED] writes: hi, i am working with osg 2.4, osgCal 0.3.0 and cal 3d 0.11. in the cal3d faq i read: It should also be noted that Cal3D's math classes assume a left-handed rotation system. i have trouble with setting the quaternions from osg to the cal3d