Re: [osg-users] Blending in OSG

2011-04-29 Thread Mukund Keshav
Hi Sergey, Thanks a lot! that helped. Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38894#38894 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Blending in OSG

2011-04-22 Thread Mukund Keshav
Hi Everyone, i am trying blending in OSG and i tried this code: Code: osg::Geode* wireSphere = new osg::Geode(); osg::PolygonMode* polygonMode = new osg::PolygonMode(); osg::ref_ptrosg::ShapeDrawable sphere = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0,0,0), 3));

Re: [osg-users] OSG Stereoscopy (2)

2011-03-31 Thread Mukund Keshav
Hi, i even made the left and right parameters 0, and it still works! i looked into the example, but im not sure what im doing wrong. Could you please help? Thanks Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38111#38111

Re: [osg-users] OSG Stereoscopy (2)

2011-03-31 Thread Mukund Keshav
Hi Robert, Thanks for the support. It has been extremely helpful. im new to OSG, and this is part of our student project. We will try to work on it. Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38140#38140

Re: [osg-users] OSG Stereoscopy (2)

2011-03-30 Thread Mukund Keshav
Hi J-S, Well i made the following changes. But it doesn't seem to work. Code: osg::ColorMask *col1 = new osg::ColorMask; col1-setRedMask(true); col1-setMask(false, true, true, true); osg::StateSet *state1 = new osg::StateSet; state1-setAttribute(col1); Also, i tried changing the

Re: [osg-users] OSG Stereoscopy (2)

2011-03-29 Thread Mukund Keshav
Hi Robert, Thanks a lot. Will proceed as suggested by you. Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38004#38004 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] OSG Stereoscopy (2)

2011-03-29 Thread Mukund Keshav
Hi Robert, Well this is the code i have written so far, im getting two windows when i specify quadBufferStereo as false. Code: int main( int argc, char **argv ) { // if not loaded assume no arguments passed in, try use default mode instead. osg::ref_ptrosg::MatrixTransform

Re: [osg-users] OSG Stereoscopy (2)

2011-03-29 Thread Mukund Keshav
Hi J-S, Thanks a lot! It almost worked. i made the following changes: Code: camera-addChild(object.get()); camera1-addChild(object.get()); camera-setClearMask(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); camera1-setClearMask(GL_DEPTH_BUFFER_BIT); clearing only depth buffer for the

Re: [osg-users] OSG Stereoscopy (2)

2011-03-29 Thread Mukund Keshav
Hi Robert, Thanks. i have corrected those errors as per yours and J-S' suggestions. Well lastly, there seems to be some problem with getting the anaglyphs. im trying to obtain both since i can test anaglyphs at home. Code: osg::ColorMask *col2 = new osg::ColorMask; col2-setBlueMask(true);

[osg-users] OSG Stereoscopy (2)

2011-03-28 Thread Mukund Keshav
Hi Everyone, This is a continuation from my old thread on Stereoscopy. The thread had become a little huge, so i created a new thread. Well, as per the valuable suggestions from Robert and other members from the forum, i wrote the following code. Code: // = Left eye

Re: [osg-users] OSG Stereoscopy (2)

2011-03-28 Thread Mukund Keshav
Hi Robert, Thanks a lot for the reply. So this would be fine right? This is rendered in the same viewport by default right? // = Left eye osg::ref_ptrosg::Camera camera = new osg::Camera;

Re: [osg-users] Stereoscopy in OSG

2011-03-21 Thread Mukund Keshav
Hi Robert, We are using LCD shutter stereoscopy. So, wont we need to continuously change left and right images within the same viewport right? Sorry, i must be getting some things wrong here. So, i would be needing a quad-buffered enabled GPU to achieve it. Won't i need to do something like

Re: [osg-users] Stereoscopy in OSG

2011-03-21 Thread Mukund Keshav
Well, we are using a 120Hz stereo projector and the system has an Nvidia Quadro card. So, its a typical active stereo setup. So, the user would have to wear LCD shutter glasses to view the stereo. We did try the built in stereo provided by OSG. Code:

Re: [osg-users] Stereoscopy in OSG

2011-03-21 Thread Mukund Keshav
Thanks a lot JCL and Robert :) Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=3#3 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Stereoscopy in OSG

