Re: [osg-users] QuadBuffer crash?Do you have?
Hi, Robert This morning, i've checked your suggestion: using osgviewer cow.osg --stereo QUAD_BUFFER It was same...the problem is still there...sometimes, I got frozen screen... Then we can say that should be a problem of Drivers or Hardware ? Thanks alot~ Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39927#39927 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] QuadBuffer crash?Do you have?
Yes Robert~ You are completely right~i checked with --SingleThreaded option, but it changes nothing...sometimes, it happened again. With the application that are working are based on OpenGL rendering. Because we are using QuadBuffer projectors and shutter glasses... It was a strange problem...I will post my issue to nVidia forum to have a try. Thanks a lot Robert. ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39938#39938 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] QuadBuffer crash?Do you have?
thansk alot Robert ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39908#39908 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] QuadBuffer crash?Do you have?
I'd like to provide an image when a crash happens: I hope someone can help me to fix this problem...I dont know whether it is a problem of OSG or not. [Image: http://i55.tinypic.com/69kxug.jpg ] ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39900#39900 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FrameBufferObject problems on OSG 2.9.11
this FBO issue will influence on QuadBuffer rendering?I got some quad buffer problem... ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39857#39857 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to make attenuation of Points?
Thanks alot Robert~ I will come to you if I have some questions regarding Points~ Thanks ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39739#39739 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] QuadBuffer crash?Do you have?
Hello everyone: Recently, i have got an issue of quad buffer stereo display...I'd like to know whether you have the same issue as I got. In the scene, only a cow.osg model is rendered with quad buffer mode, using osg::Displaysettings method. Here is the code I implemented: Code: #include osg/PositionAttitudeTransform #include osg/Group #include osg/Node #include osgDB/ReadFile #include osgViewer/Viewer #include osgGA/TrackballManipulator #include osgViewer/ViewerEventHandlers int main() { osg::Node* cowNode = NULL; osg::Group* root = NULL; osgViewer::Viewer viewer; osg::DisplaySettings::instance()-setStereo(true); osg::DisplaySettings::instance()-setStereoMode(osg::DisplaySettings::QUAD_BUFFER); osg::Vec3 cowPosit; osg::PositionAttitudeTransform* cowXform; cowNode = osgDB::readNodeFile(cow.osg); root = new osg::Group(); cowXform = new osg::PositionAttitudeTransform(); root-addChild(cowXform); cowXform-addChild(cowNode); cowPosit.set(5,0,0); cowXform-setPosition( cowPosit ); viewer.setCameraManipulator(new osgGA::TrackballManipulator()); // add the stats handler viewer.addEventHandler(new osgViewer::StatsHandler); viewer.setUpViewOnSingleScreen(0); viewer.setSceneData( root ); viewer.realize(); while( !viewer.done() ) { viewer.frame(); } } My problem is that, when i run the above program... sometime the screen is frozen, which means the mouse could not move on that screen, in this case: screen 0; the frame is frozen also; sometime after running few frames, the screen crashed with 2 separated views; sometime I can successfully run it. My environment: Win7 VS2008, osg2.8.3 from SVN and Compiled with CMAKE2.8.3 Hardware: Quadro Fx 5600, nVidia latest driver 270.xx, and DirectX11 KVM Other scenes can be successfully rendered in mode QuadBuffer , such as Virtools, Unity3D... Anybody can explain why i got quad buffer crash in my OSG scene? How can I fix this problem? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39808#39808 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to make attenuation of Points?
hello robert: After reading the GL_POINT_DISTANCE_ATTENUATION docs...i tried with osg there's no GL_POINT_DISTANCE_ATTENUATION definition in GL.h only: GL_POINT_SMOOTH GL_POINT_SIZE GL_POINT_SIZE_RANGE GL_POINT_SIZE_GRANULARITY regarding to GL_POINT Is there any example about using GL_POINT_DISTANCE_ATTENUATION to active point size distance attenuation in OSG? THanks a lot ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39714#39714 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to make attenuation of Points?
~ it doesn't work setDistanceAttenuation function is not clear... anybody can explain this function? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39630#39630 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange Transparent effect [image provided]
hello Delport you mean i have to split my model into lots of parts~ I could not do that, because all the millions objects are all real-time generated in GPU... Do you have another idea of that? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39635#39635 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to do attenuation of Points?
Hello everyone: how to do point attenuation? I have some code like: Code: osg::PolygonMode *pm = new osg::PolygonMode( 187 osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::POINT ); 188 stateset-setAttributeAndModes( pm, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); 189 } After this how to set attenuation of points? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39609#39609 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to do attenuation of Points?
like this:? _point = new osg::Point; _point-setDistanceAttenuation(osg::Vec3(0.0,0.,0.05f)); _stateset-setAttribute(_point.get()); I will test it. THanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39610#39610 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to get position of sub-drawable object from PositionAttitudeTransform
anybody knows that? using osg::Node* findNamedNode(const std::string searchName, osg::Node* currNode)? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39450#39450 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to get position of sub-drawable object from PositionAttitudeTransform
Hello I am wondering how to get position of sub drawable object from PositionAttitudeTransform. Two objects are created with osg::Cylinder and osg::Sphere, the I created two osg::ShaperDrawable...then declare an instance of geode class and attached tow Drawables to it, finally, added 'basicShapesGeode' as a child of PAT Code: osg::Cylinder* unitCylinder = new osg::Cylinder( osg::Vec3(0,50,0), 0.6f,100.0f); osg::Sphere* pointing = new osg::Sphere(osg::Vec3(0,100,0),1.0f); osg::ShapeDrawable* unitCylinderDrawable = new osg::ShapeDrawable(unitCylinder); osg::ShapeDrawable* unitSphere = new osg::ShapeDrawable(pointing); // Declare a instance of the geode class: osg::Geode* basicShapesGeode = new osg::Geode(); // Add the unit cube drawable to the geode: basicShapesGeode-addDrawable(unitCylinderDrawable); basicShapesGeode-addDrawable(unitSphere); osg::PositionAttitudeTransform* handMat = new osg::PositionAttitudeTransform; handMat-addChild(basicShapesGeode); handMat-setScale(Vec3(0.01,0.01,0.01)); root-addChild(handMat); Can anybody tell me how the get the position of osg::Cylinder or osg::Sphere from PAT? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39407#39407 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to update uniform not continually
Hello: I am wondering about how to update an uniform not continually. here is the sample code: Code: osg::Uniform* lightPosU = new osg::Uniform(LightPosition,osg::Vec3(0,0,1)); bumpMapState-addUniform(lightPosU); Then I would like to update lightPosU, from Vec3(0,0,1) to Vec3(0,0,10); As I know Uniform has a setUpdateCallback function which allows continually update one of concerned nodes once each frame, like this: Code: class updateBumpShader : public osg::Uniform::Callback { public: virtual void operator() ( osg::Uniform* uniform, osg::NodeVisitor* nv ) { float angle = nv-getFrameStamp()-getReferenceTime(); float x = sinf(angle)*.2f; float y = cosf(angle)*.2f; osg::Vec3 lightPos(x,y,.6f); uniform-set(lightPos); } }; then using following codes to setUpdateCallback Code: lightPosU-setUpdateCallback(new updateBumpShader() ); Is there a method to update the uniform only one time? just modify the value... I have to customize the setUpdateCallback function? Or Can I overwrite the uniform then re pass it to Shader? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39282#39282 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to update uniform not continually
Can I do like this? lightPosU.set (osg::Vec3(0,0,10)); then bumpMapState-addUniform(lightPosU); this is a right way to do that? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39283#39283 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to update uniform not continually
Thanks a lot Farshid Lashkari But I think I should first lightPosU.set (osg::Vec3(0,0,10)); Then adduniform Am I right? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39286#39286 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Dependencies missing when compile OSG
Hi, everyone When compiling osg source code, I followed the instruction here: http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies download 3rdParty_VC9sp1_x86_x64_V5.7z and put 32bit version in C:\OpenSceneGraph-2.8.4\3rdParty then add the ENV variable OSG_3RDPARTY_DIR to auto configure CMake But When I use Cmake to generate projectit reports that some of the libs are missing, i.e. jpeg, png, freetype. I am sure that I followed the instruction here: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio But, I've checked that if I use the dependencies from http://openscenegraph.alphapixel.com/osg/downloads/openscenegraph-third-party-library-downloads for example: Visual Studio 9 (SP1 9.0.30729, 2008) x86 32-bit windows-VS9.0.30729-x86-release.7z windows-VS9.0.30729-x86-debug.7z unzip them and put them in the same folder as above: C:\OpenSceneGraph-2.8.4\3rdParty Then rerun the CMake... it can find the libs, like png, jpeg...and project files can be generated properly. It seems some bugs here? thanks My environment: Windows 7 32bit/WindowsXP sp3 OSG 2.8.4 from SVN CMake 2.8.4 VS2008 SP1 /// Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39159#39159 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dependencies missing when compile OSG
Hello J-S I checked your solution, putting 32bit and 64bit in 3dparty directory It doesn't work...not only JPEG_LIBRARY but also JPEG_INCLUDE_DIR are missingworse than putting 32bit only solution... I dont know how to fix this problem I will take AlphaPixel dependencies to instead of original dependencies. Thanks [Image: http://i55.tinypic.com/apctvm.jpg ] Skylark wrote: Hello Nan, When compiling osg source code, I followed the instruction here: http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies download 3rdParty_VC9sp1_x86_x64_V5.7z and put 32bit version in C:\OpenSceneGraph-2.8.4\3rdParty then add the ENV variable OSG_3RDPARTY_DIR to auto configure CMake But When I use Cmake to generate projectit reports that some of the libs are missing, i.e. jpeg, png, freetype. I think you need to put the whole package (i.e. both the 32bit and 64 bit subdirectories) in that directory and make OSG_3RDPARTY_DIR to the directory containing both. The CMake scripts will automatically use the 32bit or 64bit depending on the type of build you're doing. But the other thing is, I'm not sure if the OSG 2.8 branch (which 2.8.4 is based on) has the CMake changes that use the OSG_3RDPARTY_DIR env var. I recently built OSG from SVN from scratch, using that same 3rdparty package, and setting the OSG_3RDPARTY_DIR to the right directory (the directory containing 32bit and 64bit subdirectories) and it worked fine for me. All the basic dependencies (jpeg, png, freetype included) were found. On the other hand, if the 3rdparty packages from AlphaPixel work for you, just use that... Or you can also specify the libraries and include paths manually, though that's a bit tedious. Hope this helps, J-S -- __ Jean-Sebastien Guay http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ 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=39164#39164 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Geometry Generated object UV texture?
Hi, Anybody knows how to set a UV coordinate on a geometry shader generated object? I tested my U-moving VS FS shader with a osg::Sphere and osg::box. The uv coordinate can be mapping properly in VS and FS When i apply this two Shaders to a Geometry Shader generated objectsthe texture2D mapping is not right... i think it should be a problem of having right UV on GS generated object? How can I give a UV to GS generated object? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39025#39025 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
Hello boss: Here are some details of my problem: In my Geometry Shader, i have some codes to generate objects in real time (i.e. triangles, these trangles constitute a surface). With VS and FS, i can set the gl_FragColor as i like.. But when applying a texture to the objects which are generated in realtime... it doesn't work as i wish... I guess that is the realtime generated object does not have right UV coordinates...like osg::box...or osg::sphere... is there a way of setting box mapping UV to the realtime generated UV? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39029#39029 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
the problem i am thinking is that: when we create an object like osg::box..then osg::ShapeDrawable* unitCubeDrawable then the box contain a right UV coordinate. the objects which are realtime generated do not have BOX UVso if i apply a texture to objsthere should be a problem... Right? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39030#39030 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
i am a beginner of OSG Could you provide me an example of that?or some links Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39037#39037 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] texture to shader parameter?
Hello everyone: i have a question regarding how to pass texture to shader There were some code in the tutorial, such as: Code: bumpMapProgramObject-addShader( bumpFragmentObject ); bumpMapProgramObject-addShader( bumpVertexObject ); osg::Uniform* lightPosU = new osg::Uniform(LightPosition,osg::Vec3(0,0,1)); osg::Uniform* normalMapU = new osg::Uniform(normalMap,1); osg::Uniform* baseTextureU = new osg::Uniform(baseTexture,0); bumpMapState-addUniform(lightPosU); bumpMapState-addUniform(normalMapU); bumpMapState-addUniform(baseTextureU); lightPosU-setUpdateCallback(new updateBumpShader() ); bumpMapState-setAttributeAndModes (bumpMapProgramObject, osg::StateAttribute::ON); osg::Texture2D* tankBodyNormalMap = new osg::Texture2D; tankBodyNormalMap-setDataVariance(osg::Object::DYNAMIC); osg::Image* tankBody = osgDB::readImageFile(TankBump.png); if (!tankBody) { std::cout couldn't find texture, quiting. std::endl; return -1; } tankBodyNormalMap-setImage(tankBody); bumpMapState-setTextureAttributeAndModes (1,tankBodyNormalMap,osg::StateAttribute::ON); Here, the example creates osg::Uniform* normalMapU = new osg::Uniform(normalMap,1); '1'is the initial value of normalMap? how to link to texture unit in shader? using (Am I right?) bumpMapState-setTextureAttributeAndModes (1,tankBodyNormalMap,osg::StateAttribute::ON); here the value of first parameter should be the same as initial value in the 'new osg::Uniform(normalMap,1);' and the way to have the 'tankBodyNormalMap' in bumpmap.vert, using gl_MultiTexCoord0 or gl_MultiTexCoord1? where we can find bumpmap.vert? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38982#38982 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] texture to shader parameter?
here it is: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/ShadersUpdating ledocc wrote: Hi Nan Can you provide link of tutorial you are talking about ? Cheer David Callu 2011/5/4 Nan WANG () Hello everyone: i have a question regarding how to pass texture to shader There were some code in the tutorial, such as: Code: bumpMapProgramObject-addShader( bumpFragmentObject ); bumpMapProgramObject-addShader( bumpVertexObject ); osg::Uniform* lightPosU = new osg::Uniform(LightPosition,osg::Vec3(0,0,1)); osg::Uniform* normalMapU = new osg::Uniform(normalMap,1); osg::Uniform* baseTextureU = new osg::Uniform(baseTexture,0); bumpMapState-addUniform(lightPosU); bumpMapState-addUniform(normalMapU); bumpMapState-addUniform(baseTextureU); lightPosU-setUpdateCallback(new updateBumpShader() ); bumpMapState-setAttributeAndModes (bumpMapProgramObject, osg::StateAttribute::ON); osg::Texture2D* tankBodyNormalMap = new osg::Texture2D; tankBodyNormalMap-setDataVariance(osg::Object::DYNAMIC); osg::Image* tankBody = osgDB::readImageFile(TankBump.png); if (!tankBody) { std::cout couldn't find texture, quiting. std::endl; return -1; } tankBodyNormalMap-setImage(tankBody); bumpMapState-setTextureAttributeAndModes (1,tankBodyNormalMap,osg::StateAttribute::ON); Here, the example creates osg::Uniform* normalMapU = new osg::Uniform(normalMap,1); '1'is the initial value of normalMap? how to link to texture unit in shader? using (Am I right?) bumpMapState-setTextureAttributeAndModes (1,tankBodyNormalMap,osg::StateAttribute::ON); here the value of first parameter should be the same as initial value in the 'new osg::Uniform(normalMap,1);' and the way to have the 'tankBodyNormalMap' in bumpmap.vert, using gl_MultiTexCoord0 or gl_MultiTexCoord1? where we can find bumpmap.vert? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38982#38982 (http://forum.openscenegraph.org/viewtopic.php?p=38982#38982) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (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=38985#38985 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] texture to shader parameter?
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/ShadersUpdating Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38986#38986 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] texture to shader parameter?
could you explain why here you used texCoord1? because of we setting '1' here? sset-setTextureAttributeAndModes(1,tex2D,osg::StateAttribute::ON); sset-addUniform(new osg::Uniform(tex,1)); i dont think so ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38990#38990 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Multitexture in Shader
i have got the same problemdo you have solution? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38992#38992 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] texture to shader parameter?
Normally, it should be like this. but, 'gl_MultiTexCoord1' you used is not right..i tested it...no texture is passed to shader if you use gl_TexCoord = gl_MultiTexCoord0; i =0,1,2,3 the texture is passed to Shader... only the gl_MultiTexCoord0 works~... do you know how to use gl_MultiTexCoord[i]i?i = 1,2,3,, Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38997#38997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] setTextureAttribute first Parameter?
Hi, Anybody can explain what is the meaning of first parameter of function void osg::StateSet::setTextureAttribute(unsigned int unit, StateAttribute * attribute, StateAttribute::OverrideValue, value = StateAttribute::OFF) what is the meaning of unit? The texture unit to be affected? If I have multi texture... I have to use different unit value? from 0-N (N= num of texture i am going to apply) Thx ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38963#38963 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to convert float to osgText::String
Hi, Tomlinson and robert thanks a lot for your ideas i usually use standard c method...sprintf should be another simple way I am thinking whether in OSG we have something more professional/directly... Thanks again. ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38871#38871 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] how to convert float to osgText::String
Hi, I have a simple question How to convert a float number to osgText::String in order to display with osgText::Text::setText function? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38855#38855 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Strange Transparent effect [image provided]
Hi, everyone~ I implemented GPU based MarchingCube algorithm in OSG 3D engine. But i have got something strange, here is the picture. [Image: http://i56.tinypic.com/wvcv87.jpg ] some dark gray levels disappear... I just put the generated osg::Geometry object into transparent with function and give an alpha value in fragment shader(constant, e.g. 0.5). sset-setmode(GL_BLEND)... Anybody can help me to solve this problem? the problem of DepthFunc?BlendFunc?AlphaFunc? how to fix this ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38300#38300 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange Transparent effect [image provided]
Hello , there's no alpha clip... Chris 'Xenon' Hanson wrote: On 4/7/2011 11:38 AM, Nan WANG wrote: I just put the generated osg::Geometry object into transparent with function and give an alpha value in fragment shader(constant, e.g. 0.5). sset-setmode(GL_BLEND)... You're not using Alpha Clip are you? -- Chris 'Xenon' Hanson, omo sanza lettere. 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 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=38304#38304 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange Transparent effect [image provided]
OK thanks alot leader.. I will check it... thx robertosfield wrote: Hi Nan, The artificat you are seeing is the very common issue seen with transparent meshes that are not depth sorted from front to back. There are various different techniques to address this issue. I'd recommend you do a search on the archives as this topic has been discussed many many times. Robert. On Thu, Apr 7, 2011 at 6:38 PM, Nan WANG wrote: Hi, everyone~ I implemented GPU based MarchingCube algorithm in OSG 3D engine. But i have got something strange, here is the picture. [Image: http://i56.tinypic.com/wvcv87.jpg ] some dark gray levels disappear... I just put the generated osg::Geometry object into transparent with function and give an alpha value in fragment shader(constant, e.g. 0.5). sset-setmode(GL_BLEND)... Anybody can help me to solve this problem? the problem of DepthFunc?BlendFunc?AlphaFunc? how to fix this ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38300#38300 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ 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=38305#38305 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange Transparent effect [image provided]
http://forum.openscenegraph.org/viewtopic.php?t=7144highlight=transparent+depth this should be solution? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38307#38307 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] compositeviewer and addeventhandler?
Hi, everyone: I have created a scene with 'osgViewer::CompositeViewer viewer' as root viewer. in CompositeViewer I add two 'osgViewer::View' one for each eye. My question is can I addEventHandler for my root viewer which is CompositeViewer? as I know we can addEvenntHandler for a osgViewer::View ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38015#38015 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] why zlib.dll is miising when execute .exe file
Thanks zonk the 3rdParty package I used is 3rdParty_VC9sp1_x86_x64_V5.7z x86 version~ i think it's not version problem. Ok, i have to add them to PATH environment variable. although, it was not mentioned in the introduction. But, there's no problem with previous OSG source code. Maybe using CMAKE 2.8.4 causes this error zonk wrote: Hi Nan, which version of the 3rdParty package have you downloaded? The current version is V5. You have to added your 3rdparty/x86/bin folder to your PATH. It contains the dll dependencies and has to be part of your path to allow osgviewer to find it. The environment variable OSG_3RDPARTY_DIR is not required to run OpenSceneGraph with this package, it is only available to allow CMake to find your 3rdparty package automatically. This makes frequent OSG rebuilds easier.. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37934#37934 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] why zlib.dll is miising when execute .exe file
Thanks Alji, I think the final solution is adding 3rdParty bin to my PATH...But with previous installation, there was no problem without adding 3rdParty to PATH. When i compile OSG, just path ACTUAL_3DPARTY_DIR to C:/OpenSceneGraph-2.8.3/3rdparty. it was prefect...i think it was a problem of using CMAKE 2.8.4? it is curious Alji wrote: Hello Nan Torben, You have to add the 3rdParty bin to your PATH otherise set the environment variable OSG_NOTIFY_LEVEL to a higher verbosity level such DEBUG_INFO or DEBUG_FP (by default it is NOTICE I think). Cordialement -- M. ALJI Mohamed 2011/3/28 Torben Dannhauer () Hi Nan, which version of the 3rdParty package have you downloaded? The current version is V5. You have to added your 3rdparty/x86/bin folder to your PATH. It contains the dll dependencies and has to be part of your path to allow osgviewer to find it. The environment variable OSG_3RDPARTY_DIR is not required to run OpenSceneGraph with this package, it is only available to allow CMake to find your 3rdparty package automatically. This makes frequent OSG rebuilds easier.. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37924#37924 (http://forum.openscenegraph.org/viewtopic.php?p=37924#37924) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (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=37935#37935 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] why zlib.dll is miising when execute .exe file
eh I think not only viewer requires zlib.dll, but also other .exe stopped by the zlib.dll is missing error... crying. If it is dynamic build... it means i have to add to PATH ? Thanks zonk wrote: Hi, 3rdParty package V5 uses zlib not as static build, therefore the viewer requires now the zlib dll. In older 3rdParty packages I used the static zlib and it worked without the dll. I had to change to dynamic zLib because I updated libpng and the new version caused some trouble with static zLib: It compiled well, but in the OSG compile process the png plugin required additonal zLib linking. To avoid polluting OSG project files, I changed to dynmic zLib. @All: Should the next package version switch back to static zLib (which means I have to add the png plugin cmake file) ? Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37937#37937 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] why zlib.dll is miising when execute .exe file
Cool~ That's fineThanks a lot zonk. I will pay attention to this error in my next OSG installation, although it was not mentioned in the introduction page. zonk wrote: Hi, every application which uses zlib requires zlib.dll. Yes, add the directory which contains zlib.dll to your PATH, and every application will be fine. There are also more than only zlib.dll which is in the 3rdparty folder and often required: also libtiff, nvtt, gdal etc. so I recommend to add the 3rdParty\bin to the PATH to use all available 3rdParty libraries. Any thoughts? Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37940#37940 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] why zlib.dll is miising when execute .exe file
OK chief here it is~ http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio waiting for your wonderful contribution. zonk wrote: Hi, Can you give me the link to the page? I'll update it.. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37942#37942 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] why zlib.dll is miising when execute .exe file
Hi, everyone As I installed windows7 on my laptop, i need to reinstall my OSG environment. Usually, i followed the instruction here: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio What i did on my computer: install VS2008 then sp1 of vs2008 3rdParty downloaded and put x86 folder in the right place then use CMAKE to generate .sln file in the separated folder like openscenegraph\build after compiling the osg project (both Release and Debug version) i did some important operations like: OSG_ROOT points to the base of the OSG file structure (the directory that contains include, src etc. subdirectories) OSG_BIN_PATH = %OSG_ROOT%\bin OSG_INCLUDE_PATH = %OSG_ROOT%\include OSG_LIB_PATH = %OSG_ROOT%\lib OSG_SAMPLES_PATH = %OSG_ROOT%\share\OpenSceneGraph\bin OSG_FILE_PATH = ???\OpenSceneGraph-Data-X.X Then, add %OSG_BIN_PATH% and %OSG_SAMPLES_PATH% to your PATH environment variable BUT, here is the problem: when I run the generated .exe in bin folderalways stopped by given error: zlib.dll (or zlibd.dll) is missing... Any body got the same error? how to solve that? BTW: When I copy one generated .exe file to 3rdParty\bin folder, it runs well.. I need to add OSG_3RDPARTY_DIR to PATH environment ??? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37921#37921 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: Marching Cube Example?
I create a prototype of Using GPU matching cubebut when I run it~nothing display.. i think it is the Shader Problem...Who can help me about it? All the structure a ready...I am looking for bugs or error in my code...I thing if i can successful run it ~ i will upload it here~ Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37682#37682 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] uniform array passing to Shader question
Hi, everyone I got a problem about passing uniform array to shader array. the problem is in my shader I have: Code: uniform vec3 vertDecals[8]; I have to pass uniform value from OSG to shader so how to create an uniform array in osg code and add 8 values that will be used in shader... I know how to declare a vec3array... like: Code: osg::Vec3Array* v = new osg::Vec3Array; v-resize(9); (*v)[0].set(0., 0., 0.); but how to deal with uniform? Thanks alot ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37691#37691 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Sharing vertex and normal buffer with another library
Hi, Sorry, may I ask where is marchingGPU.h header file? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36992#36992 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: Marching Cube Example?
What a nice idea you provide me~ I saw some examples in osgVolume But I dont know how to use/test these examples...could you give me a guide? Thanks a lot~ robertosfield wrote: Hi Nan, On Tue, Feb 15, 2011 at 5:04 PM, Nan WANG wrote: Is there a CPU or GPU based Marching cube algorithm example in OSG? osgvolume contains that? As others have already mentioned there isn't a Marching cube algorithm implemented in the OSG. There is support for iso-surface rendering on the GPU in osgVolume which uses ray casting fragment shader, perhaps this is sufficient for your purposes. Robert. ___ 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=36914#36914 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: Marching Cube Example?
Hi, OK, no problem, if i have have any success, i will share with you both. Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36777#36777 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: Marching Cube Example?
Hi, thanks everyone here to give me the ideas... I will try matching Cube GPU with OSG. Geomtery shader with OSG i think is the best solution. isn't it? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36730#36730 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Marching Cube Example?
Hi, Is there a CPU or GPU based Marching cube algorithm example in OSG? osgvolume contains that? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36698#36698 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] pUserData crash when run .exe in debug or release version
Thanks Martin Naylor, I found my problem, it is exactly what you said~I linked with vs2005 lib in VS2008. After I compile OSG in VS2008, this problem has been solved ~ Thanks for all concerning about this stupid question. Nan Martin Naylor wrote: Hi Nan, I don't believe its a bug in OSG itself, it's the stupid Microsoft debug libraries. I suspect you are linking against the third party libraries built for VS2005, hence its works ok in debug mode. It's certainly worth applying SP1 for VS2008, but you also must make sure you linking against the third party libraries built with the version of VS you are using. You could download the libs for vs2008 and use those and see if it builds/runs ok in debug mode? Let us know how it goes. Cheers Martin. -Original Message- From: [mailto:] On Behalf Of Nan WANG Sent: 09 February 2011 19:51 To: Subject: pUserData crash when run .exe in debug or release version Hi, everyone: When I compile osg2cpp.cpp (from example folder) in VS2005 sp1, both debug and relase version are correct. No problem of running them. But when I tried with VS2008, both debug and release version stopped by an error: Expression: _CrtIsValidHeapPointer(pUserData) Looks like: [Image: http://i53.tinypic.com/2yz0kl3.jpg ] BTW: in VS2008, in release version, running .exe file without VisualStudio IDE is okbut still some errors. What is the problem? Who to fix this bug? Install SP1 for VS2008? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36506#36506 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ 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=36525#36525 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] pUserData crash when run .exe in debug or release version
Hi, everyone: When I compile osg2cpp.cpp (from example folder) in VS2005 sp1, both debug and relase version are correct. No problem of running them. But when I tried with VS2008, both debug and release version stopped by an error: Expression: _CrtIsValidHeapPointer(pUserData) Looks like: [Image: http://i53.tinypic.com/2yz0kl3.jpg ] BTW: in VS2008, in release version, running .exe file without VisualStudio IDE is okbut still some errors. What is the problem? Who to fix this bug? Install SP1 for VS2008? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36506#36506 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Keyboard move camera position
Hi, I've created my 3D scene, and now I want to move camera's position in this scene, using keyboard controlling, like using some key lik A, S, W, D to move the camera... Is there any simple example of using keyboard handler? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36451#36451 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Keyboard move camera position
hello As i am newbie in OSG. ...could you tell me how to use FirstPersonManipulator in my scene? I copied 'FirstPersonManipulator' from %SVN%\include\osgGA to my project folder, then add it in my project. then add '#include osgGA/FirstPersonManipulator' above main() functionthen viewer.setCameraManipulator(new osgGA::FirstPersonManipulator()); then error like: error C2664: 'osgViewer::View::setCameraManipulator' : cannot convert parameter 1 from 'osgGA::FirstPersonManipulator *' to 'osgGA::MatrixManipulator *' do you know why? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36453#36453 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [QUESTION]Simple camera create and position?
Hi, I am really newbie in OSG. Here is one simple question I want to ask: How can I create a camera and set its position to (0,0,0) in the world and set it as the viewer default camera to render? Any example of using camera? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36418#36418 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [QUESTION]Simple camera create and position?
Hi, I could not fine source code on this topic. I tried these code, but nothing rendered, what is the problem? Code: osg::Node* tankNode = NULL; osg::Group* root = NULL; osgViewer::Viewer viewer; osg::Vec3 tankPosit; osg::PositionAttitudeTransform* tankXform; osg::ref_ptrosg::Camera camera = new osg::Camera; tankNode = osgDB::readNodeFile(cow.osg); root = new osg::Group(); tankXform = new osg::PositionAttitudeTransform(); root-addChild(tankXform); tankXform-addChild(tankNode); tankPosit.set(0,2,0); tankXform-setPosition( tankPosit ); viewer.setCameraManipulator(new osgGA::TrackballManipulator()); camera-addChild(root); osg::Vec4 bgColor(0.2f, 0.2f, 0.6f, 1.0f); viewer.setCamera(camera); viewer.setSceneData( root ); viewer.realize(); while( !viewer.done() ) { viewer.frame(); } Thanks Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36424#36424 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [QUESTION]Simple camera create and position?
Ok,thanks alot Robert. But could you tell me how to set current viewer's camera's position? Thanks again。 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36427#36427 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [QUESTION]Simple camera create and position?
Hi,robert I will look into these libraries. Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36429#36429 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Easy Question: What is difference between .osg file and .exe
Hi, I am newbie of OSG. Simple question: As I mentioned, osgviewer.exe can be used to display .osg file in different options... When I compile .cpp file from VS2005, it produces .exe file...which is can be executed directly. But, if i would like to create a 3D sence with interaction (Keyboard..ect) I have to use vs2005 to produce .exe file. The question is: how can I have different options (as in osgviewer option, we have stereo mode option) in the generated .exe file? VS2005 can create an osg. file ?which i can play with osgviewer? Is there any tutorial of using osgviewer in programming? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36242#36242 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about camera autoComputeHomePosition
Do you know how to set a projection referential camera? off-axis camera? Thank you! Cheers, Dromouse -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35622#35622 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [QUESTION]How Projection Referential Cameras Work in OSG?
Hi, everyone: I am trying to setup a VR system using OSG. Current, I want to learn how projection referential cameras work in OSG. One of the key features of the visualization component is the ability to use off-axis cameras (a.k.a Asymmetric frustum) The main idea of the projection referential cameras is to easily represent the displays of the VR installation inside the composition. As we know that the usual camera's viewing frustum is defined by: it position, orientation, field of view, aspect ratio and N/F clip plane... Projection Referential Cameras sets of a 3D plane in the composition as the projection referential of the camera. This 3D Plane is symbolized according to the actual dimensions and positions of a real screen. The viewing frustum of a projection referential camera is defined by: it position, it clipping plane(n/f) and 3D plane projection referential. [Image: http://i53.tinypic.com/33v29ab.jpg ] 3D sprite can be considered as projection ref~ Now the frustum can be asymmetric, as opposed to the usual cameras frustums. Anybody knows how to setup this kind of projection referential camera using python or OpenGL in OSG? ... Thank you! Cheers, Dromouse[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35623#35623 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] New book published - OpenSceneGraph 3.0 Beginner's Guide
Hello dear OSG-community, Later i will buy it ~Thanks Rui Best regards, Dromouse -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35620#35620 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org