[osg-users] "Tiling" data
Hi all I'm wondering if anyone could give me some advice - I'm working on a 3D viewer application that makes use of OpenSceneGraph. At the moment I'm loading large 2D slices of data into textures, and then using a fragment shader to colourise them. The slices of data are big (up to 150MB), and consist of 32-bit floating point data. I'd like to split the hunks of data up to reduce the amount of data being paged into the video card when a frame is rendered. I'm wondering what the best approach might be. At the moment I've got a single osg::Geometry created by osg::createTexturedQuadGeometry(). I initially thought I could keep this single geometry and just pass multiple textures through to my shader program, but it seems that sampler2DArray isn't supported on all the cards I need to support. I'm currently thinking of using multiple geometries for say 512x512 sized textures of my data, and overlapping them to avoid interpolation issues on the boundaries. I'm worried about seams appearing and other artifacts though, so I thought I'd ask the mailing list for advice before writing too much code! Thanks for any help, Cheers Grahame ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Unstable objects using osgART
Hello, I realize I'm bumping a 7 month old post, but I'd like some answers to be here for anyone looking! ARToolkit has a history function that can smooth out some jumpiness at a slight loss of accuracy. (Very slight in my small experience). Take a look at this page for some info: http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm Then you'll need to make a simple edit to the artoolkit plugin project in the osgART solution. (The line is there, it's just commented!) Build it again and build the "install" project. Good luck, Elliott -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31809#31809 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Problem Building OSG 2.8.2 with CMake 2.8 and VS2008
Hello, Well, I realized I could use the precompiled version of osg for osgART... :-* (That worked great!) I'd still like to know what I was doing wrong if anyone has any answers! Good luck to anyone else using osg and osgART! :D Thanks again, Elliott -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31808#31808 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] No dynamic Model load
Hi, we made a little driving simulator with different levels and we have a problem with dynamic loaded models from the ReaderWriter. We'd like to load all models when the level is changed and the scenegraph is created. After loading the models into the scenegraph, the simulation should start. When we just create the root node and attach it to our camera, the simulation starts and updates a few frames while the models still are loading. Models which are not in the camera's field of vision when the level starts, are loaded, when tey are in the field of vision for the first time. This makes our simulation have a litte framerate per second for a moment We tried to enable CACHING_ALL as ReaderWriter options and disabled the Optimizer for the graph, but it still doesn't work. So do you have any suggestions how can we load all objects at the point the scenegraph is created? Do we have to set any property to the viewer/camera? We are using osg 2.8.3. Thank you! Cheers, Theo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31805#31805 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DatabasePager and TextureObjects
I noticed a huge discrepency between loading an FLT with and without the DatabasePager. Before loading any database model, the number of TextureObject created is 16. When I load a model via readNode(), the number of TextureObjects created increases to 112 (for 96 textures objects for the model itself). However, when I load the same model from within the DatabasePager thread, then I get 173 TexureObjects created (157 TextureObjects for the model itself). Essentially, I noticed that loading tiles from within the DatabasePager requires lots more texture memory (confirmed by using glDebugger). Note: The StateSetManager is used the in the same manner for both cases. Any ideas? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31807#31807 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DatabasePager and CompileContext
I noticed a huge discrepency between loading an FLT with and without the DatabasePager. Before loading any database model, the number of TextureObject created is 16. When I load a model via readNode(), the number of TextureObjects created increases to 112 (for 96 textures objects for the model itself). However, when I load the same model from within the DatabasePager thread, then I get 173 TexureObjects created (157 TextureObjects for the model itself). Essentially, I noticed that loading tiles from within the DatabasePager requires lots more texture memory (confirmed by using glDebugger). Note: The StateSetManager is used the in the same manner for both cases. Any ideas? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31806#31806 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DatabasePager and CompileContext
Hi, I think there are a few problems with compiling GL objects with the DatabasePager (in OSG 2.8.2). The following topic sums it up pretty well: http://forum.openscenegraph.org/viewtopic.php?t=1032&start=0&postdays=0&postorder=asc&highlight=compilecontext So far, I was able to compile all the GL object from a compile context (by calling DisplaySettings::setCompileContextsHint(true)). However, my scene appears all white. It seems that the texture objects are not created, or are created but invalid from the rendering context. Any ideas? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31804#31804 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Implementing ReaderWriter in a class within application binary
Hi Robert, Thank you for the time you take to make your response, and the level of information you included in it. Unfortunately I think you may have misunderstood my original question. I was not inquiring about the possibility of serializing my own classes into the native binary format, but rather I was wishing to know whether a class that implements the ReaderWriter functionality (i.e. the readNode and writeNode methods present in all osgDB plugins) for a new format must be compiled into an external plugin (.so), or whether it can be incorporated directly into my application code, and compiled as part of my application binary. The instructions I was able to find on the wiki regarding plugin implementation is a bit sketchy, and only covered the possibility of helping the osgDB locate ReaderWriter plugins that are actually stored as external plugins and not compiled into my application. Additionally I was wondering what "proper plugin etiquette" is for plugins that read a format, but do not also write to it. I noticed some plugins conditionally return a Code: WriteResult(WriteResult::FILE_NOT_HANDLED); My question on this second issue is whether it is "better manners" for my ReaderWriter class to implement a writeNode function that ALWAYS returns FILE_NOT_HANDLED, or whether it is best to just leave the function unimplemented. Thanks, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31803#31803 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Hint for appropriate export format?
Hi Werner, the OpenFlight writer seam to work good, and lately there were improvements posted for the 3ds as well. The first one format is pretty well supported in the vis-sim, the later is well supported in 3D in general -Nick On Sun, Sep 19, 2010 at 4:34 PM, Werner Modenbach < werner.modenb...@texion.eu> wrote: > My application is creating a scene with standard Geodes (vertex arrays, > normal > arrays etc.) > > I would like to export the 3D structure for further processing in external > programs like "ansys" or to convert it in external converter programs into > appropriate formats. > > I was advised to use IGES as export format but I think it is rarely > supported > nowadays. What about VRML? > > Is anybody out there who can give me some info for at least having a > starting > point? > > Thanks for any hint and also many thanks to the osg team for the great > work! > > Werner > ___ > 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
[osg-users] The problem of translucent dialog with MFC+OSG
Hi,everyone I have a program with VS2005+OSG2.8.2, use MFC SDI to display OSG 3D scene. When pick a certain object in 3D world, I want use a modeless dialog to show the infomation. In the function of OnInitDialog, I do something below: Code: BOOL CDlgDataView::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE);// Set small icon #define LWA_COLORKEY 0x0002 #define WS_EX_LAYERED 0x0008 typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags); lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes; COLORREF maskColor=RGB(0,0,0); HMODULE hUser32 = GetModuleHandle("user32.dll"); SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes"); SetWindowLong(this->GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE)|WS_EX_LAYERED); SetLayeredWindowAttributes(this->GetSafeHwnd(), maskColor, 192, LWA_COLORKEY); FreeLibrary(hUser32); return TRUE; // return TRUE unless you set the focus to a control } when the information is on the top of the main window, it can not be seen. How can I solve this problem?Thanks! Cheers, Hunjun -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31798#31798 Attachments: http://forum.openscenegraph.org//files/transparence_191.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mac OSX and osgversion
Hi, I just began familiarizing myself with OSG, and immediately ran into an installation problem. I downloaded the OSG version 2.8.0 Mac OSX installer, since it was the most recent version with a Mac installer. It seemed to install okay, and the two-pyramid starter project worked perfectly in XCode. But at the command line the programs osgversion, osglogo, and osgviewer (sections 1.2.5 and 1.3 of the Quick Start Guide) were all reported as not found. I also ran "find / -name osgversion" and they failed to show up there, as well. So are these three commands not implemented for the Mac? If I rebuild a current version from source, will they be there? (I'm not afraid to do that if it offers promise for benefit.) Thank you! Cheers, Daryl -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31797#31797 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Get objects nodes in *.obj file
Hi, There are 3 objects in *.obj file. Is it possible to get their nodes in OSG in order to set different transformations? Thank you! Cheers, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31757#31757 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Hint for appropriate export format?
My application is creating a scene with standard Geodes (vertex arrays, normal arrays etc.) I would like to export the 3D structure for further processing in external programs like "ansys" or to convert it in external converter programs into appropriate formats. I was advised to use IGES as export format but I think it is rarely supported nowadays. What about VRML? Is anybody out there who can give me some info for at least having a starting point? Thanks for any hint and also many thanks to the osg team for the great work! Werner ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Blending Multiple Texture on one triangle mesh with coordinate control
Hi Brian, To do multi-texturing you simple need to assign a texture coordinate array per texture unit you want to address, with a texture coord per vertex. So if you want two texture's you'll need to assign two texture arrays. The method to use is osg::Geometry::setTextureCoordArray(unit, array). Then you need to set up with textures to use, which you use osg::StateSet::setTextureAttributeAndModes(myTexture, osg::StateAttribute::ON); A good example of geometry setup can be found in osggeometry, this doesn't do multi-texturing, but it does provide an code segment that sets up the StateSet and Geometry for a single texture, this code segment can easily be extended to do multi-texturing with the above suggestions. Another example that will be useful is osgmultitexture, this does multi-texturing, but rather than use another texture coord array it use tex gen to generate the coordinates. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Implementing ReaderWriter in a class within application binary
Hi Thomas, In svn/trunk there is support for extensible native binary format, the serialization scheme that underpins this also support reading/writing to ascii and xml format as well. This will of be part of the 2.9.9 I'll make next week. The author of this work is Wang Rui, and he's wirtten a number of posts of the list about it, as well as post an explanation on the wiki so go have a search for background reading. You'll also find examples of how to set up serializers in the src/osgWrappers/serializers/* directories. In previous stable versions of the OSG (i.e. 2.8.3 and before) there is only the .ive native binary, but this isn't extensible so doesn't support serialization of your own classes. Robert. On Fri, Sep 17, 2010 at 9:54 PM, Thomas Dickerson wrote: > Hey everyone, > Is it possible for osgDB to load classes implementing ReaderWriter > functionality out of my application binary, or must they be stored in a > separate .so in the plugin directory? If so, are there any special directions > I need to follow to get this working? > > Secondly, what is "proper" behavior for a plugin implementing only readNode > functionality? Do I leave writeNode unimplemented? Or should I implement > writeNode, but only return a WriteResult with a particular error status? > > Many thanks, > Thomas > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31786#31786 > > > > > > ___ > 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