2011-03-19 Thread Mukund Keshav
Hi Robert, Thanks a lot, Well, as you had suggested, im trying to render two views with two slave cameras. This is after modifying an example code. So, in the same window, i render two different views, a left view and a right view. Just as an example, for the below code, how do i specify

[osg-users] Stereoscopy in OSG

2011-03-18 Thread Mukund Keshav
Hello Everyone, We are planning to build a virtual workbench in our project. For that, we are using LCD shutter glasses stereoscopy. The system would involve the virtual objects being projected with a -ve parallax, thus making them appear to pop out. The following link has an image. It pretty

Re: [osg-users] Stereoscopy in OSG

2011-03-18 Thread Mukund Keshav
Hello Simon, Thanks for the reply. i will check and let you know. Since i don't have the hardware at my place, it will take me some time to reply. Sorry for the delay. = Hello Farshid, Thanks for the response. Well is there a mathematical relation that we can use, to obtain

Re: [osg-users] Stereoscopy in OSG

2011-03-18 Thread Mukund Keshav
Hi Robert, Thanks a lot for the support. Well this looks a challenging task indeed. One of the first tasks I did with the OSG was to a proof of concept of using a haptic glove and immersive workbench to create a interactive virtual environment where would could pick up and touch items in

Re: [osg-users] Stereoscopy in OSG

2011-03-18 Thread Mukund Keshav
Hi Robert, Thanks a lot. This has been really helpful. So, basically i build two cameras(virtual cameras i mean). One camera matching left eye intrinsics and one camera matching right eye intrinsics. And making them separated by a certain distance. Also, in here, we intend to let the use

Re: [osg-users] Stereoscopy in OSG

2011-03-18 Thread Mukund Keshav
Hi Robert, Thanks again for the reply. You need to calibrate the trackers for the hand and the glasses to the coordinate frame of the display system if it's an external display system i.e. bench/powerwall/monitor, which is what I've been assuming. I've just realized that you could be using

Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Mukund Keshav
Thanks Chris, Andreas, Gordon. @Andreas. However, if you want to extract a regular terrain height raster from an OpenFlight database, I would say the best solution is to write an OSG application that simply intersects vertically with the terrain at equal distances and puts the result in

Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Mukund Keshav
Thanks again Andreas, im pretty new to OSG. im missing something here. intersect vertically with the terrain and put the resulting terrain heights in an image Now, how does the intersection yield me a heightmap? or a elevation data? If an elevation raster on disk is what you want,

Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-02 Thread Mukund Keshav
You won't need a height map at all :-) Wow! Cool! Was breaking my head over this! il look into them. Thanks a lot! i just looked into osgIntersection. Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37263#37263

[osg-users] Getting height data of a terrain(flt file)

2011-03-01 Thread Mukund Keshav
Hello Everyone, im using .flt files to load terrain. i loaded a sample terrain from the OSG data.(Joedirt.flt). i was wondering if there is a way to obtain the heightfield/heightmap for the terrain? i googled for .flt file format. i could not get any information on it. Could ot be a closed

Re: [osg-users] Getting height data of a terrain(flt file)

2011-03-01 Thread Mukund Keshav
Hi Robert, Thanks for the reply. Could you please tell where i can find the exact file format for flt files? Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37234#37234 ___

[osg-users] PLacing the osg objetcts in different locations

2011-02-05 Thread Mukund Keshav
Hi everyone, Well i tried using osgconv to place objects in world space. i tried this osgconv.exe -t 0,0,-2000 cow.osg cow1.osg i tried reading it in my program. But it just doesn't show anything. Code: viewer-getCamera()-setProjectionMatrixAsFrustum(-640, 640, -480, 480, 1900, 20);

