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
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));
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
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
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
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
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
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
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);
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
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;
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
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:
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
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
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
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
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
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
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
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
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,
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
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
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
___
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);
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
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
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);
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,
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
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:
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
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;
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
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
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()
{
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); //
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
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.
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
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
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
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
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
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
___
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.
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
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
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
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:
51 matches
Mail list logo