Re: [osg-users] [build] How to get a simple OSG example on iOS
No when i try to run the example_osgVieweriPhone i got a linker error at the end. I still wrote a topic about this. http://forum.openscenegraph.org/viewtopic.php?t=9047 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42469#42469 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Join my network on LinkedIn
Hello ppl, so sorry about this. Any kind of automatic process sent this email to the list. Regards, Alberto. 2011/8/9 Alberto Jaspe via LinkedIn mem...@linkedin.com [image: LinkedIn Logo] http://www.linkedin.com/ mingyue, Alberto wants to connect with you. Alberto Jaspe Independent CG Engineering and RD Manager at CEGA View Profile »http://www.linkedin.com/e/-qywqtf-gr4st7sj-4r/rsn/5890444/LXPj/ Accepthttp://www.linkedin.com/e/-qywqtf-gr4st7sj-4r/ki9l5dc0WBU2jCm_-ENl0WSMUV6C2kw9fBND0WJWSkAnjfMIiTR/blk/I108461582_125/6lColZJrmZznQNdhjRQnOpBtn9QfmhBt71BoSd1p65Lr6lOfPkOclYOe3kNdzgUc359bQINlkFxtkcUbPoUcPwTdP8Me3cLrCBxbOYWrSlI/EML_comm_afe/ © 2011, LinkedIn Corporation Adjust your invitation email settings.https://www.linkedin.com/e/-qywqtf-gr4st7sj-4r/ki9l5dc0WBU2jCm_-ENl0WSMUV6C2kw9fBND0WJWSkAnjfMIiTR/prv/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- *Alberto Jaspe* *Computer Graphics RD Guy* http://albertojaspe.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] In readNode, find the parent node that will be merged into
Hi Craig, Could you not do the update as a lazy operation, i.e. what for an update traversal to traverse the scene graph and then update it then as the update traversal NodeVisitor will have the whole parental path. The osgTerrain::TerrainTile::traverse() implementation found in src/osgTerrain/TerrainTile.cpp does something similar to this for finding the Terrain node that it's enclosed within. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] manual camera view matrix update
Hi, Thanks for your reply! Well, I've tried with the osg_ uniforms instead of the typical gl_ uniforms. Still not good. My model appears but the camera matrix uniform just doesn't update by using Code: _viewer-getCamera()-setViewMatrix(osgMat); The shader I am using is: Code: static const char gVertexShader[] = varying vec4 color;\n const vec3 lightPos =vec3(100.0, 100.0, 100.0); \n const vec4 cessnaColor =vec4(0.8, 0.0, 0.0, 1.0);\n const vec4 lightAmbient =vec4(0.1, 0.1, 0.1, 1.0);\n const vec4 lightDiffuse =vec4(0.4, 0.4, 0.4, 1.0);\n const vec4 lightSpecular =vec4(0.8, 0.8, 0.8, 1.0);\n uniform mat4 osg_ModelViewMatrix; \n uniform mat4 osg_ModelViewProjectionMatrix; \n uniform mat3 osg_NormalMatrix; \n void DirectionalLight(in vec3 normal, \n in vec3 ecPos, \n inout vec4 ambient, \n inout vec4 diffuse, \n inout vec4 specular) \n { \n float nDotVP; \n vec3 L = normalize(osg_ModelViewMatrix*vec4(lightPos, 0.0)).xyz; \n nDotVP = max(0.0, dot(normal, L));\n \n if (nDotVP 0.0) { \n vec3 E = normalize(-ecPos); \n vec3 R = normalize(reflect( L, normal )); \n specular = pow(max(dot(R, E), 0.0), 16.0) * lightSpecular; \n } \n ambient = lightAmbient; \n diffuse = lightDiffuse * nDotVP; \n } \n void main() { \n vec4 ambiCol = vec4(0.0); \n vec4 diffCol = vec4(0.0); \n vec4 specCol = vec4(0.0); \n gl_Position = osg_ModelViewProjectionMatrix * gl_Vertex; \n vec3 normal = normalize(osg_NormalMatrix * gl_Normal);\n vec4 ecPos= osg_ModelViewMatrix * gl_Vertex;\n DirectionalLight(normal, ecPos.xyz, ambiCol, diffCol, specCol);\n color = cessnaColor * (ambiCol + diffCol + specCol); \n } \n; static const char gFragmentShader[] = precision mediump float; \n varying mediump vec4 color; \n void main() { \n gl_FragColor = color; \n } \n; No idea what's going wrong... Cheers, Rubén -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42473#42473 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] manual camera view matrix update
Hi Rubén, Have a look at osg::State::_useModelViewAndProjectionUniforms to see if it's set to true. For builds the set the CMAke option OSG_GL_FIXED_FUNCTION_AVAILABLE to OFF this variable should be set to true by default. This member variable tells osg::State to pass the projection and modelview matrices setting to the associated uniforms. Robert. On Wed, Sep 7, 2011 at 9:31 AM, Rubén Díaz ruw...@hotmail.com wrote: Hi, Thanks for your reply! Well, I've tried with the osg_ uniforms instead of the typical gl_ uniforms. Still not good. My model appears but the camera matrix uniform just doesn't update by using Code: _viewer-getCamera()-setViewMatrix(osgMat); The shader I am using is: Code: static const char gVertexShader[] = varying vec4 color; \n const vec3 lightPos =vec3(100.0, 100.0, 100.0); \n const vec4 cessnaColor =vec4(0.8, 0.0, 0.0, 1.0); \n const vec4 lightAmbient =vec4(0.1, 0.1, 0.1, 1.0); \n const vec4 lightDiffuse =vec4(0.4, 0.4, 0.4, 1.0); \n const vec4 lightSpecular =vec4(0.8, 0.8, 0.8, 1.0); \n uniform mat4 osg_ModelViewMatrix; \n uniform mat4 osg_ModelViewProjectionMatrix; \n uniform mat3 osg_NormalMatrix; \n void DirectionalLight(in vec3 normal, \n in vec3 ecPos, \n inout vec4 ambient, \n inout vec4 diffuse, \n inout vec4 specular) \n { \n float nDotVP; \n vec3 L = normalize(osg_ModelViewMatrix*vec4(lightPos, 0.0)).xyz; \n nDotVP = max(0.0, dot(normal, L)); \n \n if (nDotVP 0.0) { \n vec3 E = normalize(-ecPos); \n vec3 R = normalize(reflect( L, normal )); \n specular = pow(max(dot(R, E), 0.0), 16.0) * lightSpecular; \n } \n ambient = lightAmbient; \n diffuse = lightDiffuse * nDotVP; \n } \n void main() { \n vec4 ambiCol = vec4(0.0); \n vec4 diffCol = vec4(0.0); \n vec4 specCol = vec4(0.0); \n gl_Position = osg_ModelViewProjectionMatrix * gl_Vertex; \n vec3 normal = normalize(osg_NormalMatrix * gl_Normal); \n vec4 ecPos = osg_ModelViewMatrix * gl_Vertex; \n DirectionalLight(normal, ecPos.xyz, ambiCol, diffCol, specCol); \n color = cessnaColor * (ambiCol + diffCol + specCol); \n } \n; static const char gFragmentShader[] = precision mediump float; \n varying mediump vec4 color; \n void main() { \n gl_FragColor = color; \n } \n; No idea what's going wrong... Cheers, Rubén -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42473#42473 ___ 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] manual camera view matrix update
It is weird... I've accessed the value with getUseModelViewAndProjectionUniforms() and it's set to true. :S Cheers, Rubén -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42476#42476 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Intersection of two lines
Hi, this maybe a stupid and simple question. I have two lines and i want to calculate the intersection point of the two lines. For both lines is have a starting point and the direction. Is there a function to calculate the intersection point? Thank you! Cheers, Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42478#42478 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intersection of two lines
Hi, Using a simple system equation you should find it. Just google it... Regards, Vincent. Le 07/09/2011 11:32, Andreas Roth a écrit : Hi, this maybe a stupid and simple question. I have two lines and i want to calculate the intersection point of the two lines. For both lines is have a starting point and the direction. Is there a function to calculate the intersection point? Thank you! Cheers, Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42478#42478 ___ 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] wxWidegts 2.9.2 OSG-3.0.1 and osgWxViewer
Hi, I have compiled OSG -3.0.1. When I run osgwxviewer I have a crashed in lightmodel.cpp line 61: static bool s_separateSpecularSupported = strncmp((const char*)glGetString(GL_VERSION),1.2,3)=0; It seems that glGetString(GL_VERSION) return a NULL pointer. What's wrong? Thank you for yours answers! Cheers, Laurent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42479#42479 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] wxWidegts 2.9.2 OSG-3.0.1 and osgWxViewer
Hi Laurent, Usually this is caused by not having a valid GL context. Could you check for a current context to confirm this. What threading mode are you running in? Cheers, Tony -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42481#42481 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] VRML plugin: help in compiling
Hi, I followed your instruction, but CMake didn't create plugins VRML project in the VS2010 OpenSceneGraph Solution.. :' Bye bye, Paolo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42482#42482 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] crush __lll_lock_wait_private () from /lib/libc.so.6
Hi, ... I build a osg app on one machine with linux5.x and Nvidia GTX 260 which works fine. Then in another maching my osg sometimes crash as follows: #0 0x00fad402 in __kernel_vsyscall () #1 0x0522ede3 in __lll_lock_wait_private () from /lib/libc.so.6 #2 0x051be6f6 in _L_lock_15258 () from /lib/libc.so.6 #3 0x051bdbb4 in free () from /lib/libc.so.6 #4 0x02755709 in ?? () from /usr/lib/libGL.so.1 #5 0x091fc9f8 in ?? () #6 0x1000 in ?? () #7 0x0004 in ?? () #8 0x in ?? () I am not sure what is wrong casue the core file leading me to libGL or libc.so which I never care before. I suspect it is some thing wrong with Nvidia driver,casue the new maching has a different card Nvidia Quadar 400,and I just copy my old osg lib to the new maching without recompiling it. There is another crash wich related to NvidiaCore.so and there are some 2D apps work with my osg app,so I am not quit sure what is wrong. so anyone face the sanme problem? Need advice! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42484#42484 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] VRML plugin: help in compiling
I think there is also another problem: probably the openvrmld.lib that I compiled has an error. Is it possible to have the openvrml.lib, openvrmld.lib and .dll ? Thank you! Cheers, Paolo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42485#42485 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] the near/far plane of two terrain model
Hi, ... I have two osga terrain model,A is a quite large country model,B is a quite small city model. I just put the city model above the country model,then I zoom in to see the city model ,it seems to been culled.Then I set the near/far plane ratio to 0.01 which solve the problem,however it take great cpu usage(from 10% to 60%),is there a better way to solve the problem?Thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42486#42486 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] VRML plugin: help in compiling
I don't have VS2010. My libs and dlls are build with VS2008. What does the compiler say when yout try to build openvrml-dl project? Maybe the main project openvrml is missing a dependency to the openvrml-dl.lib. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Paolo Piazzi Sent: Wednesday, September 07, 2011 1:13 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [osgPlugins] VRML plugin: help in compiling I think there is also another problem: probably the openvrmld.lib that I compiled has an error. Is it possible to have the openvrml.lib, openvrmld.lib and .dll ? Thank you! Cheers, Paolo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42485#42485 ___ 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] wxWidegts 2.9.2 OSG-3.0.1 and osgWxViewer
Hi, Thanks you for your answer. I don't understand what you mean with glcontext. in osgviewer.cpp I have append 2 lines in function /* Show the frame */ frame-Show(true); GLubyte *verGl=(GLubyte*)glGetString(GL_VERSION); HGLRC WINAPI =wglGetCurrentContext(); return true; verGL is NULL and is NULL too. Thread model is debug. With other examples without wxWidgets (osgGlviewer cessna.osg) everything is OK. After violation exception stack is msvcr90d.dll!strncmp(const char * first=0x, const char * last=0x1055db10, unsigned int count=3) Ligne 81 + 0x3 octets C osg80-osgd.dll!osg::LightModel::apply(osg::State __formal={...}) Ligne 61 + 0x3d octets C++ osg80-osgd.dll!osg::State::applyAttribute(const osg::StateAttribute * attribute=0x025d0dc0, osg::State::AttributeStack as={...}) Ligne 1596 + 0x13 octetsC++ osg80-osgd.dll!osg::State::applyAttributeList(std::mapstd::pairenum osg::StateAttribute::Type,unsigned int,osg::State::AttributeStack,std::lessstd::pairenum osg::StateAttribute::Type,unsigned int ,std::allocatorstd::pairstd::pairenum osg::StateAttribute::Type,unsigned int const ,osg::State::AttributeStack attributeMap=[7](((MATERIAL,0),{changed=true last_applied_attribute=0x0260a048 last_applied_shadercomponent=0x ...}),((LIGHT,0),{changed=false last_applied_attribute=0x025c85d8 last_applied_shadercomponent=0x ...}),((SHADEMODEL,0),{changed=true last_applied_attribute=0x0260a720 last_applied_shadercomponent=0x ...}),...,...), const std::mapstd::pairenum osg::StateAttribute::Type,unsigned int,std::pairosg::ref_ptrosg::StateAttribute,unsigned int,std::lessstd::pairenum osg::StateAttribute::Type,unsigned int ,std::allocatorstd::pairstd::pairenum osg::StateAttribute::Type,unsigned int const ,std::pairosg::ref_ptrosg::St ateAttribute,unsigned int attributeList=[2](((MATERIAL,0),({_ptr=0x0260a048 },0)),((SHADEMODEL,0),({_ptr=0x0260a720 },0 Ligne 2324 C++ osg80-osgd.dll!osg::State::apply(const osg::StateSet * dstate=0x02606af8) Ligne 508C++ osg80-osgUtild.dll!osgUtil::RenderLeaf::render(osg::RenderInfo renderInfo={...}, osgUtil::RenderLeaf * previous=0x) Ligne 74 + 0x17 octets C++ osg80-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo renderInfo={...}, osgUtil::RenderLeaf * previous=0x) Ligne 479 + 0x19 octets C++ osg80-osgUtild.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo renderInfo={...}, osgUtil::RenderLeaf * previous=0x) Ligne 1398 C++ osg80-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo renderInfo={...}, osgUtil::RenderLeaf * previous=0x) Ligne 424 + 0x17 octets C++ osg80-osgUtild.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo renderInfo={...}, osgUtil::RenderLeaf * previous=0x, bool doCopyTexture=false) Ligne 933 C++ osg80-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo renderInfo={...}, osgUtil::RenderLeaf * previous=0x) Ligne 1237 + 0x1b octetsC++ osg80-osgUtild.dll!osgUtil::SceneView::draw() Ligne 1443 + 0x37 octets C++ osg80-osgViewerd.dll!osgViewer::Renderer::cull_draw() Ligne 842 + 0xf octets C++ osg80-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext * context=0x025c3528) Ligne 888 + 0xf octets C++ osg80-osgd.dll!osg::GraphicsContext::runOperations() Ligne 756 + 0x33 octets C++ osg80-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals() Ligne 807 + 0x15 octets C++ osg80-osgViewerd.dll!osgViewer::ViewerBase::frame(double simulationTime=1.7976931348623157e+308) Ligne 645 + 0xf octetsC++ osgviewerWXd.exe!MainFrame::OnIdle(wxIdleEvent event={...}) Ligne 119 + 0x2c octets C++ Cheers, Laurent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42488#42488 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] iPad Simulator crashes when trying to run a simple example
H guysi, I successfully build and linked my App for the iPad but when I try to run the simulator it crashes. I get the following Output: CullSettings::readEnvironmentalVariables() DatabasePager::addDatabaseThread() HANDLE_NON_HTTP DatabasePager::addDatabaseThread() HANDLE_ONLY_HTTP CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() ShaderComposer::ShaderComposer() 0x70006e0 CullSettings::readEnvironmentalVariables() ShaderComposer::ShaderComposer() 0xa6009c0 View::setSceneData() Reusing exisitng scene0x713c8f0 CameraManipulator::computeHomePosition(0, 0) boundingSphere.center() = (1 1 1) boundingSphere.radius() = 0.866025 CameraManipulator::computeHomePosition(0x6827800, 0) boundingSphere.center() = (1 1 1) boundingSphere.radius() = 0.866025 Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 0x5d0ed300x75aaa8 GraphicsContext::registerGraphicsContext 0xa6027c0 ShaderComposer::ShaderComposer() 0xa602aa0 GraphicsContext::createNewContextID() creating contextID=0 Updating the MaxNumberOfGraphicsContexts to 1 GraphicsWindow has been created successfully. CameraManipulator::computeHomePosition(0, 0) boundingSphere.center() = (1 1 1) boundingSphere.radius() = 0.866025 CameraManipulator::computeHomePosition(0x6827800, 0) boundingSphere.center() = (1 1 1) boundingSphere.radius() = 0.866025 osg::State::_maxTexturePoolSize=0 osg::State::_maxBufferObjectPoolSize=0 GraphicsContext::getWindowingSystemInterface() 0x5d0ed300x75aaa8 shouldAutorotateToInterfaceOrientation for 1: YES shouldAutorotateToInterfaceOrientation for 1: YES GraphicsWindowIOS :: grabFocusIfPointerInWindow not implemented yet View::init() [Switching to process 28651 thread 0x5f0b] OpenGL extensions supported by installed OpenGL drivers are: GL_APPLE_framebuffer_multisample GL_APPLE_texture_2D_limited_npot GL_APPLE_texture_format_BGRA GL_APPLE_texture_max_level GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_IMG_read_format GL_IMG_texture_compression_pvrtc GL_OES_blend_equation_separate GL_OES_blend_func_separate GL_OES_blend_subtract GL_OES_compressed_paletted_texture GL_OES_depth24 GL_OES_draw_texture GL_OES_fbo_render_mipmap GL_OES_framebuffer_object GL_OES_mapbuffer GL_OES_matrix_palette GL_OES_packed_depth_stencil GL_OES_point_size_array GL_OES_point_sprite GL_OES_read_format GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_stencil_wrap GL_OES_texture_mirrored_repeat GL_OES_vertex_array_object OpenGL extension 'GL_ARB_vertex_shader' is not supported. OpenGL extension 'GL_ARB_multitexture' is not supported. OpenGL extension 'GL_EXT_multitexture' is not supported. OpenGL extension 'GL_ARB_vertex_program' is not supported. OpenGL extension 'GL_EXT_secondary_color' is not supported. OpenGL extension 'GL_EXT_fog_coord' is not supported. OpenGL extension 'GL_ARB_multitexture' is not supported. OpenGL extension 'GL_NV_occlusion_query' is not supported. OpenGL extension 'GL_ARB_occlusion_query' is not supported. OpenGL extension 'GL_EXT_timer_query' is not supported. OpenGL extension 'GL_ARB_timer_query' is not supported. GraphicsCostEstimator::calibrate(..) ShaderComposer::~ShaderComposer() 0x70006e0 OpenGL extension '' is not supported. Setting up osg::Camera::FRAME_BUFFER In my Code the error line ist this: _viewer-setCameraManipulator(new osgGA::TrackballManipulator); I dont know why the simulator crashes! pls help! Thank you! Cheers, Tobias -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42490#42490 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Skipping nodes in serialization
I was pondering this the other day and it occurred to me that the problem boiled down to the fact that some (if not all) serializers do not write via a subclass of NodeVisitor, and hence are unaffected by nodemasks. I wondered if you could simply make your node so it is ONLY visible to NodeVisitor traversal by subclassing the node and overriding the traverse function. e.g. Code: class NonSerializedGroup : public osg::Group { public: UnserializedGroup(osg::Group* unserializedGroup) : _unserializedGroup(unserializedGroup) { } void traverse(osg::NodeVisitor nv) { _unserializedGroup-traverse(nv); } osg::ref_ptrosg::Group _unserializedGroup; } graffy wrote: Hi, I have a graph that I serialize with a simple call to osgDB::writeNodeFile(), but it contains a node that is auto-generated when the application starts. Is there a way to exclude that node from serialization? I'm familiar with the setNodeMask() / setTraversalMask() mechanism used in visitor classes, but wasn't finding something similiar for serialization - nothing jumped out at me in the ReaderWriter docs, anyway. ... Thank you! Cheers, Joel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42491#42491 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] wxWidegts 2.9.2 OSG-3.0.1 and osgWxViewer
Hi, If I append in the function wxOsgApp::OnInit() this lines now I can see a cessna : frame-Show(true); wxGLContext *glContexte =new wxGLContext(canvas); canvas-SetCurrent(*glContexte); GLubyte *verGl=(GLubyte*)glGetString(GL_VERSION); HGLRC WINAPI =wglGetCurrentContext(); return true; Thank you! Cheers, Laurent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42493#42493 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] VRML plugin: help in compiling
Hi Paolo, The openvrml loader is basic right now and cannot handle any VRML file. I suspect that this is what you are running into. If you look at the function convertFromVRML (ReaderWriterVRML2.cpp:~247) you will find that the loader can only handle Group, Transform, and Shape nodes, a subset of openvrml. There have been dynamic casts in there in the past that didn't test for null (failed) results which in turn would cause a crash. If you want to test whether this is the cause of your problem, you should probably start by monitoring entry to the above function and checking the openvrml node type by looking at obj-type().id() (returns a string with node type). You could also look through your vrml file and see whether it uses tags other than the ones mentioned above. -Keith On Wed, 7 Sep 2011, Paolo Piazzi wrote: rmilh wrote: I don't have VS2010. My libs and dlls are build with VS2008. What does the compiler say when yout try to build openvrml-dl project? Maybe the main project openvrml is missing a dependency to the openvrml-dl.lib. openvrml-dl project was built correctly. I added a dependency to openvrml-dld.lib to openvrml project too. Now the osgviewerd.exe can fing the wrl plugin, but it gives me this error in http://imageshack.us/photo/my-images/685/errorosg.jpg/ -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42489#42489 Keith ParkinsU of R Center for Visual Science kparkins at cvs.rochester.edu Meliora Hall, Room 253 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] VRML plugin: help in compiling
Keith Parkins wrote: The openvrml loader is basic right now and cannot handle any VRML file. Thank you Keith! You are right! I need a framework to handle CAD-exported models and so I was trying to use OSG+VRML plugin. I can try to use the .3ds plugin, that works, though probably doesn't understand that the .3ds is animated, as exported from 3ds Studio Max. Keith, I think that you are the right people for this question: I want to build a little framework of Augmented Reality, that lets me grab an image, recognizes an object (through OpenCV) and superimposes an object like a VRML or 3ds. Do you think that I can do it if I work with OSG framework? Do you have any advice? I thank you in advance: for the moment I'm not a guru of c++ and graphic libraries.. :) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42495#42495 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] wxWidegts 2.9.2 OSG-3.0.1 and osgWxViewer
Hi Laurent, Under Linux there is a valid context returned from glXGetCurrentContext() in LightModel::apply(), so it is unnecessary to create another context as you have done. The depth buffer is set to 8 bits which is unusual. What happens if you set it to 24? Cheers, Tony -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42496#42496 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] wxWidegts 2.9.2 OSG-3.0.1 and osgWxViewer
Hi, I'm working with Windows Xp. Before I worked with osg2.8.3 and wxwidgets 2.9.1 with a compatibilty 2.8.0. Hence It was a wxWidgets 2.8.0 for wxGLCanvas. In a previous post some problems were listed http://forum.openscenegraph.org/viewtopic.php?t=5019start=0postdays=0postorder=aschighlight=wxwidgets Now with 2.9.2 I think (may be I'm wrong) that there is no glcontext when you call OSGCanvas. About depth with original source code and modifying following lines // create osg canvas //- initialize int *attributes = new int[7]; attributes[0] = int(WX_GL_DOUBLEBUFFER); attributes[1] = WX_GL_RGBA; attributes[2] = WX_GL_DEPTH_SIZE; attributes[3] = 24; attributes[4] = WX_GL_STENCIL_SIZE; attributes[5] = 8; attributes[6] = 0; There is still a a violation exception -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42497#42497 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] VRML plugin: help in compiling
On Wed, Sep 7, 2011 at 9:02 AM, Paolo Piazzi paolo.pia...@t3lab.it wrote: Keith Parkins wrote: The openvrml loader is basic right now and cannot handle any VRML file. Thank you Keith! You are right! I need a framework to handle CAD-exported models and so I was trying to use OSG+VRML plugin. I can try to use the .3ds plugin, that works, though probably doesn't understand that the .3ds is animated, as exported from 3ds Studio Max. Keith, I think that you are the right people for this question: I want to build a little framework of Augmented Reality, that lets me grab an image, recognizes an object (through OpenCV) and superimposes an object like a VRML or 3ds. Do you think that I can do it if I work with OSG framework? Do you have any advice? I thank you in advance: for the moment I'm not a guru of c++ and graphic libraries.. :) You might want to look at osgART for doing AR with OpenSceneGraph: http://osgart.org/wiki/index.php/Main_Page Ryan -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Stack around the variable 'viewer' was corrupted..?
Hi there, I have spent today implementing a class to handle a Wii remote in a basic console application. When I got that working, I imported the code into an openscenegraph project and everything still works lovely. The problem comes when the program ends. Even if I comment out all of the code associated with my WiiHandler class and just have a skeleton OSG app, the error still appears. Here is my Main.cpp code, just opening a blank OSG scene: pastebin. com/1ASYrpip (remove space, i cannot post links yet :( ) Has anyone else ever had a problem like this? My WiiHandler class is not yet linked up to any form of osg callback, the only way it has to update is by the getScreenPos() function. The fact that it breaks as it is executing the final bracket tells me that it is something to do with OSG's stack cleanup. I take it the dynamic memory is taken care of by the scenegraph (no tutorials i have seen say 'delete root')? Even if that is the case, my heap shouldn't be hitting my stack with a program as simple as this! Can anyone shed some light on the subject? Thanks, Simon -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42499#42499 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stack around the variable 'viewer' was corrupted..?
Ignore me. I'm being a tit as usual. (Still has the VS2008 osg version installed from when I was trying to fix ANOTHER titting problem I had with the Wiimote API.) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42500#42500 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Is the VPB 1.0.0 available?
Hi, I grabbed the svn root of VPB yesterday and have been trying to build it from source using CMake and Visual Studio 2010. I am using precompiled OpenSceneGraph 3.0.0 binaries and dependencies (which include gdal) I was able to configure and generate a Visual Studio 2010 project using CMake and the latest VPB src without any errors or warnings, but when I try to build the project in Visual Studio 2010, I get the following error: Error 1 error LNK2005: public: void __thiscall std::basic_ofstreamchar,struct std::char_traitschar ::`vbase destructor'(void) (??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in SpatialProperties.obj C:\Users\efahy\AER\GEMS\Scene\VirtualPlanetBuilder\build\src\vpb\osgDBd.lib(osg80-osgDBd.dll) vpb The file osgDBd.lib does not exist at the path in the error. It does appear in my OSG3.0.0 installation directory. This library is found in its correct place by CMake before generating the VS2010 project. I am pretty new to developing for Windows and this is only my second Visual Studio/CMake project so I could be making an obvious error but I thought I'd post this just to see if anyone had successfully build the latest VPB that is in svn/root that supposedly OSG3.0.0 compatible? I'd hate to spend a ton of time spinning my wheels on this if I would be better off waiting for the official VSP1.0.0 release. Any advice or thoughts are most appreciated. Thank you! Cheers, Ethan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42501#42501 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Is the VPB 1.0.0 available?
On 9/7/2011 11:43 AM, Ethan Fahy wrote: Hi, I grabbed the svn root of VPB yesterday and have been trying to build it from source using CMake and Visual Studio 2010. I am using precompiled OpenSceneGraph 3.0.0 binaries and dependencies (which include gdal) Which precompiled binaries are you using? -- 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
Re: [osg-users] [vpb] Is the VPB 1.0.0 available?
I cant post links until my 3rd post so this is a filler post. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42504#42504 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Is the VPB 1.0.0 available?
I am using the following: OSG debug from here: http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-debug-12681.7z OSG release from here: http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-release-12681.7z OSG 3ryparty from here: http://members.iinet.net.au/~bchrist/3rdParty_VC10_x86_x64.zip I am on Windows 7 Pro 32-bit. CMake version 2.8.5. Visual Studio 2010 w/ all latest updates. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42505#42505 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Is the VPB 1.0.0 available?
On 9/7/2011 12:56 PM, Ethan Fahy wrote: I am using the following: OSG debug from here: http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-debug-12681.7z OSG release from here: http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-release-12681.7z OSG 3ryparty from here: http://members.iinet.net.au/~bchrist/3rdParty_VC10_x86_x64.zip At a guess, this is your problem. You're using thirdparty libs compiled by someone else, possibly with different settings. Why not use the thirdparty libs from the same source? http://openscenegraph.alphapixel.com/osg/downloads/openscenegraph-third-party-library-downloads -- 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
Re: [osg-users] Question on decreasing latency for database pagers...
Hi Boon, On Wed, Sep 7, 2011 at 7:04 PM, Boon Wah boon...@gmail.com wrote: After some thought, I want to try to make the paging become more aggressive and load tiles further away from those in view. As my fly-pass is very fast, the paging mechanism must also 'cache' new tiles earlier. I am unfamiliar with OSG and require some help in doing so. Does modifying the setRange for the PagedLOD object help in achieving my objective? You can use Camera::setLODScale() to adjust the range used for PagedLOD child selection, this can be done at the viewer level rather than at the individual node level so it much more manageable . However, selecting high res children will result in a higher load on the CPU and GPU making it more likely that you'll drop frames. If you want to load tiles in quickly then best way is to use a solid state disk. You can also up the number of threads that are doing the database paging, see the DatabasePager API do details. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Is the VPB 1.0.0 available?
Hello Ethan I wonder if you have hit a problem reported earlier. see: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2010-August/044528.html It is reported as a bug in msvc, and I haven't tracked it for a while. Try and set /FORCE:MULTIPLE in the linker param section for the vpd library A more long lasting solution is to set this in a CMakeLists.txt: if(MSVC) if(${MSVC_VERSION} STREQUAL 1600) message(msvc2010 build fix /FORCE:MULTIPLE) set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} /FORCE:MULTIPLE) endif() endif() I don't have the sp1 for my msvc2010 so I don't know if it fixes this issue cheers Mattias On Wed, Sep 7, 2011 at 8:56 PM, Ethan Fahy ethanf...@gmail.com wrote: I am using the following: OSG debug from here: http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-debug-12681.7z OSG release from here: http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-release-12681.7z OSG 3ryparty from here: http://members.iinet.net.au/~bchrist/3rdParty_VC10_x86_x64.zip I am on Windows 7 Pro 32-bit. CMake version 2.8.5. Visual Studio 2010 w/ all latest updates. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42505#42505 ___ 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] Intersection of two lines
I am not aware of a function in OSG to do this, however, you can do it yourself. If you have a starting point and direction for each line, you can define each line parametrically as Line 1: P + rA Line 2: Q + sB where P,Q are the starting points and A,B are the unit direction vectors. The scalars r,s are what we want to solve for. This can be done by equating the two lines P + rA = Q + sB or rA - sB = Q - P For 2D, this is a simple 2x2 linear system. The scalars r,s can be uniquely solved for by using Cramer's rule (stable for small systems). Of course, this assumes that the lines are not parallel or on top of each other (check for this first). Once the scalars r,s are solved for, plug them back into Line 1 or Line 2 to get the point of intersection in your coordinate system. For 3D, the system above turns into an overdetermined system of equations (i.e. 3 equations and 2 unknowns) which does not have a solution except when the system contains linearly dependent equations. For the case where there is no solution, you can solve for a point of intersection in a least squares sense using the method of normal equations. This method is numerically stable for small systems. To do this, write the system above as Cx = d where C is a 3x2 matrix, x is a 2x1 column vector containing the scalars r,s we want to solve for, and d is 3x1 column vector. Using the method of normal equations, we can rewrite the system to be CtCx = Ctd where Ct is the transpose of C. This new system now becomes a 2x2 linear system which can be solved like the 2D case above. Hope this helps... -Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42509#42509 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org