Re: [osg-users] PLacing the osg objetcts in different locations

2011-02-05 Thread Mukund Keshav
Hi J-S, Thanks for the reply. i will look into it. Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36391#36391 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] PLacing the osg objetcts in different locations

2011-02-05 Thread Mukund Keshav
Hi Paul , Thanks for the suggestions. Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36394#36394 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Problem with setProjectionMatrixAsFrustum()

2011-02-02 Thread Mukund Keshav
Hi Everyone, im having some trouble setting up a frustum view. i used the following code: Code: viewer.getCamera()-setProjectionMatrixAsFrustum(-640, 640, -480, 480, 1900, 20); and i queried the frustum with: Code: viewer.getCamera()-getProjectionMatrixAsFrustum(a, b, c, d, e, f);

Re: [osg-users] Problem with setProjectionMatrixAsFrustum()

2011-02-02 Thread Mukund Keshav
Well, i saw a similar post in the forum. http://forum.openscenegraph.org/viewtopic.php?t=1780 So, my first query is clear. Well as for my second one. How is it the object is being projected if it is even placed before the near-clip plane? ie before 1900? i could not get this part. Thanks,

Re: [osg-users] Problem with setProjectionMatrixAsFrustum()

2011-02-02 Thread Mukund Keshav
Hi J-S, Thanks for the reply. Well, im not using a camera manipulator. This is what im doing: Code: int main() { // code here viewer.getCamera()-setProjectionMatrixAsFrustum(-640, 640, -480, 480, 1900, 20); osg::Matrix t; t.makeTranslate(osg::Vec3(0, 0, -1000)); //translate by 1000

Re: [osg-users] Problem with setProjectionMatrixAsFrustum()

2011-02-02 Thread Mukund Keshav
Hi J-S, But in your case, if you just want to not see your line (because it's closer to the camera than the near plane, and you want that near plane to stay set the way you've set it), do this before your frame loop:

Re: [osg-users] Problem with setProjectionMatrixAsFrustum()

2011-02-02 Thread Mukund Keshav
Hi J-S, Thanks a lot for the reply. You have been of great help. Show a little initiative, we won't be there to give you all the answers all the time! Sure. i think i have been a little lazy! i will do a thorough search in future, before asking any questions. Thanks a lot for the

Re: [osg-users] Inheriting multiple classes

2011-01-31 Thread Mukund Keshav
Hi Robert, Thanks for the reply. So in your case you simply add the Geode to the MarixTransform node and then the geode and all it's children then are transformed by it So, you mean this is fine? Code: osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform;

Re: [osg-users] Setting up matrices

2011-01-31 Thread Mukund Keshav
Hello J-S, Thanks for the reply. Why do you insist on using glut to learn OSG? Using the plain viewer is even easier: Absolutely. i did not realize it first since i was used to using glut. But now i realize the osgviewer is much easier and efficient. So, im currently using the method

Re: [osg-users] Inheriting multiple classes

2011-01-31 Thread Mukund Keshav
Well, the model is as such. So, there seems to be no problem. Thanks for the support. Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36189#36189 ___ osg-users mailing list

[osg-users] Inheriting multiple classes

2011-01-30 Thread Mukund Keshav
Hello Everyone, im pretty new to OSG. Well i tried inheriting Geode and MatrixTransform into a class(RotatePyramid) as follows: Code: class RotatePyramid : public osg::Geode, public osg::MatrixTransform { }; osg::ref_ptrRotatePyramid pyramidGeode = new RotatePyramid; int main() {

Re: [osg-users] Inheriting multiple classes

2011-01-30 Thread Mukund Keshav
Hi J-S, Thanks for the reply. Well what i needed was to provide the setMatrix() method with a Geometry. i mean to be able to use setMatrix when vertices are specified. i was just complicating it. osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform; mt-addChild(pyramidGeode); //

[osg-users] Setting up matrices

2011-01-29 Thread Mukund Keshav
Hello Everyone, Well, in on of my previous threads, i was advised against using glut. But i thought of using glut temporarily and get more familiar with the other classes. So, i modified osgviewerGLUT.cpp like this, in order to get some translation and rotation. Code: // global

Re: [osg-users] Linker error during execution

2011-01-28 Thread Mukund Keshav
Hi Mourad, Thanks for the reply. i have attached the project file and the source file. ... Hi Shayne Unless you're debugging into OSG code, I would not use the debug libraries. Well i am very new to OSG. im still looking into the classes. So i am still executing in the debug mode.

Re: [osg-users] Linker error during execution

2011-01-28 Thread Mukund Keshav
Hi Mourad, Well, i don't think i can attach a vcproj file. i tried but it did not appear. It is not there in the supported formats i suppose. Well, apart from the code, im linking the above mentioned libraries(im in the debug mode). and im linking as a multi-threaded DLL (/MD) Thanks, Mukund

[osg-users] Linker error during execution

2011-01-27 Thread Mukund Keshav
Hello everyone, i tried executing the very first tutorial provided in the OSG website(basic geometry.cpp). Well i got this error:(a link error) error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function public: __thiscall std::_Vector_const_iteratorclass

Re: [osg-users] OpenSceneGraph with glut support

2011-01-25 Thread Mukund Keshav
Hi Robert, im really sorry, i somehow missed out on your post on my first read. Thanks for the detailed explanation. Well im a student and looking at the vastness of OSG, i felt it would require quite a lot of time. So, i was looking for support from the lower level APIs. Thanks

Re: [osg-users] OpenSceneGraph with glut support

2011-01-25 Thread Mukund Keshav
Thanks a lot Shayne! That really helped. Cheers, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35976#35976 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] bad_alloc exception generated

2011-01-22 Thread Mukund Keshav
Hi Robert, Thanks for the reply. Yes, im working on Windows with VS. Well, i changed the linker settings to link with multi-threaded DLL. But it did not fix the problem. im being pointed to this: inline osg::Node* readNodeFile(const std::string filename) { return

Re: [osg-users] bad_alloc exception generated

2011-01-22 Thread Mukund Keshav
Hi, The problem was, i had linked the release libraries but was building in Debug mode. Solved it. Thanks for the support :) Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35896#35896 ___

[osg-users] OpenSceneGraph with glut support

2011-01-22 Thread Mukund Keshav
Hello, im using OpenSceneGraph for the past 2 days. Well, i would be needing it mostly for terrain rendering. i was wondering if i can use OSG with some low level gl functions? What i mean is, say im using OpenSceneGraph. Now i want to use some gl functions, can i use both together.

Re: [osg-users] OpenSceneGraph with glut support

2011-01-22 Thread Mukund Keshav
Hi Paul Martz, Thanks for the reply Generally speaking, OSG is not a scene graph toolkit for OpenGL. What I mean by that is, if you already have your own code for creating windows and contexts, setting view matrices, rendering, and swapping, and you simply want to add to that existing

[osg-users] bad_alloc exception generated

2011-01-21 Thread Mukund Keshav
Hi, i just installed OpenSceneGraph and i tried running this piece of code: im getting a bad_alloc exception. Could anyone point where the error is? Thank you! Cheers, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35878#35878

Re: [osg-users] bad_alloc exception generated

2011-01-21 Thread Mukund Keshav
Hi Roland, Thanks for the reply. Yes, i had some problem with posting the code. i tried editing but editing was disabled since my real name and username was the same. im not able to add code tags. im getting this: You must have 2 posts before you can post URL's/Links. il paste the code in my

Re: [osg-users] bad_alloc exception generated

2011-01-21 Thread Mukund Keshav
Here is the code: Code: #include osgViewer/Viewer #include osgDB/ReadFile int main( int, char ** ) { osgViewer::Viewer viewer; viewer.setSceneData( osgDB::readNodeFile( cow.osg ) ); return viewer.run(); } Thanks, Mukund -- Read this topic online here: