Re: [osg-users] Dramatic increase in event traversal time during mouse movement
Hello Michael, I was looking at the nice statshandler graphics in osgViewer.exe, and noticed a dramatic increase in the time spent in the event traversal stage when the mouse was moved (goes from 0.02ms to around 8ms). I've seen that when running in debug version... In release the increase is negligible. Perhaps you were running in debug? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dramatic increase in event traversal time during mouse movement
Hi Michael, I've seen that when running in debug version... In release the increase is negligible. Perhaps you were running in debug? Sorry, I saw your follow-up after hitting send. I don't know what could be up. On my machine it jumps to ~2.5ms but very very shortly, so it's not significant... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 144 errors in gl.h (resend with clean text)
Bonjour Cédrik, everythings is ok, but now I try to create my own class to manage scene ressources and visual studio dislike this. It seems that I've not linked everythings correctly. You need to add WIN32 to the defines in your project. In Visual Studio, right-click on your project, go to C/C++, Preprocessor, and in the Preprocessor Definitions field add WIN32 for both debug and release configurations. While you're at it, also add _DEBUG for the debug configuration and NDEBUG for the release configuration... For some reason the default VS projects have no preprocessor definitions, even though these, at least, should almost always be used... Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems with loading model in OSG 2.2
Hello Ricky, I still can't solve this problem: Error: [screen #0] ChooseMatchingPixelFormat() - Unable to choose the requested pixel format Your message is missing some info we need in order to help you, and there are some things you could do to try and troubleshoot yourself. What is your hardware, OS, compiler, etc? Are you using the OSG binaries from http://www.mew.cx/osg/ or did you compile OSG from source? Are you using the 3rdParty binaries from http://www.mew.cx/osg/ or did you compile them from source? If you run osgviewer cow.osg, does it give the same error? Or rather, if you want an equivalent test, try: osgviewer --window 32 32 512 512 cow.osg If that works, your code should also work. If not, perhaps the info above will help us zero in on the problem. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VPB and how it generates terrain
Hello Robert, We currently have a student doing a masters project at our company, and his job will be to improve the terrain algorithms in the Vortex toolkit (both for physical simulation and graphical representation). One aspect is generating terrain from a height field, which is what VPB does. Unfortunately, since we need to support dynamic terrain/height fields, and since we also need to do collision detection against it, we cannot use VPB directly and will have to re-do much of the work that is already in VPB. I was wondering if you had any pointers to what strategies are used to generate the terrain. Any articles/papers? Both the actual geometry generation and the LOD strategies are of interest. The code is available for study but we're really looking for some high-level overviews of how it does its work and why those given tradeoffs were chosen. Any information you provide would be helpful. Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and how it generates terrain
Hi Robert, This is huge topic, not something I just quickly go over in a few emails, and especially not when I'm busy. Sorry. Hehe, I know, I wasn't expecting an explanation, maybe just some links to articles you used as inspiration... We don't need to reproduce VPB (if that were the case we'd just use it). We just want to have an idea of the general direction it's taken. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer 's' key Geometry information
Hi Rick, It would be handy. Can we not have this toy anymore ? ;D It was in OSG 1.2 / osgProducer. The new StatsHandler in osgViewer does not support that 3rd display mode (drawable and geometry info). There was a submission a while back that added that and much more (I remember seeing graphs and other nice things), but it was a bit heavy and didn't get integrated. Perhaps if someone has some time, that submission could be found, cleaned up and simplified, and then resubmitted. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Only intersecting certain nodes in the scene graph
Hi Jason, I created a node mask for the terrain, 0x1, and used setNodeMask to set it on the root node of the terrain database. I am using the computeIntersections function of Viewer and passed along that traversal mask hoping that it would only intersect the paged database. However, the computeIntersections function is computing intersections against all of the nodes in the scene graph instead of just the paged database. The default node mask is 0x, and you don't mention if you set the node mask on your text items (or other objects) to something else. No matter what the traversal mask is you give to computeIntersections, it will return true when ANDed with 0x... You can for example set your terrain's mask to 0x1, and your GUI elements or other things to 0x2, and then give 0x1 as the traversal mask in computeIntersections, and it will only intersect with the terrain. I generally reserve one bit of the nodemask to items that are pickable, I find that makes comprehension simpler. Then I just have to make sure to set each object's nodemask appropriately at creation. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Current state of osgTDS
Hello all, I'm directing these questions mainly at Paul Martz, but I'd be interested in hearing from anyone else who has relevant experience. I've learned that I need to do terrain deformation to match new data in our current project, and it seems to fit exactly what osgTDS does. To be more precise, some structures will be lowered to the bottom of the ocean, and their final resting place might not match where the "ocean floor" was when the terrain data was taken (because of soil/rock movement, human activities, or low terrain data accuracy). I have to evaluate some factors (time it would take to integrate, work needed to make it do what we want) before actually diving in, so I thought I'd ask here. Regarding building osgTDS: I saw a few posts from 2007 in the archives regarding osgTDS, but there doesn't seem to be a definitive answer to whether it will build for OSG 2.x and on. Regarding using it run-time: I understand osgTDS does its processing at load time. Would it be hard to modify it so that when we decide that an object is resting, it does the processing locally for that object and updates the terrain immediately? What kind of time does that processing take? (say for example on a 100,000 polygon terrain, just for the sake of discussion) Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cessnafire.osg...
Hi Shayne, If it is possible to isolate the particle system out of the cessnafire.osg file, I would like to see a code snippet that does this... Anytime you want to find a node in the scene graph, you probably need to should make a node visitor. Looks like ParticleEffect is a subclass of osg::Group, so you'll have to override the accept(osg::Group& group) method and try to dynamic_cast(&group) and then do what you want with it. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Current state of osgTDS
Hi Paul, Thanks a lot for the info, it's really useful. I'll see what the project managers think. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to disable zbuffer
Hi David, You just need to disable GL_DEPTH_TEST for the desired object(s). or stateSet->setAttributeAndModes(new osg::Depth(osg::Depth::ALWAYS), osg::StateAttribute::ON); J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VPB generating terrain for multiple data files
Hello, I am generating a terrain database using osgdem. I have three source data files (GeoTiffs which have correct geospatial information), and I would like to generate a single terrain database from all three. These three files define parts of the ocean floor which are separate, and which have some space between them. The heights in these files is around -365m. osgdem creates flat (blank) geometry between the tiles, which is what I want, but the problem is that it creates this geometry at Z=0. So the terrain database looks like: (data)(no data)(data) ___Z = 0 | | | | __| |_ Z = -365 (viewed from the side) Are there any ways to fix this? I can think of two off the top of my head: * Translate all the terrain heights up by about 365 meters, so that everything is near Z=0, then generate the terrain, and at run-time translate it back down by 365 meters. * Use a "fake" tile of data that would encompass the whole terrain and would be at about -365 meters everywhere, and then the three data files I have would be additional data (higher-res overlays, as I have seen used in some terrain database). Are there any other options? I think the second option is better, but I would appreciate others' points of view on this. Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fog problem
Hello Eric, Computers drive me crazy! good will be the retirment, I will breed rabits. I don't have any input into your specific problem, but I just wanted to let you know you made my day with that line! My co-workers liked it too. :-) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] The growing draw bar in the stats handler
Hi Rick, Now I do not have the growing Draw callback, but everything still shows the orange bar across the entire screen. I am getting 60 fps ok, so I don't get the bar. I am sure it is probably still a driver issue somewhere. I still also have these long orange bars and big spaces in my stats display I do not understand, but atleast the performance does not degrade. Do you have an ATI/AMD video card by any chance? I think the GPU stats depend on an NVidia extension, so perhaps that's how they show up when that extension is not present... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB generating terrain for multiple data files
Hi Robert, Ideally should have data throughout your model to define all the heights you require, if you have holes then all you can come if with is an acceptable fudge for what this missing data might be. I know, I know... :-) I work with what our client provided, so I have to fill in the gaps myself. Perhaps the easist way to provide this fudge would be to create a single dummy DEM that covers the entire region and matches the elevations of the tiles you have. The actual data would then act is a high res inserts to this base level DEM. Yes, that was the second option I mentioned. Any hints as to how to do that? I have the FWTools distribution, which includes all gdal binaries, but if there's another tool that I could use, please point me in the right direction. Ideally, I would like the base terrain to conform to the inserts at the edges of said inserts, instead of having "steps" around the inserts... So the tool used would probably need to interpolate between the tiles. I tried using gdal_merge.py, currently waiting for the terrain to generate from the result of that (I can't use --TERRAIN, so it takes a while)... But it doesn't interpolate, it just puts either NODATA or a value you specify. Anyways, thanks for confirming my intuition. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB generating terrain for multiple data files
Hi all, I have never tried to create a DEM so can't help you here. Anybody else? I'm sure I'm not the first one to want to do this, I just can't find something in gdal that does this so I'd appreciate being pointed in the right direction. Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Weird driver problems?
Hi Gordon, A little note on automatic updates on Video drivers, they are typically quite OLD, take the one for my 8800 the automatic update wanted to place a 9/2007 on my machine yet I have a 4/2008 driver already installed... No, no, I didn't mean automatic update to the graphics driver, I meant automatic update to Windows itself, possibly triggering a bug related to the graphics driver. It's just a theory of course. We don't do any automatic updating of the graphics driver, of course, as that's a bit more risky... Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Weird driver problems?
Hello Wojtek, It looks bit like the issue I strrugled with. I am not sure if my workaround - repeating makeCurrent - was added before 2.4 release or after it. Certainly 2.2 is not safe. I agree, it looks like that issue, I remember it now. But why would it have appeared now, when a few days ago all was well? That's the weird thing. I think I'll keep an eye on gaming message boards and see if people start reporting something similar... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cygwin compiled version from Svn will only load and convert osg files and not gif files - any thoughts?
Hello Brian, It may be a far jump but my thoughts are this leads us down the path that it there is possibly something either in the osg plugin or more likely - the 3d functionality and the extra logic and threads needed to accomplish the 3d display. You seem to think that osgviewer with or without --image does radically different things... It doesn't. It's the same viewer, the same setup. It will detect and use the same thread config, etc. When you do osgviewer --image bob.jpg it creates a quad (in 3D space) and maps your image onto it as a texture. So it's still displaying a model in 3D. Yes, it may be the .osg loader, but it may be something totally unrelated. You just haven't presented enough information to be able to make that call at this point. I think you just need to start with basics. Compile OSG and osgviewer in debug mode, start it in gdb and recreate your crash on exit. That will give you a stack trace. From that you can try to debug further or post the trace here to see if we can spot something. (note that getting a stack trace is the first step to debug any crash) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE : Re: RE : multitexturing coordinates
Hello Franclin, But for shape drawable, geometry information is hidden to clients (and I don't know why but I suspect performance issues) that is why you need to use shaders for them. Well actually the Shape / ShapeDrawable classes were originally designed as simple debugging tools, so little thought was put into their design. They're just implemented as simple display lists with little customization possible, and no access to the internals. If you want to do any serious geometry with any acceptable level of control, you'll want to use osg::Geometry and define the vertices yourself. One side of the coin: --- I had suggested to Robert that I could reimplement the Shape / ShapeDrawable classes using an underlying osg::Geometry, so that they would behave as they do now but offer more control if needed (probably as it should have been done right from the beginning). He was open to this, but I haven't had time to do it yet. The other side of the coin: - Do you know how easy it is to download Blender, create a sphere, save it and load it up with OSG? And when you do, it will be a full-fledged osg::Geometry and you will have total control over it. If you use the osg exporter for Blender you can even edit the .osg file and make sure it's structured exactly how you want it. I generally favor using data for everything (as much as possible / reasonable) as opposed to hard-coding things, since later it's much easier to replace the sphere model by something else if it's a model file than if I have to open the project, find the relevant code, change it, compile it, test it... This is just my opinion though, and the Shape / ShapeDrawable classes still have uses, which is why I still want to do what I mentioned above, someday. :-) Hope this clears things up. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Drawing to Texture2D
Hi James, I was wondering if it is possible to draw on a Texture2D instance. I know this isn't possible, but I am wondering if you can do the equivalent of: Texture2Dinstance->DrawCircle(x,y,r); OSG does not do 2D drawing to images. You can do your own by getting the data pointer from an osg::Image and drawing pixels into that (if you feel the need to write your own line, circle, flood-filling etc. algorithms :-) ), or you can use an imaging library (ImageMagick, etc.) to make the image and then get the data from that library and copy it into an osg::Image (or perhaps even use the same pointer if it's a raw format). No need to save the image to disk and re-read it with OSG. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cygwin compiled version from Svn will only load and convert osg files and not gif files - any thoughts?
Hi Brian, If I display an osg file (without the --image since it doesn't like that for an osg file) then I get the following output from gdb. I still wonder why you would want --image for an osg file? You say "it doesn't like that for an osg file", but it's actually nonsensical. An osg file is not an image... It's a saved scene graph (3D model or whatever). You need --image when you want osgviewer to load an image file (.gif, .jpg, .png, etc.) with osgDB::readImageFile() and map it onto a quad. When you don't use --image, OSG will just load the given file(s) (.osg, .3ds, .wrl, .dae, etc.) with osgDB::readNodeFiles() and add it as child to a group node and display that (if the load succeeds). As for the crash, as I said I don't use cygwin and have no debugging experience there, and little debugging experience on Linux (with gdb) for that matter. So I can't really help. Others with more gdb experience might be able to suggest some further steps to take. Good luck, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test SVN of OpenSceneGraph
Hi Robert, I'm winding up towards the OpenSceneGraph-2.5.4 developer release, all the major changes are now checked in, so it's time to make sure that things are compiling and running sensible across platforms. If things look good then I'll tag 2.5.4 tomorrow. Building now, will let you know. Once 2.5.4 is out the way my plan is to seriously look at osgWidget inclusion in to SVN trunk, so testing osgWidget and feedback on it would be very useful. Regarding osgWidget, Jeremy hasn't yet merged the CMake change I submitted last week to make it build with CMake 2.6 as well as 2.4, not sure why... Maybe it just passed under his radar. Hopefully he'll see this post, if not I'll poke him directly :-) Other than that, osgWidget runs great for me on Windows Vista/VS8 and Ubuntu Linux/gcc. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] KdTree support now checked in
Hi Robert, To wrap, all these changes on now in SVN trunk and will be part of 2.5.4 and hence the up coming 2.6. If you enable the build of automatic KdTrees of load and use IntersectionVisitor/LineSegmentIntersector then you'll be able to go straight ahead of use KdTree intersections without lifting a further finger ;-) This is all very cool! I'll definitely be testing this out in the next few days to try it out with my Masters project (which was very intersection-heavy). I'll be setting up a little competition between your KdTree and Adrian Egli's... Just kidding! I think I may be able to help a bit regarding the higher-level setup and bookkeeping changes needed to speed things up on that regard. One thing I noticed before is that creating a new Intersector and IntersectionVisitor each time is costly, and instead keeping static or cached instances and using the reset() and setStart()/setEnd() methods is faster. There may be some other similar things that can be done too, we'll see what I can dig up. Thanks a lot for this work, it's a great addition, and I expect that it will be useful in lots of different applications. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test SVN of OpenSceneGraph
Hi Robert, I'm winding up towards the OpenSceneGraph-2.5.4 developer release, all the major changes are now checked in, so it's time to make sure that things are compiling and running sensible across platforms. If things look good then I'll tag 2.5.4 tomorrow. Building now, will let you know. Done, all is fine. Windows Vista, VS8, CMake 2.6. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] KdTree support now checked in
Hi Robert, It's interesting how different bottlenecks pop up, in this case creating objects on the heap is clearly showing itself as a bottleneck whereas the old brute force intersection code was so slow that this wasn't a significant factor. Bear in mind that what I mentioned was with Adrian's implementation of a kd-tree. I haven't yet had time to test the one that's in OSG now. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] KdTree support now checked in
Hello Rick, So my first question is about how I should try to cache the intersect visitors? Should I keep one around for each large ship (node passed in to the getIntersections() function), or should I just make a single one that is used over and over? There's really no way I can answer this. You will have to try a few different possibilities, use a profiler and see if the bottleneck changes. I have no idea what you do with your intersection tests. Do you need to do one test per frame per ship? Ten? As many as possible? In my case, my app needed to do shadow tests from the surface of every object, so I really needed to do as many intersections per second as possible. I profiled my app, and saw that creating a new Intersector and IntersectionVisitor each time was taking up significant time. So I used static instances that were reused, and that made the whole process faster. If all you want to do is check intersections a few times per frame, you may not need to do that, because in your case the creation of the objects won't be significant. You have to profile and see. Next, how often should I call reset()? Once for each big ship, or once for each intersection check? I do not see any setStart()/setEnd() functions. Please forgive my ognorance, but where are they and what do they do? If you re-use an Intersector or an InversectionVisitor, you need to call reset() on both before you do a new intersection test. This clears the results of the previous test. osgUtil::LineSegmentIntersector::setStart() and setEnd() just change the start and end points of the line segment being used for the intersection test, without having to create a new LineSegmentIntersector. I submitted the change to add those methods around OSG 2.1.x time-frame, so if you're using 2.0 you won't have them, but if you're using 2.2+ you will. Finally, I am doing a few checks before I try the line segments to see if they are even close to the node I am checking. Is this worth the check or does the intersectVisitor do that all for me anyway? The IntersectionVisitor checks with the graph nodes' bounding volumes before going into the geometry itself, so you can probably just let it do its work. Generally, traversing the graph and checking bounding volumes is pretty fast (except if you have a very large number of nodes or if your graph is poorly built), it's doing the actual tests against geometry (line segment to triangle intersection test) that's slow (except with the new kd-tree... :-) ). Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] KdTree support now checked in
Hi Robert, I was wondering, is there a way this new kd-tree can be leveraged to make other types of intersection tests (polytope) faster too? I will soon need to integrate polytope intersections for picking of lines and points into our framework, so it would be cool if those could be accelerated too. Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] KdTree support now checked in
Hi Robert, To enable automatic generation of KdTree's I have extended osgDB so that the Registry and DatabasePager are both KdTree aware, and if KdTree build option is enabled it'll use the Registry's new KdTreeBuilder object to build KdTree's on loaded models. To enable this building you simple set the env var OSG_BUILD_KDTREES to on, i.e. set OSG_BUILD_KDTREES=on osgpick cow.osg Or programatically you can enable building of KdTrees via: osgDB::Registry::instance()->setBuildKdTreesHint(osgDB::ReaderWriter::Options::BUILD_KDTREES); You'll need to call this before you load any models that you wish to have BUILD_KDTREES set. This is all good, but do we need to do anything to get the kd-tree rebuilt if some geometry changes? Or is this all transparently handled by osg::Geometry::dirty() / dirtyDisplayList()? In my Masters project one of the goals was to support totally dynamic geometry, so any object could both be moved (dynamic with respect to transform nodes) or deformed (dynamic with respect to actual geometry). So it was possible to modify vertices in the osg::Geometry's vertex array. But then, if there is a kd-tree for that geometry, it needs to be rebuilt... Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] KdTree support now checked in
Hi Robert, osg::KdTree could support osg::Polytope intersections, but I haven't implemented this as it wasn't required for the client, and I want to get 2.6 out the door sooner rather than later. Feel free to pitch in, but bare in mind I want to get 2.6 out in the next two weeks. OK, I just wanted to know if you thought it was feasible (I don't know how polytope intersection is implemented in OSG right now). I don't require this right away, and I will of course do it if no one has before me :-) Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB generating terrain for multiple data files
Hello John, Have you tried Ben Discoe's VTBuilder (http://www.vterrain.org/Doc/VTBuilder/overview.html)? It _might_ be what you are looking for. Nice, looks like this does what I need! Thanks for pointing thos tool out. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] StartingOpenSceneGraphinVisualStudio
Hello Victor, Thanks for the help so far. I have the following BUILDs set to off when I run the CMake tool ( I am running OpenSceneGraph-2.4.0 and cmake-2.4.8-win32-x86.exe). BUILD_OSG_EXAMPLES BUILD_REF_DOCS For a new user, I highly recommend you set BUILD_OSG_EXAMPLES to on. Also, there's BUILD_OSG_WRAPPERS, is this on or off? You probably don't need the wrappers, and they'll take a long time to build, so disable them unless you really know you need them. Several paths could not be found. ... I tried putting some of the libraries and include files in the OpenSceneGraph directory hoping CMake will pick them up but it couldn't. This is not the way to do it. First of all, many of the libs listed are optional dependencies (COLLADA, QuickTime, OpenVRML, Jasper, SDL, FLTK, FOX, Inventor, GDAL, Performer, QT, Xine, Wx). You can start without them and just build those plugins if/when you find out you need them. The others are pretty much needed to do anything useful. For those you need to get the 3rdParty dependencies (if you're using Visual Studio 2005 then you can just use the precompiled dependencies at http://mew.cx/osg/, otherwise you'll have to download the sources and compile them yourself). Put the dependencies in a directory called "3rdParty" parallel to your OSG sources directory. For example: .../OpenSceneGraph .../OpenSceneGraph/include .../OpenSceneGraph/src .../3rdParty .../3rdParty/bin .../3rdParty/lib This will ensure that CMake finds them. (and please start with a fresh OSG source directory) Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.5.4 developer release tagged
Hello Robert, On Monday I'll look at integrating osgWidgets, BTW, what about Wojtek's new shadow algorithm(s)? Have you had a chance to review those? It would be really nice to include those in 2.6, as they both fix issues with the old osgShadow::ShadowMap and also add new shadow techniques. Sorry for not mentioning it sooner, I didn't remember about it until I saw the source in my OSG directory today... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Configure error on Sun Solaris machine
Hello Leonard, There is no FOREACH statement in my CMakeLists.txt file. Where does this error come from? I do not use Solaris, so I can only suggest a few paths for you to investigate. First of all, what version of CMake are you using? The FOREACH statements are probably coming from the files included from the CMakeModules subdirectory. As to where the erroneous FOREACH statement is coming from, it would be useful if CMake would tell you which macro or function it was processing when it got the error... In any case, I haven't seen that error when generating build files for OSG (neither on Windows nor on Linux) which is why I suspect it's a CMake version problem. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cygwin compiled version from Svn will only load and convert osg files and not gif files - any thoughts?
Hello Brian, Thanks and sorry for the confusion and I hope this helps explain my thought process. Yes, I understand your thought process much better now, but I still think that using an invalid option (i.e. --image with an .osg file) gets you nowhere. It will just exit with an error at the earliest possible time, so it does not test any significant code paths. Instead, why not create an .osg file with a simple quad and a texture, and then try to load that. That will reproduce what 'osgviewer --image' does, but by loading an .osg file (without --image). You could create such an .osg file by modifying osgviewer.cpp so that it calls osgDB::writeNodeFile(...) right before calling viewer.run(), and then running the resulting executable with '--image someImage.jpg'. Another test could be to try a very simple OSG file (axes.osg from OpenSceneGraph-Data, for example, has no texture and very simple geometry). It does seem weird to me that you get problems with the osg plugin, but not the image plugins. The osg plugin has no external dependencies, and as long as it loads it should work fine. Other platforms use it without problems. I'm almost inclined to suspect (gasp!) a compiler bug / other compiler-related problem. Perhaps cygwin's version of gcc/g++ has a bug that OSG is running into? Are there multiple versions you could try out? Also, I don't understand why I'm the only one to respond to you in this thread. I have never compiled OSG in cygwin, nor do I use cygwin if I have the choice. Surely someone else on this list has more experience than me in this environment and could help you better? Anyways, I hope I'm at least helping you go forward a bit... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.5.4 developer release tagged
Hello Robert, BTW, what about Wojtek's new shadow algorithm(s)? Have you had a chance to review those? It would be really nice to include those in 2.6, as they both fix issues with the old osgShadow::ShadowMap and also add new shadow techniques. If Wojtek is ready to submit them then I'm happy to review them. Testing by others would be useful as I'll be rather stretched over the next couple of weeks. He posted the code and project to osg-users a while back, and I think I was the only one who tested it... Or maybe I'm remembering wrong. In any case, I didn't see any problems, though I only tested on Windows Vista. Not a very big sample size, I know. :-) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.5.4 developer release tagged
Hi again Robert, BTW, what about Wojtek's new shadow algorithm(s)? Have you had a chance to review those? It would be really nice to include those in 2.6, as they both fix issues with the old osgShadow::ShadowMap and also add new shadow techniques. If Wojtek is ready to submit them then I'm happy to review them. Testing by others would be useful as I'll be rather stretched over the next couple of weeks. He posted the code and project to osg-users a while back, and I think I was the only one who tested it... Or maybe I'm remembering wrong. In any case, I didn't see any problems, though I only tested on Windows Vista. Not a very big sample size, I know. :-) I found the thread on gmane, just to convince myself that I didn't hallucinate... :-) http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/28683/focus=28705 You can even download the code zip file from the gmane archive, pretty cool. So yeah, I'd be very interested in getting this integrated, and it worked fine for me (see follow-up discussion in that thread for details). Perhaps Wojtek made some changes since then, so I'll be happy to re-test if that's the case. Let me know if there is more I can do to help drive this forward. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget Remaining Issues
Hi Jeremy, Some responses below, but you'll notice that my general opinion is biased in the "get it out soon, and perfect it gradually" camp. Especially if you're hitting roadblocks yourself, getting the code out there and into other people's hands will make things progress faster. And I don't think anyone will hold you personally responsible for any shortcomings, since it *is* a first official version... :-) 1. [ Font Clarity ] ... # osgfont fonts/arial.ttf 10 11 12 13 14 15 You'll notice that at some sizes and locations, the text appears crisp and sharp. You'll also notice that at other places the text is blurry and smudged. All I see is some very minor softness, mostly at the odd sizes (11, 13, 15). 10, 12 and 14 look great, but 11, 13 and 15 still look very good (and nowhere near illegible). So I really don't think it's a major problem. 2. [ Low-level Font API ] I can't help much here for now, but I think it's something that can be added afterwards. The existing functionality is good enough and of high enough quality that I really don't think anyone doubts that input will come soon. Plus, the community can help. If what is needed are some changes to osgText, it will be much easier to make the necessary changes if osgWidget and osgText coexist in the OSG core. 3. [ 3D Widgets ] Again, I think this is something that can be worked on gradually. osgWidget can first be advertized as mostly for HUDs, and if someone wants to try doing totally 3D GUIs, they're free to do it and make any necessary improvements along the way. > Given the popularity of WOW, I'm assuming that 2D interface "solutions" for games aren't something that there is a a superbly solid solution for, so I'm not that discouraged at some of my own idiosyncrasies in osgWidget. You're definitely right about that. From what I've seen in osgWidget, it's much more general and flexible than the game engine HUD/GUI frameworks I've seen. I'm getting some really great results, but introducing this into osgWidget would mean introducing the Pango dependency chain (Pango, Cairo, and glib). Is this an option worth exploring? I can't speak for others, but I would advocate seeing if the current solutions work well for most uses and if the remaining issues can be worked out before trying to go a completely different route. Again, I'd like to reiterate my support for your work. If you need testing (especially on Windows) and/or have questions, don't hesitate to ask. Also, we're likely to be one of your first clients (we wanted to do a HUD framework but instead chose to wait for osgWidget to be integrated into the OSG core) so you can expect to get more feedback from us once we start using it for real :-) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget now checked into OSG SVN trunk
Hi Robert, You have some mismatched parentheses in examples/CMakeLists.txt IF (BUILD_OSGWIDGET)) ADD_SUBDIRECTORY(osgwidgetaddremove) ADD_SUBDIRECTORY(osgwidgetbox) ADD_SUBDIRECTORY(osgwidgetcanvas) ADD_SUBDIRECTORY(osgwidgetframe) ADD_SUBDIRECTORY(osgwidgetinput) ADD_SUBDIRECTORY(osgwidgetlabel) ADD_SUBDIRECTORY(osgwidgetmenu) ADD_SUBDIRECTORY(osgwidgetnotebook) ADD_SUBDIRECTORY(osgwidgetscrolled) ADD_SUBDIRECTORY(osgwidgetshader) ADD_SUBDIRECTORY(osgwidgetstyled) ADD_SUBDIRECTORY(osgwidgettable) ADD_SUBDIRECTORY(osgwidgetversion) ADD_SUBDIRECTORY(osgwidgetwindow ENDIF(BUILD_OSGWIDGET) should be IF (BUILD_OSGWIDGET) ADD_SUBDIRECTORY(osgwidgetaddremove) ADD_SUBDIRECTORY(osgwidgetbox) ADD_SUBDIRECTORY(osgwidgetcanvas) ADD_SUBDIRECTORY(osgwidgetframe) ADD_SUBDIRECTORY(osgwidgetinput) ADD_SUBDIRECTORY(osgwidgetlabel) ADD_SUBDIRECTORY(osgwidgetmenu) ADD_SUBDIRECTORY(osgwidgetnotebook) ADD_SUBDIRECTORY(osgwidgetscrolled) ADD_SUBDIRECTORY(osgwidgetshader) ADD_SUBDIRECTORY(osgwidgetstyled) ADD_SUBDIRECTORY(osgwidgettable) ADD_SUBDIRECTORY(osgwidgetversion) ADD_SUBDIRECTORY(osgwidgetwindow) ENDIF(BUILD_OSGWIDGET) (note, first line has an extra paren and osgwidgetwindow is missing closing paren). Building now. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ### # this are setting used in SETUP_EXAMPLE macro ### SET(TARGET_DEFAULT_PREFIX "example_") SET(TARGET_DEFAULT_LABEL_PREFIX "Examples") SET(TARGET_COMMON_LIBRARIES OpenThreads osg osgDB osgUtil osgGA osgViewer osgText ) IF(DYNAMIC_OPENSCENEGRAPH) ADD_SUBDIRECTORY(osganimate) ADD_SUBDIRECTORY(osgautotransform) ADD_SUBDIRECTORY(osgbillboard) ADD_SUBDIRECTORY(osgblendequation) ADD_SUBDIRECTORY(osgcallback) ADD_SUBDIRECTORY(osgcamera) ADD_SUBDIRECTORY(osgcatch) ADD_SUBDIRECTORY(osgclip) ADD_SUBDIRECTORY(osgcompositeviewer) ADD_SUBDIRECTORY(osgcopy) ADD_SUBDIRECTORY(osgcubemap) ADD_SUBDIRECTORY(osgdelaunay) ADD_SUBDIRECTORY(osgdepthpartition) ADD_SUBDIRECTORY(osgdepthpeeling) ADD_SUBDIRECTORY(osgdistortion) ADD_SUBDIRECTORY(osgfadetext) ADD_SUBDIRECTORY(osgfont) ADD_SUBDIRECTORY(osgforest) ADD_SUBDIRECTORY(osgfxbrowser) ADD_SUBDIRECTORY(osggeodemo) ADD_SUBDIRECTORY(osggeometry) ADD_SUBDIRECTORY(osggeometryshaders) ADD_SUBDIRECTORY(osghangglide) ADD_SUBDIRECTORY(osghud) ADD_SUBDIRECTORY(osgimpostor) ADD_SUBDIRECTORY(osgintersection) ADD_SUBDIRECTORY(osgkdtree) ADD_SUBDIRECTORY(osgkeyboard) ADD_SUBDIRECTORY(osgkeyboardmouse) ADD_SUBDIRECTORY(osglauncher) ADD_SUBDIRECTORY(osglight) ADD_SUBDIRECTORY(osglightpoint) ADD_SUBDIRECTORY(osglogicop) ADD_SUBDIRECTORY(osglogo) ADD_SUBDIRECTORY(osgmanipulator) ADD_SUBDIRECTORY(osgmotionblur) ADD_SUBDIRECTORY(osgmovie) ADD_SUBDIRECTORY(osgmultiplerendertargets) ADD_SUBDIRECTORY(osgmultitexture) ADD_SUBDIRECTORY(osgmultitexturecontrol) ADD_SUBDIRECTORY(osgoccluder) ADD_SUBDIRECTORY(osgocclusionquery) ADD_SUBDIRECTORY(osgpagedlod) ADD_SUBDIRECTORY(osgparametric) ADD_SUBDIRECTORY(osgparticle) ADD_SUBDIRECTORY(osgparticleeffects) ADD_SUBDIRECTORY(osgphotoalbum) ADD_SUBDIRECTORY(osgpick) ADD_SUBDIRECTORY(osgplanets) ADD_SUBDIRECTORY(osgpoints) ADD_SUBDIRECTORY(osgpointsprite) ADD_SUBDIRECTORY(osgprecipitation) ADD_SUBDIRECTORY(osgprerender) ADD_SUBDIRECTORY(osgprerendercubemap) ADD_SUBDIRECTORY(osgreflect) ADD_SUBDIRECTORY(osgscalarbar) ADD_SUBDIRECTORY(osgscreencapture) ADD_SUBDIRECTORY(osgscribe) ADD_SUBDIRECTORY(osgsequence) ADD_SUBDIRECTORY(osgshaders) ADD_SUBDIRECTORY(osgshaderterrain) ADD_SUBDIRECTORY(osgshadow) ADD_SUBDIRECTORY(osgshape) ADD_SUBDIRECTORY(osgsharedarray) ADD_SUBDIRECTORY(osgsimplifier) ADD_SUBDIRECTORY(osgsimulation) ADD_SUBDIRECTORY(osgslice) ADD_SUBDIRECTORY(osgspacewarp) ADD_SUBDIRECTORY(osgspheresegment) ADD_SUBDIRECTORY(osgspotlight) ADD_SUBDIRECTORY(osgstereoimage) ADD_SUBDIRECTORY(osgstereomatch) ADD_SUBDIRECTORY(osgteapot) ADD_SUBDIRECTORY(osgterrain) ADD_SUBDIRECTORY(osgtessellate) ADD_SUBDIRECTORY(osgtext) ADD_SUBDIRECTORY(osgtext3D) ADD_SUBDIRECTORY(osgtexture1D) ADD_SUBDIRECTORY(osgtexture2D) ADD_SUBDIRECTORY(osgtexture3D) ADD_SUBDIRECTORY(osgtexturerectangle) ADD_SUBDIRECTORY(osgthirdpersonview) ADD_SUBDIRECTORY(osgunittests)
Re: [osg-users] osgWidget now checked into OSG SVN trunk
Hello Robert, Regarding osgWidget's examples, should their CMakeLists.txt files use the SETUP_EXAMPLE() macro as do all the other OSG examples? I would assume so since this will make things more consistent. If so I can help convert them to use this macro. Also, do we want osgwidgetversion as an example? Since osgWidget is now part of core OSG, should it have its own version? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget now checked into OSG SVN trunk
Hi Robert, Regarding osgWidget's examples, should their CMakeLists.txt files use the SETUP_EXAMPLE() macro as do all the other OSG examples? I would assume so since this will make things more consistent. If so I can help convert them to use this macro. Sorry for spamming... I've done the conversion to use SETUP_EXAMPLE in the osgWidget examples, and it's finishing up building now. All seems well. I'll send the files to osg-submissions. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget now checked into OSG SVN trunk
Hello Robert, Jeremy, Thanks in advance for you assistance on testing. Once it looks like things are building across all our main platforms I'll go ahead and tag another dev release. Builds on Windows Vista, VS8 here, with the previously posted fixes and the changed osgwidget example CMakeLists.txt files. I'm getting some errors in the osgWidget examples which I didn't get when osgWidget was separate from OSG though: osgwidgetbox doesn't display anything osgwidgetshader can't find the shaders, even if I updated the OpenSceneGraph-Data from SVN and they're there... In osgwidgetnotebook, when clicking on a tab, I get osgWidget: Window [notebook] couldn't find the Widget [Tab_0] in it's object list. but the behavior seems correct (i.e. the correct tab becomes active). On startup, osgwidgetmenu gives osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values -72 and 0 osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values -72 and 0 osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values -72 and 0 osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values -72 and 0 osgWidget: Window [Menu_Grarar!?!] can't call resizeAdd() with the values -64 and 0 osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values -72 and 0 osgWidget: Window [Menu_Grarar!?!] can't call resizeAdd() with the values -64 and 0 (apart from the font not found messages) and there is no menu on screen. Finally, and this is something that bugged me before but should probably be fixed now that osgWidget is part of core OSG: it seems like the osgWidget examples set some values for the window (viewer.setUpViewInWindow(0, 0, 1280, 1024);) whereas they should just use the normal viewer and let the user set OSG_WINDOW, or --window, or whatever themselves. On Windows, particularly, using setUpViewInWindow(0, 0, 1280, 1024) gives a window whose extents go out of the screen, so the top of the graphics window is chopped off... Let me know if there is any more testing I can do. The next step once we fix these issues is probably to get a few screenshots to make sure the output is correct w.r.t. what you expect. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget now checked into OSG SVN trunk
Hi Jeremy, Ah, interesting. I always figured I was doing folks a favor by hard-coding a small size, but code can certainly be added to have it behave as you suggest. Well, I (and most people with 19 inch monitors) have 1280x1024 native resolution, so your window should fill the whole screen, but it's the 0,0 that actually causes problems. On Windows, if you give (x,y) = (0,0), then the top of the window frame is outside the screen so you can't drag it to move it! I always found that weird. In any case, an OSG example should just use the default viewer.run() and let the environment variables / command-line args determine how the window should look. And it will actually be less code... Remove that setUpViewInWindow line :-) The key is to make sure that the orthographic camera is properly resized properly, which should be done by the ResizeHandler object. The ortho camera should be sized appropriately for the screen anyways, shouldn't it? I thought that was default OSG behavior... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget now checked into OSG SVN trunk
Hi Jeremy, It's all up to the ResizeHandler though; if you wanted to ALWAYS work in some coordinate space like 1024x768, it should be possible just by using (or perhaps not even using) a different ResizeHandler. The one I created in ViewerEventHandler, however, tries to make sure the WindowManager object always knows the exact pixel dimensions of the View. The question is will it be automatic? If, for a HUD, you always want to have pixel-exact mapping, then it should be automatic and not depend on what size the user sets his window to. I'll leave the details to you, as you're much better placed to understand what's involved. All I'm saying is that osgViewer supports users setting environment variables or passing command-line arguments to control how the window appears, and I think that in examples, these should not be overridden by hard-coding a window position/size. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.5.5 dev release
Hello Robert, I've been doing merges and bug fixes today, and now I'm ready to tag the 2.5.5, but first I need feedback on how well things hang together across platforms. This is the first dev release with osgWidget as part of the core OSG so this means that we really do need to test across as many platforms as possible, as it's the code first wide exposure. Builds fine on Vista, VS8. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Calling Wojciech Lewandowski - osgShadow improvements (LiSPSM)
Hello, I have asked in another thread (OpenSceneGraph-2.5.4 developer release tagged) if Wojtek's osgShadow additions/improvements could be integrated in time for 2.6. I'm talking about the additions mentioned in this post: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/28683 Wojtek has not yet replied, so I thought I'd send a message with a clearer title in case it just went under his radar... Wojtek, I would really like to see this in 2.6, and am available to do any testing required. Would it be possible to submit the improvements to Robert for inclusion? Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Calling Wojciech Lewandowski - osgShadow improvements(LiSPSM)
Hello Wojtek, Good to hear from you. I have been quite busy recently but I am still open to do this. I understand, I just didn't want to miss the 2.6 "deadline", because I think this is an important addition. Good to know you've discovered and fixed a few issues. I haven't used your code in production but I have tried it out with a few scenes and it seems to run well. I think you should probably send your code in its current state to osg-submissions, that way Robert can keep track of it and it's "formally submitted", even if there are some issues to fix after Robert looks at it. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Freetype Plugin on Windows.
Hello James, As Colin mentioned, the 3rdParty directory should be parallel to your OSG sources instead of being inside the build subdirectory as you have it now. For example: ...\somedir\OpenSceneGraph ...\somedir\OpenSceneGraph\build ...\somedir\OpenSceneGraph\include ...\somedir\OpenSceneGraph\src ...\somedir\3rdParty ...\somedir\3rdParty\bin ...\somedir\3rdParty\include ...\somedir\3rdParty\lib Then delete the contents of your build directory and re-run cmake to generate the project files, then you should see the freetype plugin in the solution file. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Calling Wojciech Lewandowski - osgShadow improvements(LiSPSM)
Hello Robert, Might I suggest that you do the same for your screenshot event handler :-) :-) Good suggestion... I had sent it to osg-users for people to test, but I agree, I'll send it in to osg-submissions. Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Plugin Problem, osgDB doesn't find plugins
Hello Ariasgore, I am using VS2008 and OSG 2.5.2, compiled from source (included plugins) Did you also compile the 3rdParty dependencies from source? There is currently no package of precompiled dependencies for VS2008, and it could be that using the precompiled 3rdParty dependencies for VS2005 with OSG compiled with VS2008 would cause this. I copied the whole osgPlugins-2.5.2 folder content to my bin output folder directly into it and into a subfolder for testing. No effect. The plugins should be in a subfolder called osgPlugins- under the directory where the OSG DLLs are found for your app. So if for example you are copying the OSG DLLs with your app, copy the osgPlugins- folder along with it (don't change the directory structure). So I basically have the osgdb_jpegd.dll and have no idea if I am missing something. For another plugin like png for example, the plugin also needs the libpng DLLs to be found, which is often the problem when loading the png plugin fails. But for jpeg, that is not needed since the jpeg library is linked statically into the plugin. So I suspect your problem is related to using VS2008 with 3rdParty dependencies compiled with VS2005. Note - I saw some reports that in release mode, it worked OK, but in debug it didn't. Regardless, it's much better to compile the dependencies properly to be sure you don't have problems with this in the future (plus, debugging is important!). Good luck, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] question about custom shaders with osgShadow
Hello Denis, Is there a way to use custom shaders with osgShadow? Yes, if you're using osgShadow::ShadowMap : osgShadow::ShadowMap::clearShaderList(); osgShadow::ShadowMap::addShader(fragmentShader.get()); osgShadow::ShadowMap::addShader(vertexShader.get()); Check src/osgShadow/ShadowMap.cpp (static const char fragmentShaderSource_withBaseTexture) for the default shader that is used, and use that as a base for your shader that would combine shadows and whatever else you want to do. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Plugin Problem, osgDB doesn't find plugins
Hello Ariasgore, This is not a linking error that must be fixed in the project, am i right? This is a missing dll as i suppose... You didn't say if you compiled the 3rdParty dependencies yourself or not. If you didn't do that, then stop trying other things and do that. It will eliminate the most likely reason that the plugins don't load. Re-read my previous message. The problem is that when dynamically loading a plugin, the error message is the same if the plugin is *not found* and if the plugin *could not be loaded*. I suspect that in your case, the latter is what's happening. And this could be caused by (among other things) the fact that the plugins' dependencies (libjpegD.lib in your case) were compiled with a different compiler than the plugins themselves. Good luck, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node needs to render at least one pixel
Hello Philip, I have thought of artificially moving it closer, or scaling it larger, but I was wondering if there is, instead, some attribute I can give it that says, "render me even if I'm small." I imagine you mean that you don't want your node culled even if it's very small. You can turn off small feature culling for a camera: camera->setCullingMode(camera->getCullingMode() & ~osg::CullSettings::SMALL_FEATURE_CULLING); Note that this will not change that it will be culled if it's outside the viewing frustum. It's possible to turn off all culling on a camera, but that would be a big no-no performance wise. You can also set a node not to be culled at all: node->setCullingActive(false); But again, this is pretty bad and should only be done in desperate cases... What are you trying to achieve? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Plugin Problem, osgDB doesn't find plugins
Hello Ariasgore, Pretty akward to get the 3rd party libs. Yes, that's true... I don't use VS2008 myself, nor does Mike Weiblen (who maintains the VS2005 3rdParty binaries). You have a few options: * If you have access to it, you could install VS2005 and use that for your OSG-related development. * You can ask on the libraries' forums / mailing lists to get help in compiling them (or get some binaries for VS2008 from some other source) * You can wait until there's an official 3rdParty binaries package for VS2008. I'm sorry I can't help more. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node needs to render at least one pixel
Hello Philip, I've implemented Jean-Sébastien's last suggestion, "node->setCullingActive(false)" on the MatrixTransform whose child is the image, but with no noticeable change. Does this setting affect a node's children as well? I've checked my viewing frustrum, and zFar is set to 3.0*(the scene node's getBound()). Well, culling tests each node's bounding sphere. In the case of a group (or subclass), the bounding sphere contains the bounding spheres of the children. If a given node is not culled, then the children's bounding spheres are tested. If the node is culled, then its children are also culled (since their bounds were included in their parent's bound). So if your laser is a group, you would need to setCullingActive(false) on the children too. Then, I don't know when the drawables are checked for culling too (they are culled with a bounding box). You might have to set a CullCallback on the Drawables that just returns false all the time. Then again, I'm not quite sure that's your problem. If you say you're rendering a line, then because of sampling, even if the line is not culled it might not render onto any pixels. Not quite sure how I'd fix that. Perhaps unprojecting the line's endpoints so they're in screen space and then drawing a line in screen space would work? Hope that gives you something to go with... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Light Simple Question ?
Hello Ümit, I am trying to effect the components of scene with green light. Although green light could effected two of sphere, couldn't get success on the terrain model. What can I do to effect the terrain with green light? Your terrain's texture is probably being applied in GL_REPLACE mode, instead of in GL_MODULATE mode. In GL_MODULATE, the texture color is multiplied by the shading value at a pixel to give the final surface color, and in GL_REPLACE mode the texture color is used directly (replacing the shading). Your options: * Check the terrain model file (you can try osgconv model.whatever model.osg if it isn't an .osg file, and then open it in a text editor to check for the texture application mode) and change it in the model. * Write a NodeVisitor that you will run on your terrain model after having loaded it to change any osg::TexEnv object from REPLACE mode to MODULATE mode (or just remove the TexEnv, since the default is MODULATE). I recommend option 1, your life will be much easier if your models are correct in the first place and you don't have to hard-code any changes in your program. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Light Simple Question ?
Hello Ümit, I have tried "terrainScaleMAT->getOrCreateStateSet()->setMode( GL_RESCALE_NORMAL, osg::StateAttribute::ON );" pattern but the result is same. There is no light effect on the terrain. I don't understand why? As Gordon said, check if your terrain has normals in the first place... Rescaling non-existing normals won't do anything :-) In your .osg file, check for normalArray under your Geometry, and check that normalBinding is set to PER_VERTEX. If the model has no normals, you can generate them with a modeling tool or use the osgUtil::SmoothingVisitor to create smooth normals across the surface. And BTW, yes you're right that the two suggestions I gave before were mutually exclusive, i.e. if you checked your model and changed the TexEnv in it you don't need a NodeVisitor to do the same thing... Oh, just another little thing, are you sure you're reloading the .osg model and not the original one without your changes? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node needs to render at least one pixel
Hello Philip, As this iamge shrinks into the distance, it (still) becomes invisible. My coworker (who is knowledgeable of OpenGL, but not so much of OpenSceneGraph), suggests MIP-mapping. I can move to that, it that's the next step. I don't think mipmapping will solve the problem, because that just changes how the texture is filtered when it is minified and magnified. If the quad covers 0 pixels, the filtering of the texture on the quad doesn't really matter, the quad still won't be visible. I really don't know what to suggest as your usage is pretty uncommon... You could try using an osg::AutoTransform to keep the quad the same size (in image space) independently of its distance from the viewer. Not sure if that's what you want. Otherwise, attach a callback to the transform above your quad, which would change the transform's scale when the distance from the viewpoint gets larger than some threshold. Sorry I can't help more. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to apply shadows to a scene with different shaders
Hello Denis, Is there a way to get Shadow texture from osg ShadowMap and pass it to another shader? Am I going in a right direction? Should I use osg ShadowMap to get shadow texture and pass it to different shaders or something else? I definitely think you should use osgShadow::ShadowMap if that saves you having to reimplement the same thing yourself! Check the top of the shader in src/osgShadow/ShadowMap.cpp, there is a bunch of uniforms with names that start with "osgShadow_". You can use those same variable names in other shaders, and you will then have access to the same data (as long as the shader is on a node in the subgraph under the ShadowedScene node). The sampler is the shadow map itself, and the others are parameters. So you can use the same code and just combine it with whatever else you want to do. Remember that lighting in CG is just a product (multiplication) of different values, and so you can multiply the value you get from the shadow2DProj() function call with other colors to get the result you want. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Default vertex shader
Hello Denis, When I added vertex shader, the object was not shadowed properly (with the same exact fragment shader). I suspect I'm doing something wrong with the texture coordinates in a vertex shader. I looked in ShadowMap.cpp, it has only fragment shaders. Do you know where can I find default vertex shader? When you start using a shader for one part of the pipeline (vertex or fragment) you need to do everything that that part of the pipeline used to do (and which is needed by your rendering). In the case of shadows, you'll notice that the code in ShadowMap.cpp adds an osg::TexGen that calculates some texture coordinates for texture unit 1. But that's the fixed pipeline, so you will need to calculate texture coordinates for unit 1 as glTexGen would in your vertex shader now that it has replaced the fixed-function vertex processing. Something like this should work, though you should probably have finer control over when these are calculated or not: gl_TexCoord[1].s = dot( ecPosition, gl_EyePlaneS[1] ); gl_TexCoord[1].t = dot( ecPosition, gl_EyePlaneT[1] ); gl_TexCoord[1].p = dot( ecPosition, gl_EyePlaneR[1] ); gl_TexCoord[1].q = dot( ecPosition, gl_EyePlaneQ[1] ); Note that ecPosition is: vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; I also assume you're transforming your texture coordinates for texture unit 0 properly: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; Just assigning gl_MultiTexCoord0 to gl_TexCoord[0] will work until you try to use a texture matrix (osg::TexMat)... I highly recommend you get/read the Orange Book, as this is all given there. You can also download the ShaderGen program from 3DLabs (now hosted on http://mew.cx/glsl since 3DLabs removed it from their site) which can generate shaders that emulate the fixed pipeline. Note that for speed, you should probably only use the features you need in your shaders, so I am not recommending that you generate a shader that does *all* of what the fixed pipeline would do... Just use what ShaderGen produces as a guide. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to release loaded model
Hello Robert, ref_ptr::release() is a specialist helper method with does an unref_noDelete on the referenced object - it deliberately doesn't delete the object that it's unrefecing. This functionality is required for functions that use ref_ptr<> locally but then have to pass a C* point of the object. I have seen this confusion before from people used to Win32 programming... In MFC (I believe), calling release() on something means you don't want to use it anymore, and you want it to release its resources (kind of like calling delete on a pointer, but it's a C API so there are no destructors, hence the release() function). So it means exactly the opposite of what it means in OSG. Kind of ironic, but perhaps that just means that people need to read the API documentation a bit before using a method in their code, because it might not do what they assume it does. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Default vertex shader
Hi Denis, I followed your advice. Everything works well. Thanks a lot for clarifying those things and for your help. Glad I could help, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test SVN of OpenSceneGraph in prep for 2.6 release candidate
Hello Robert, This evening I'll be making the OpenSceneGraph-2.6 branch, and tag this as release candidate 1. I'd greatly appreciate users testing out the svn trunk to make sure everything is compiling correctly across platforms. Builds fine for me. Vista 32bit, VC++ 8. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vpb on cluster example
Hello Greg, I'm new and I'm a little fuzzy on the versioning between VPB and OSG. It looks like for the example you have provided, we need an older version (2.3.6) of OSG. Do you know if there are plans to upgrade VPB to work with the latest releases of OSG or am I totally missing something? VPB is a bit of a moving target these days, but VPB from SVN should always work with OSG from SVN. Plus, you get the latest features too. Otherwise, check the VPB web page (http://www.openscenegraph.org/projects/VirtualPlanetBuilder) at the bottom of the page for how the older versions correspond to the OSG versions. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadow techniques status
Hello Dan, I'm looking at shadow techniques provided by the osgshadow nodekit for use in a production project. On the wiki it reads like only ShadowMap is production ready and all the others have problems. Is this the case? Or have the others been marked as experimental because they do not work across video cards? Here is my opinion on the current shadow techniques in osgShadow. Please take these with a grain of salt. And bare in mind that it's pretty easy to compare them yourself in your environment, because in most cases once you have one shadow technique running you can just swap out the ShadowTechnique that you give to your ShadowedScene for another one. Some tweaks are technique-specific but that will give you a good idea of what they look like in your context. osgShadow::ShadowVolume is broken, I have never seen it work correctly even with simple test scenes. There are inverted shadows everywhere (which hints at a problem with the z-pass or z-fail implementation). If someone wants to fix it, it would be a nice alternative to other techniques in some situations. osgShadow::ShadowTexture is the simplest technique. It works well for planar shadows, but for anything more complex you'll want at least osgShadow::ShadowMap. osgShadow::ShadowMap is what I would call the main workforce of osgShadow at the moment. It works well, is well tested, and is flexible. The only downside is the heavy shadow map aliasing you get on medium to large environments, but this is to be expected from a simple technique like this. It's really just the basic shadow map, no bells or whistles. osgShadow::SoftShadowMap is ShadowMap augmented with a simple filtering of shadows. The look is not too realistic (it smooths everywhere uniformly instead of considering distance of occluder for the width of the penumbra, which would be more complex of course) but it alleviates the aliasing problem somewhat. It can still only go so far if the environments are large. osgShadow::ParallelSplitShadowMap is the first of the "next-gen" shadow mapping techniques integrated into OSG. Essentially, it uses several shadow maps and is view-dependent which reduces aliasing dramatically. It's less tested, and until recently was completely broken. It now should work on most machines, but I'm still not confident enough about it to use it in production (my personal opinion - try it out and see for yourself). A few more techniques will soon be added (shortly after 2.6, hopefully) which are also view dependent, and will give some more choices to users. Essentially a shadow technique is a tool, and you just have to find the right one for your needs. If the wiki misrepresents this state of affairs, could you please update it or post the pages where there is outdated info here? Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadow techniques status
Hello Adrian, Parallel Split Shadow Map: it's still under *beta* release :-) i wait for a review by a specialist, ... please review, test this algorithme, for terrain, ... it's once of the most robust algorithm, but it has to be tested. I knew any talk about PSSM would get a reply from you :-) I was not criticizing your work. Please don't take it so personally. I only gave my opinion of the current state of things. As for review, someone will need to have the knowledge of the algorithm to be able to review it, and that isn't my case personally... It's a very specialized and low-level thing to be able to review this kind of code. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadow techniques status
Hello Jim, ShadowMap does suffer from bad aliasing when the viewpoint is very near the shadow. The Orange book (GLSL shader) describes how to super-sample the depth buffer to mitigate aliasing. Indeed, aliasing is a big problem with "vanilla" shadow mapping in almost all real-world cases. What you describe can easily be done by client code, using the osgShadow::ShadowMap::clearShaderList() and osgShadow::ShadowMap::addShader() methods with the appropriate shaders. One thing that you need to be careful about when replacing the default shaders is to use the same uniform names to access the shadow map sampler and other variables. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Win32 keyboard bug
Hello Robert, all, As for fixing this in an osg application one idea for Win32 could be to add a WM_ACTIVATE handler in GraphicWindowWin32::handleNativeWindowingEvent. Note that this method is virtual so the message can be handled by just deriving a class from GraphicWindowWin32 so you do not have to modify any code inside the osg library for this fix. When the application get focus some calls to GetAsyncKeyState can be made to check the status of the modifier keys and calls can be made to EventQueue::keyPress/keyRelease to update the osg modifier key mask accordingly. If you need to keep track of other keys that might have been released or pressed when your application did not have focus you have to call GetAsyncKeyState for them as well. I am currently testing out a pretty small patch to osgViewer::GraphicsWindowWin32 that will fix this issue. I decided to fix it in the core, because otherwise I'd have to construct all my GraphicsWindow objects myself (using a derived class) instead of using the factory methods (which create a GraphicsWindowWin32 directly). And fixing the problem at the root just seems like the right thing to do. I'll submit the fix to osg-submissions once I'm done, hopefully this will be considered a bug fix and will be integrated into 2.6. Just a heads up. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Win32 window resize mouse cursors
Hello all, Along with another Win32 fix I'll be submitting soon (see the "Win32 keyboard bug" message I just sent), I'd like to fix another issue that's been nagging me a bit, which is that when you move the mouse cursor to the edge of an osgViewer window, they don't change to the "resize" arrows. You can resize the window just fine, but the visual hint that you can is not present. I'm not extremely familiar with low-level Win32 windowing, but I'm willing to code up the fix if someone can point me in the right direction. Where should this happen? Is there a check based on mouse position in which if the position is near an edge of the window I can make the cursor change? Help from a Win32 guru would be appreciated, just to get me started. Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg make error in mingw
Hi Philip, Yes, that page is out of date. I will update it if I can figure out how to edit the darn wiki. Pretty easy: go to http://www.openscenegraph.org/projects/osg/wiki/Community/WikiLogIn Click the Login link at the top-right of any page and use the username and password on the page linked above. Then, at the bottom of pages which that user is allowed to edit, you will have an "Edit this page" button. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Changes on the 2.6 branch
Hi Paul, Good work on keeping on top of submissions while Robert is away. I think it will go a long way in convincing him to delegate a bit more :-) The 2.6 branch could definitely benefit from testing; please do so when you get a chance. I just realized that I needed to specifically check out the 2.6 branch since the latest fixes were checked in there. Just updating a working copy that points to the trunk will not get these. I just did that and started building, so I'll let you know how it goes. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE : Re: RE : Re: Converting a Drawable object to a Geometry object
Hi Franclin, I don't think you get the trick, from what you said, the only thing wrong is the ShapeDrawable. I think Ulrich gets the issue quite well, and is quite right. If the concrete type of the object is ShapeDrawable, you can't cast it to a Geometry. As he said, there's no parent-child relationship between those two classes, they're siblings in the hierarchy. http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a01139.html Check your favorite C++ book if you don't believe us. And in any case, the proof is in the pudding. Does the code work? No? Well then... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting texture coordinates of loaded models
Hello Franclin, osg::Drawable* draw = geode.getDrawable(i); //At this level, everything is ok since the Draw pointer contains at least one valid Drawable objects. If I use a TriangleFunctor, it will return all triangles of that Drawable :) // However I would like to get the texture coordinates as well. // HERE IS THE ISSUE. const osg::Geometry* geometryd = dynamic_castosg::Geometry*> (draw); // geometryd is dangling !!! Ok, two issues: 1. ShapeDrawable has special cases for when it gets a PrimitiveFunctor (which TriangleFunctor is a subclass of). See src/osg/ShapeDrawable.cpp, in particular PrimitiveShapeVisitor. It will calculate the vertices according to simple formulas that define the osg::Shape. That's how OSG does intersection testing with ShapeDrawables. It works because osg::Drawable defines the accept(PrimitiveFunctor&) method, and then osg::ShapeDrawable and osg::Geometry override it and implement it in different ways, using the data they have. 2. Is geometryd dangling but non-zero, or is it zero? If it's zero, then the draw pointer was not pointing to a Geometry instance (as was explained in the other thread) but probably to a ShapeDrawable. As explained, ShapeDrawable* cannot be cast to Geometry* because they are siblings in the class hierarchy. Seeing that TriangleFunctor gives you the triangles of the drawable proves nothing because of what I explained in 1. If geometryd is non-zero, then you have another issue. Possibly somewhere you're keeping a raw C pointer to something, instead of a ref_ptr, and the object is being deleted from under you when it shouldn't be. But to return to the ShapeDrawable and Geometry issue, they are fundamentally different. ShapeDrawable has no vertex / normal / color / texcoord arrays. It just builds a display list once to be able to draw the shape, that's all. It was designed to do quick debugging objects. If Robert were here he would say that he again regrets ever having created ShapeDrawable :-) There have always been questions sent to the mailing list of why something related to ShapeDrawable doesn't work, and it's always that the poster assumed ShapeDrawable to work like Geometry. Unfortunately, it doesn't, and unfortunately, this isn't made clear enough in the doxygen... I have plans to change ShapeDrawable to work more like Geometry - either to be a subclass of Geometry or have an internal Geometry instance. This would remove a lot of the special cases for ShapeDrawable in the OSG code, and would remove some confusion as well. But for the mean time, you have to accept what you have. You should probably do something like this: const osg::Geometry* geometryd = dynamic_cast (draw); const osg::ShapeDrawable* shapedrawable = dynamic_cast (draw); if (geometryd) { // Process it as an osg::Geometry, so get the normals and // texcoords from the arrays directly. } else if (shapedrawable) { // Process it as a ShapeDrawable. See the DrawShapeVisitor in // ShapeDrawable.cpp for inspiration on how to calculate the // normals and texcoords depending on the osg::Shape your // ShapeDrawable has. } Or else call a method that has two versions, one that takes an osg::Geometry* as an argument, the other that takes an osg::ShapeDrawable*. Or define your own PrimitiveFunctor that would not only calculate the vertices but also the normals and texcoords and store them so you'd be able to retrieve them. There's a few ways to do what you want. Hope this clears things up, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Changes on the 2.6 branch
Hi Paul, I just did that and started building, so I'll let you know how it goes. Builds fine on Vista, VC++ 2005, using CMake 2.6 to generate the build files, both in debug and release. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Changes on the 2.6 branch
Hi Paul, Just to let you know, I also tried a build on my Ubuntu VM and all went well. That's with CMake 2.4.7. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Saving an Image of the Viewer...?
Hi Phil and Justin, You can also look at the osgscreencapture example. There is now another alternative in SVN (or OSG-2.6rc1), the osgViewer::ScreenCaptureHandler. This is an EventHandler that captures the screen (code based on the osgscreencapture example) and then calls a CaptureOperation which can do anything you want. You can thus make a subclass of CaptureOperation that does what you need in the operator() method, and add a ScreenCaptureHandler to your viewer passing your CaptureOperation subclass to the constructor: viewer.addEventHandler( new osgViewer::ScreenCaptureHandler( new MyCaptureOperation(/* ... */) ) ); Now, the ScreenCaptureHandler responds to a keypress by default, but you could also make your own class based on the code there and respond to a button in a GUI or whatever. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, I have now tagged the 2.6.0 release candidate 2, you can grab it from the downloads page: I compiled right before you tagged, both on Windows Vista + VC2005 and on Ubuntu 8.04 on VirtualBox. All fine. I noticed though that Daniel Olivier is not in the AUTHORS.txt file, I specifically credited him for a fix to GraphicsWindowWin32.cpp (see svn log for revision 8706 on that file)... Any chance he can be added? It's only fair... Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, I have put together an initial draft of the press release (please review/comment/amend): http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG2.6 Forgot to mention, press release looks good. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgSim -losgText -losgUtil -losgTerrain -losgManipulator -losgViewer Not that I use Linux that much, or even know what these files are, but wouldn't you want to add osgWidget in the above? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I use different shadow-map for different object.
Hi GammerMax? How can I use different shadow-map for different object. For example, I have a big plane and two trees on it. When I put these 3 objects into one ShadowScene texture stretches too much. Two ShadowScene doesn't work together, so I can't use more than one texture by object. I don't think the current shadow map implementation can support this. You're welcome to dive in and code it up, or you could use a more modern shadow technique like Parallel-Split Shadow Map (in OSG now, but a bit buggy) or the upcoming LiSPSM (after 2.6). Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, I noticed though that Daniel Olivier is not in the AUTHORS.txt file, I specifically credited him for a fix to GraphicsWindowWin32.cpp (see svn log for revision 8706 on that file)... Any chance he can be added? It's only fair... I've recreated the AUTHORS.txt file directly from OpenSceneGraph-2.6 branch, and it now contains Daniel's name. Also updated the contributors page. Excellent, thanks a lot. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, I'm not expecting any cross platform build issues with the changes that Paul and I have made, but you never know, so I'd appreciate testing out the OpenSceneGraph-2.6 branch. OpenSceneGraph-2.6 branch builds fine for me (Vista, VC2005, CMake 2.6, debug+release). J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, I am now ready to tag 2.6.0, what feedback I have seen on the OpenSceneGraph-2.6 branch has been positive, but the volume has been rather light... so I guess you are all on holiday, preping for Siggraph, down the pub, doing paid work and other gainful pastimes rather than testing the OSG, or... far less plausibly that we're actually got a 100% perfect release on hands :-) Hey, that works for me :-) I'll do a build of the branch on Windows, give me 15 minutes and I'll tell you how it went. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenScenGraph-2.6.0-rc2 tagged
Hi Robert, I'll do a build of the branch on Windows, give me 15 minutes and I'll tell you how it went. Builds for me, usual config: Vista, VC2005, CMake 2.6, debug and release. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.6.0 release is available!
Hello all, Congrats to all, and thanks to everyone who helped with submissions, testing, suggestions, discussion and comments. Great release! J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About sort geometry
Hi Hesicong, I use gDebugger and it should be a way to do so, but it's quite boring to see the OpenGL commands. I must find a way to see the rendering detail in order to debug my program. If there's really no simple way to do this, it will be a pity. I think it's a real shame that NVPerfHUD is DirectX only. It looks like a really good tool for this kind of work. http://developer.nvidia.com/object/nvperfhud_home.html http://www.youtube.com/watch?v=UdDfvq0cL04 (really cool!) http://www.youtube.com/watch?v=S3_fP3-psJY Maybe this community could put pressure on NVIDIA to port it to OpenGL too? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About sort geometry
Hi Hesicong, Hard to decide. My current choice is OSG, but what is the future? I think your current choice is sound, and I think in the future the spotlight will come back towards OpenGL, so it's only a matter of time before we get such cool tools. (my opinion only of course) In the mean time, you can do what you want but it might be a bit more work. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About viewer.addEventHandler(new PickHandler())?
Hi ???, First of all, a little mailing list etiquette: 1. could you please sign your posts, it's polite to let others know how to address you. 2. When asking a new question, you should start a new thread (start a new message and not reply to another message). Now, to your question. scene->setUpdateCallback(new RotateCallBack()); ... My question is when next mouse PUSH , scene->setUpdateCallback(new RotateCallBack()) call again and new a RotateCallBack object. But can last time RotateCallBack object is auto-delete? You think there may be a memory leak? Look at the code for osg::Node (header and cpp file). osg::Node::setUpdateCallback(NodeCallback* nc) does some checking, but in the end, does this: // set the app callback itself. _updateCallback = nc; and _updateCallback is declared thus: ref_ptr _updateCallback; So it's a ref_ptr. Reference pointers manage the reference count of the pointed objects, and if that count goes to 0, the object deletes itself. So when setUpdateCallback() assigns a new callback to _updateCallback, the old one's ref count decreases by 1, and the new one's ref count increases by 1. If the old one's ref count comes to 0, it will delete itself. See osg::Referenced and osg::ref_ptr for details. As a general tip, I find that generating the doxygen documentation for the OSG source tree with INLINE_SOURCES = YES helps a lot when learning about how OSG does things. It gives you a nice way to browse the doxygen, and then go down to the actual code directly, with cross-references everywhere. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picking and Using Selection
Hello Luc, I am working at the moment on an university project and need some advices concerning picking and using selections in osg. My job is to generate and render a height number of polygons (+/- 12) and I need to pick them. In an first instance I have used the LineSegmentIntersector approach which was proposed by osg. But this solution was to slow for a high amount of geometries. In OSG 2.6 you can use the new kdtree to do your intersection. This will greatly speed up LineSegmentIntersections. You just need to enable the building of kd-trees, and then they'll be built and used automatically. See these two messages for details: http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/30914/ http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/30918/ As for GL_SELECTION, I don't know why it's not offered as an alternative in OSG, but I'm sure there's a good reason. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 回复: Re: About viewer.ad dEventHandler(new PickHandler())?
Hello YangXiao, 2. I have another question, when viewer.frame() which thread listening windows message(example mouse clicked,keyboard down ,up etc) ,and when i update my scene node in updatecallback,How threads guarantee sequence? To avoid threading problems I suggest you use an EventHandler to do this. For example: class MyEventHandler : public osgGA::GUIEventHandler { public: MyEventHandler() {} ~MyEventHandler() {} bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa) { switch(ea.getEventType()) { // Mouse button press case(osgGA::GUIEventAdapter::PUSH): { // ... do what you want here return false; } // Mouse button release case(osgGA::GUIEventAdapter::RELEASE): { // ... do what you want here return false; } default: return false; } } }; Then add this handler to the viewer: viewer.addEventHandler(new MyEventHandler); See the osgpick example for an example of a mouse event handler, and the osgkeyboard example for a keyboard event handler - of course you can combine both if you want (the same handle() method can be used for mouse and keyboard events). See the docs for the return values of ea.getEventType(). I suggest you read the OSG Quick Start Guide (free from http://www.osgbooks.com/) and then go around the reference docs (http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/) and the many included examples in the OSG source tree to get a feel for things. These are pretty basic questions that you could answer yourself by reading a bit (not that we don't want to answer them, but you'll wait longer for an answer). J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CG for Simulation BOF at Siggraph
Hello John, Lastly, I will bring chocolate to the BOF. All that AND chocolate? :-) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] light Callback
Hi Vincent, just one last question : my callback is a structure, and there is no traverse() method to call... is it a problem ? It overrides a base class which has a traverse() method, so just call that. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Examples osgviewerMFC resize artefact
Hi all, Here is what to do : 1) Launch osgviewerMFC sample 2) open a model 3) reduce window size (not maximised) 4) open an other different model 5) reduce second window size (not maximised) 6) close first window 7) try to resize second window This is also reproducible with stock osgviewer on Win32 when using 2 screens. 1. osgviewer cow.osg (make sure it starts on both screens, fullscreen) 2. press 'f' to go out of fullscreen mode. you will get 2 windows, one on each screen. 3. resize one of the windows (make it bigger), it works fine. 4. close one of the windows. 5. resize the remaining window (make it bigger), and you get the same artifact as in the attachment in the OP. I'm not a win32 programming expert so I can't really see what would cause this. The cow still rotates if you try, so the update loop is still being executed... I can't see why the viewport would not be updated to the new window size if one of the windows was closed... Perhaps someone more knowledgeable than me can trace through the code. And I can't test right now if the same happens on other platforms, but I suspect not. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Siggraph Web3D and related technologies BOFs at a glance
Hi John, Open Scengraph is sort of the Open Inventor functional clone that has a totally free license and is a Web3D technology [hope this assessment is reasonably correct]. For that last part, I think I saw someone doing a web browser plugin that uses OSG to display objects/environments in a web page, streaming the content over the net. I can't remember who or find a link though. Perhaps someone else will be able to refresh my memory. But other than that, OSG can read some Web3D formats, and perhaps more in the future (if the new OpenVRML library is integrated). I do have a “pocket universe” with 29 hours per day for those that have to attend more BOF’s. I like your sense of humor. :-) If only that were possible... When making my Siggraph schedule I had a massive 4-way conflict on Wednesday, and another smaller conflict on Thursday. It was a hard choice to make. So much to see, and I can't clone myself... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Has something changed regarding some of the plugin builds (the net plugin in particular) that might affect a Cygwin/Windows build
Hi Brian, So to test a theory it was socket problem I put the line back and rebuilt - still no hang - examples terminate normal and still no net plugin - plus others. So now I wonder if something else change in OSG that would keep these from building or what setting(s) might have something to do with why they would not build. I believe the net plugin has been deprecated in favor of the curl plugin. Correct me if I'm wrong. If you have libcurl, then you might just have built a curl plugin. In that case, try to load a file from the net (http://example.com/whatever.osg) and see if that works. Other than that, I don't know, since I don't use cygwin myself. What other plugins are missing? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] X model files
Hi Franclin, But it doesn't work for X files, although the same program works very well if I want to create an OBJ file. So I suspect it has something to do with X files. Some plugins only implement reading files in their respective format, not writing them. I suspect that's the case for the X plugin. In fact, I think the plugins that implement writing of models are the minority... A tool like PolyTrans might be useful, though it's not free. Some other free/open-source tool might exist that may do what you want, but I don't know. Google is your friend. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 回复: Re: 鍥炲�?Re : About viewer.addEventHandler(new PickHandler()) ?
Hello YangXiao, But this code sometimes success,sometimes fail! I means code run sequence: 1: PickHandler's pick() code; 2: draw scene code; or they run parallel? Yes indeed, they may run in parallel depending on your threading model. What you can do is set your node's datavariance to DYNAMIC. That will prevent that specific node's update/cull/draw to happen while another thread is doing things too. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Siggraph Web3D and related technologies BOFs at a glance
Hi Luigi, We have also released our (alpha) release of osg4web that should do exactly that. Yes, I saw that last night and thought it was a nice coincidence (perhaps not with Siggraph coming up... :-) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] please give your opinion on "plugins reading from a virtual file system"
Hello Boto, what do you think about this idea? There is a zip plugin, I've never used it but I think it just gets one file from a zipped file. Not sure. You could easily make a pseudoloader to do this I think, so that you could load files of the form mymodel.osg.myarchivefile.pak which would load mymodel.osg from a pak file called myarchivefile.pak (which could just be a renamed zip file). The loader would then have to convert the file names that mymodel.osg references to the .myarchivefile.pak form so that they're loaded correctly, for example if the osg file references textures which are also located in the pak file. But I don't think it's particularly hard, except for some corner cases such as where to split the filenames (because of course, they might have dots in them anywhere...) It would indeed be an interesting plugin to have. Kind of a generalized form of .ive or .osga files (which I believe only contain one model/database). (note that some or all of what I say above might be wrong, I am not an expert on the OSG file formats, I just use them). J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org