Re: [osg-users] Render osgViewer::View main camera view solely to texture using FBO
Hi Adam, You need a graphics context to do any OpenGL work, whether this is provided by a pbuffer or now graphics window, or by the OS in case of phone OS's. For a desktop system you'd simply use a pbuffer, while it's use for RTT may be outdated one would still use it for an off screen context and don't consider it deprecated, unless specific driver developers plan to deprecate it, but doing so would break backwards compatibility so I think you should be fine. Robert. On 22 January 2012 22:59, Adam Bruce apalan...@gmail.com wrote: Hi, It's been a few weeks since I've exposed my lack of knowledge of OSG, so I figured I'd do it again. I'm having a bit of difficulty figuring out how to render a camera view to an FBO only when that camera is part of a View. I have no trouble in RTT when I simply place a camera in the graph manually, but I need it to be part of a view so that existing manipulators can be used. This could probably be done by attaching a pbuffer as a graphics context, but we're trying to not use deprecated functionality for the product. I also want to avoid drawing to any sort of hidden window, unless there's some sort of optimization under the hood that adds no performance overhead. Is there an easy way to have a View camera RTT using an FBO without the existing graphics contexts? Thanks, Adam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44966#44966 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Play audio files
Hi, thank you for your reply. I tried to use the code in the simple.cpp file before posting here and it didn't work for me. As you have said that this is the way to do it, I have given a second try to that code and, after some changes and tests, I have managed to make it work, so thank you! :) Now, the following question: is there a straight way to connect the audio from a video to osgAudio? I am using the ffmpeg plugin to read the videos and I get audioStreams as it is done in the osgmovie example. Thank you in advance. Best regards. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' Hanson Sent: viernes, 20 de enero de 2012 18:29 To: OpenSceneGraph Users Subject: Re: [osg-users] Play audio files On 1/20/2012 6:42 AM, Héctor Martínez wrote: I have downloaded and compiled osgAudio. Now I want to integrate it in my own OSG-based program. So, how can I just open an audio file and play it? I mean the simplest way, no need for complicated features right now. Something like: open(myAudio.wav); playAudio(); See examples/openal-lowlevel/simple.cpp. osgAudio::AudioEnvironment::instance()-init(); osg::ref_ptrSource bgsound = new Source; bgsound-stop(); osg::ref_ptrSample sample = new Sample(myAudio.wav); bgsound-setSound(sample.get()); bgsound-setGain(0.6f); // Lower gain (volume) bgsound-setLooping(); bgsound-setAmbient(); // Make sound ambient (i.e. not attenuated) bgsound-play(); // Start playing -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Play audio files
Hello Héctor You need to extend osg::AudioSink with the osgAudio code that you have working. Have a look at the osgmovie exemple. It (optionally) implements the osg::AudioSink interface using SDL. You need to do it using osgAudio (or whatever sound backend you prefer). cheers Mattias 2012/1/23 Héctor Martínez hector.marti...@sensetrix.com: Hi, Now, the following question: is there a straight way to connect the audio from a video to osgAudio? I am using the ffmpeg plugin to read the videos and I get audioStreams as it is done in the osgmovie example. Thank you in advance. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolytopeIntersector distance and Transform
Hi, Yes, I'm facing the same problem. I found a workaround by resorting intersections in a new container : for each intersection : - I compute the worldIntersectionPoint by transfoming the localIntersectionPoint in world coordinates - I compute the camera world position - worldIntersectionPoin distance It's a little slow, and it's only a workaround, but it works. Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44973#44973 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Change Texture in a given 3D model
Hi, is it possibile change texture image of a given 3D model? I have a 3D model coming from lightwave. I know the node* where i can find the texture (i.e Sun.tga). I'm wondering if is it possibile to change the SUN texture with another one (i.e MOON.tga) that has the same resolution. Moreover that texture would be applied in the same way of the previous one. PS: The only information i have is the name of the surface (geode) that contains the texture (created with uv map). Thank you! Cheers, Andrea -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44974#44974 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Page-in notification
Hi Robert, Thanks for the reply. When the object is loaded in, is it safe to begin performing intersection tests on the geometry? -B -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Sunday, January 22, 2012 8:49 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Page-in notification HI Brad, On 21 January 2012 15:48, Brad Colbert bcolb...@rscusa.com wrote: I'm sure this has been asked a few times but is there a way to be notified when a tile for a VPB database is paged in? We have some dynamically loaded buildings that we would like to re-clamp as the tile underneath pages. There isn't a specific page in callback, but you can use a osgDB::ReadFileCallback attached to the osgDB::Registry to intercept the read calls and keep track of when the objects are loaded in. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgexport for blender?
Maia Randria writes: Thanks Alberto. Which version of Blender and osgExporter ar you using ? Are you satisfied with the exported file ? I'm using blender 2.59 and the latest version from Cedric's repository. Currently I'm just exporting simple meshes and their associated skeletons, so I haven't had time for checking textures and materials. I have some trouble with this exporter: I am using Blender 2.61 and the last version of tetron: some parts are missing and the textures are not correct. I tried to install with Blender 2.58 + latest version of Cedric so as to try if this is due to versioning: but when I put everything (scripts/ Add-ons, etc.,) I can't check the checkbox of osg on the Blender window User preference. Your help is appreciated. This is a problem I have encountered as well. I have submitted a patch to Cedric (https://github.com/cedricpinson/osgexport/pull/5) in order to correct the issue. In the meantime, you can apply the patch by yourself. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3D models used in OSG ?
Hi John, Here I am back about Blender. When you said, don't forget Blender, I do not and have tried to do some work wit it. From Blender, there are several exporter: osg models, fbx, 3ds, collada. Which ones are the best exportes from Blender to OSG ? I installed the plugin from Cedric Pinson, but I had troubles about the resulted exported file when viewing with osgViewer (missing parts, bad texturing, etc.) ? Which ones export animation/armature ? Maia John Richardson wrote: Hello, The real question is how do you import models from commercial and open source packages into OSG and support for animations, Others can chime in technically on this... Yes, it does take artistic talent. However, your email is from Université Laval. So you have a perfect solution. Collaborate with the art department. However, I will give a synopsis of my process. I am not an artist. 0) The first step is buying the Wang Rui book on OSG. 1) Acquire Blender. 2) Acquire one or more commercial systems with large numbers of example models with an acceptable reuse license. Note: If your university has various numbers of 3-D modeling and animation systems take their various and sundry examples and export to VRML or COLLADA. Then examine their other export formats [File -- Export or whatever menu item does the trick]. The best of the proprietary formats are 3DS, LWO, OBJ. Now, when I say best or talk about VRML / X3D / COLLADA, I am talking about the file interoperability problem. These comments are just my philosophical workaround. So, now you have a lot of scene components. Either arrange them in your modeler of choice [originally before export with an artist] or import the exported examples and arrange them [you don't need an artist since I can do this]. I suggest that you give them useful names and if possible, give them useful names at the nodes that you may be interested in accessing via OSG for your simulations. There is no more advice I can give at this point on naming. The Web3D people tried with the H-Anim standard and other profiles to X3D [See the Poser character animation system if the university has one]. The problem domain is huge and nobody seem to be able to make train loads of money on the solution so there is no satisfactory solution. 3) Turn your yourself or your programmer collaborators loose on the OSG coding for import and scene manipulation. The coders should know the process for compiling/downloading. You already know how to access this list for advice. Also, note that there are lots of contributors to this list that can code if you have funding available [Guay, Hanson, Martz, Cigar, Osfield,insert name I left out here,...]. If your goal involves students, then I suggest that you approach the issue from a architectural perspective. There are a lot of architectural programs in the USD 50-150 range that export to VRML and probably 3DS and OBJ/LWO/DXF. These can be acquired at almost every Apple Store for the Mac and every Best Buy or Fry's or whatever giant Canadian electronics superstore is in your area for the PC [and possibly for the Mac] [Punch!;TurboCAD;...]. A nice city block or representation of Université Laval would be a starting point. Then just see if you can get a traffic or pedestrian simulation completed. This strategy is like using the iPhone's Siri [or Google Voice] as opposed to Dragon Naturally Speaking. The learning curve is a little bit easier. But DO NOT FORGET BLENDER [relatively steep learning curve]. The students need a portfolio. John F. Richardson -Original Message- From: [mailto:] On Behalf Of Maia Randria Sent: Thursday, October 27, 2011 12:26 PM To: Subject: 3D models used in OSG ? Hi, First, I am sorry if my questions seem naive, I am really a newbie in OSG/3D. My question is about the 3D models used by both of you in OSG: - do you create your own 3D models yourselves with OSG ? - or with other software like Blender, 3DS Max, Maya ? - or do you buy or export free ones. Creating such 3D models needs artistic abilites and a lot of time, that's why my questionning ? The next question is about the exportation between 3DS max (or Blender, whatover 3D modeler) to OSG: when exporting, for example, an animated 3D models from these 3D modelers, does OSG preserve these animations/texturing ? Or, all are lost and need to be redefined with OSG ? Thank you! Cheers, Maia ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44977#44977 ___ osg-users mailing list osg-users@lists.openscenegraph.org