Hi dewey,
The problem was that I had more than a single switch node and only one
attribute was getting turned on/off which I only noticed after zooming into my
scene.
I corrected it by writing a visitor accumulating all the switches and turning
each of them on/off.
Thanks,
Sanat
Hi,
I am trying to use an osg::Switch node in my scene to toggle on/off certain
sub-graphs.
the way I have my subgraph set up is:
I have a geode (textGeode) which is placed under a switch node and the switch
is then place below an LOD node.
Code:
annotationsSwitch-addChild(textGeode,
Hi Wang,
Sorry for my late response. I was away for sometime.
Your catch was perfect. It was erroneous data that was causing it. I made the
necessary changes to the source data and it works for the osg formats as well.
Thanks for your clear explanation of why it was not working for osg with
Hi,
I am creating a 3d geometry model and saving it out to osg, osgb, osgt and ive
formats.
I tried to view the saved files in osgviewer and strangely, I can only view the
ive file. The others (osg, osgb, osgt) are not visible in viewer as only the
background clear_color is seen. As can be
Hi Wang,
Sure, I'm attaching the files with this post. I was having trouble attaching
them in the morning, guess they didn't get attached after all.
Thanks,
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42352#42352
Attachments:
Hi Wang,
The large translation values are intended as they are UTM coordinate values
which can get pretty large.
I'm not sure whether these are reasonable in your application or there
is something wrong while saving to osg files. But these will cause the
bound of the entire graph too large
Hi Jose,
If you choose to go the NodeVisitor route, depending on how your model(s) are
built up in your graph - keep in mind you will need to collect the Transforms
along the graph and apply them to the geometry below or get the world
coordinates and transform the geometries accordingly.
I just remembered that TriangleFunctor is also useful for this task, in case
you haven't seen that already.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42359#42359
___
osg-users mailing list
Hi Hartmut,
I would take a look at the osgpick example. It covers a lot of the stuff you
might be interested in.
Thanks,
Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42360#42360
___
I was able to figure out a couple of mistakes that I had in my code, thanks to
Paul Martz.
Attached is the a very simple example program I made to test/understand the
bounding box and sphere creation sequence.
Thanks
Sanat
--
Read this topic online here:
Hi,
I am trying to create a QTreeWidget to represent the scene graph in a
hierarchical tree view. I used the thread
http://forum.openscenegraph.org/viewtopic.php?t=4486 as a starting point.
The code used to create the tree nodes is:
Code:
void
Hi,
I am trying to use the excellent application from osgworks - osgwbvv to draw
bounding spheres around any particular selected node in the scene graph.
The function used to draw the bounding sphere is below:
Code:
void OsgViewerWindow::drawBoundingSphere(osg::ref_ptrosg::Node node)
{
Hi Martin,
I'll take a look at the MVC in Qt.
Expanding on the last point you made, the fact that most tree structures such
as QTreeWidget, etc seem to have the option for only one parent node, is that
an enforced limitation on a scene graph being built - for example, someone
would have to
Hi Alji,
I did end up using MatrixTransforms and the one place where I found them easier
to use (i.e. more logical to achieve the functionality) was where I had to
apply simultaneous rotations around X, Y and Z axes.
Thanks again.
Sincerely,
Sanat
--
Read this topic online
Hi Paul,
Sorry for my late reply to your post. That is a very good point you bring up
about the units of different objects in a scene. When one uses data from USGS
in VPB to create a terrain, the rest of the objects have to be scaled up or
down to represent their real world size prior to be
Coincidentally that was the approach I was going to take:
Place some object of known size on my terrain and scale the unknown units
object accordingly, sort of digitally 'eyeballing' it. This empirical approach
seems to be the most appropriate way when dealing with objects of unknown units
that
Hi David,
I guess I am replying to a rather old post, but I'll try my luck anyway:
Adding to your post on getting the size of the terrain, I had a similar
question in mind. For a given terrain model (built using osgeart/vpb etc), is
there a way to ensure that models loaded on the terrain
Hi Alji,
Thanks for your reply.
Though I am not sure if I follow your post entirely:
rotation of a joint imply rotation of the rest of the arm, rather then
computing the Position of each part , you construct a hierarchy of MTs and
Multiplying one MT by another apply the change on the
Thanks Robert..I'll definitely take a look at that.
Thanks,
Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39755#39755
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi,
I am building a GUI where users can load individual cad models and then save
out the built up object as a single osg model.
I am interested in showing the user a symbolic view of the scene graph similar
to a flow chart where every node that is added by the user in the main window
is
Hi Sergey,
Thanks for your reply and suggestions. I will take a look at the link you
mentioned.
Regards,
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39272#39272
___
osg-users mailing
That is true. I will upgrade to newest build. :)
Thanks
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39255#39255
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi,
I have been trying to modify the osgViewerQtWidget example which has a
composite viewer embedded as a widget in a Qt main window.
I want to use a single Viewer instead and am thus far not successful. My Qt ui
is a simple main window with the central widget upgraded to a ViewerQOSG
widget.
Hi,
I have been playing around with the osgviewerQt example that came with osg
2.8.2.
Then I looked at the examples that are in the source for 2.9.9 and there seem
to be a lot more.
Is it recommended that I upgrade or have other users got successful and
acceptable results with 2.8.2 (or
Hi Glenn,
Yes that surely helped. I looked at the osg file generated by vpb and didn't
see the ellipsoid model in there. Just didn't strike me that I would have to
take a different route.
P.S. I tried accessing the osgEarth website a couple of times last week but it
seemed as though it was
Hi,
I am trying to place a model on a vpb terrain by supplying the lat-long
coordinates.
I followed a couple of threads in the forum that suggested to use the
CoordinateSystemNode and ellipsoid model. But that didn't work for me (or maybe
I am not following it right).
I have attached the
Hi Shayne,
Thanks for your reply. I have tried a few different things and have a few
questions from that:
First of, when I try something like this:
Code:
osg::ref_ptrosg::EllipsoidModel em =
csnVisitor.coordinateSystemNode-getEllipsoidModel();
if(!em)
{
std::cout ellipsoid model is
Hi Robert,
Thanks for your suggestion. I tried saving the files out as .ive and they look
perfect when viewed with osgviewer.
I was just curious to know, what might be the reason for this behavior ?
Thanks again
Sincerely,
Sanat.
--
Read this topic online here:
Hi,
I am having a peculiar problem. I am creating a geode and saving it out as a
.osg file. I am also adding this to the osgViewer to see the results of
creating the geode.
However to my surprise, the model looks correct when I see it in my program
using an instance osgviewer. As seen in
Hi Paul,
I set the OPTIMIZER flag to off in my environment variables in windows. But I
still get the same effect.
What are the other causes potentially, for this ?
Thanks,
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37912#37912
Thanks Robert.
Regards,
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37492#37492
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi,
I had a quick question if I can check for intersection/overlap between Polygons
of two different 3D models. In addition, is it also possible to find the
closest distance between a pair of 3D models as the shortest path between a
polygon on obj1 and a polgon on obj2.
I am aware that there
Hi Tom,
My scene graph structure is:
Root--Terrain
Root--group1--model1
--autotransform1
--shapefileNode1
Root--group2--model2
--autotransform2
--shapefileNode2
I am trying to pick for model1 and model2 in my
Thanks Tom. I will try that out.
Cheers,
Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37342#37342
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi Wang, Rob, Peter,
Thanks for your replies. I try using CylinderIntersector and post my feedback.
Cheers,
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37343#37343
___
osg-users mailing
Hi,
I want to test for intersection in my scene using a cylinder instead of a line
segment.
For example if my object is on a terrain I want to highlight all features that
are within an imaginary cylinder around my object.
I read about polytope intersector but it seems as though that is for
Hi Chris,
Ok. I will try that approach. But if I need to use several planes say something
like an octagon or even higher number of sides, will that reduce performance
terribly ?
Thanks,
Sanat
--
Read this topic online here:
Hi,
I have read through the example in the QSG (quick start guide) as well as
example programs for the Picking behavior.
I know how the eventAdapter, handle(), etc works. My problem is:
In my ctor for picking class I set the two nodes for which I want to check if
any of them have been picked.
The problem with the code was that I was not setting the matrix translation and
rotation correctly.
I was doing the following which was not working:
translateToCenter =
Code:
osg::Matrix::translate(osg::Vec3(shapefileVertexArray-at(i).x(),
Hi all,
I was wanting to use an AutoTransform as a label for 3D elements in my scene.
I have been able to create the Autotransform and add text, etc.
However when I try to draw a line between the position of the autotransform and
the bound of the object, I don't see any line drawn.
I found
Hi Jean,
I modified the code in the functions and it seemed fairly straightforward.
However, I notice that all the cylinders are rendered at the origin inspite of
me doing a glTranslate (which I have commented out now).
When I opened the osg file I noticed that the matrix had its last column
Hi Chris,
Thanks for the link. I'll take a look. Seems very promising.
Thanks
Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37089#37089
___
osg-users mailing list
Hi,
Hi,
I am working on an application that is currently using a Cylinder Drawable
object.
However I had read that if you have plans on using drawables in a final
application that needs high-performance then you probably should create your
own geometry library. (from osghelp site)
I am
Hi Jean,
Thanks for your post. It was very helpful indeed. (yes I mean ShapeDrawable)
My main reason for wanting to create Geometry is that I need to divide the
Cylinder object into primitives for further processing and the parser that I
had written doesn't seem to work with an osg file
Hi,
I have loaded a number of shapefiles using the shp plugin into my scene.
I am trying to display the attributes of my shapefile in a billboard. Though
right now I am a little confused if I can even access the attributes of my
shapefile in the OSG application
Hoping for some advise..
Hi Ullrich,
I followed the procedure suggested by you and it worked perfectly. However you
mentioned that the procedure below
But you should replace this with properly constructed geometry.
I didn't quite follow what you meant by that.
Also, I would like to save each individual geode
Hi,
I used osgdem to build a terrain using VPB. I now want to place an object on it
whose coordinates would be a random latitude-longitude.
I browsed the source and found the ObjectPlacer class. I assume that I will
need to use this. But I do not know how to correctly use its place() method
Hi,
I am trying to use osgTerrain together with vpb to achieve dynamic terrain
manipulation. After going through the interface for the various classes in
osgTerrain, I have a few questions: (whether I have understood right or not)
Using virtual planet builder (vpb) we generate a number of
Hi Robert,
I read up on osgTerrain and posted my question in a different topic:
osgTerrain: Terrain Class and TerrainTile Understanding
As I felt it would be better to put it under a different topic than this
general one
Thanks,
Sanat
--
Read this topic online here:
Hi,
I am trying to build VPB with the pre-built packages of osg (version 2.8.2 in
my case).
The version matrix in the vpb page tells me that I need vpb 0.9.10. However the
svn repository only has the latest which demands osg 2.9.5.
I wanted to know if earlier src versions could be made
Hi Jean,
That was very helpful. I got it built and running.
Just on a related note-
Does VPB store the terrain as a quadtree ? (the reason I am asking is because I
am trying to write an app to modify elevations in the terrain at real-time and
wanted to know the quickest way to find the
Hi Jean,
Thanks for your earlier reply. I can start working on that approach.
But I am having issues with osgdem:
osgdem is not allowing me to write out the file as I am getting the following
error:
Error: do not have write permission to write out file output.ive
Caught exception : Error:
Hi Chris,
That was it...I copied the plugins dll and it worked like a charm.
Thanks for helping me out.
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33897#33897
___
osg-users mailing list
@Torben
Yes, I want to do the modifications at runtime. It is mainly due to interaction
of actors with the terrain causing deformations.
My idea is also to modify the height value in the terrain grid and this height
value will constantly be updated and rendered to show a sort of real-time
@Robert:
I have read up on a bit of the techniques people have tries to use for this:
From what I've read, this is the approach:
Represent the terrain as Blocks. Blocks are the basic storage unit for data and
are used to transfer data from the CPU to GPU for processing.
The Blocks are made up
Hi,
I am trying to create a dynamic terrain that can show modifications to the
terrain in real-time.
I want to show an object removing earth from the terrain and show a hole in
that area.
Having read a few papers and other sources, I am confused how to go about
trying to achieve this in osg
Hi,
I just came across osgTDS and find it really cool. However, I wanted to know if
there is the following functionality intended in osgTDS: (I am open to using
any other plugin/library if that allows what I am trying to achieve):
If I have characters in my scene that are trying to deform the
Sure...what libraries/plugins are you looking at currently/ have looked at in
the past ?
Thanks.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33733#33733
___
osg-users mailing list
Hi Ulrich,
I wanted to know if the following is a worthwhile option:
I have the data as a shapefile (.shp) and need to create the 3D model from
that. I realize that osg can load shp files so is it a good option to modify
the plugin dll that loads shp files ? So that when it comes across a
Hi Ulrich,
Sorry for my late reply.
I will try these options out, though I have come to realize that it would be
better for me to create the cylinders prior to creating .ive files. I was using
osgGIS and I may be served well to use one of the filters in that to create a
cylinder ive and load
The code I hav is as below:
Every .ive file loads a line object around which I want to draw a cylinder
keeping that line as center.
Code:
int main( int argc, char **argv )
{
osg::ref_ptrosg::Group root = new osg::Group();
osg::ref_ptrosg::Node pipe1;
osg::ref_ptrosg::Node pipe2;
Hi,
I have a number of .ive files that are simple line features. I am trying to
create a cylinder around them such that the line is the center of the cylinder.
I am not sure how I must go about to do this ? Any pointers will be appreciated.
Thanks
Sanat.
--
Read this topic
Hi,
I was able to get a matrix for every geode in my model using the path variable
in nodevisitor.
However at present I am printing out the triangle vertices to a file using the
printTriangles() and a struct, similar to the method show in the osggeometry
example. I'm a little confused about
Hi,
I was able to apply the matrix transforms. Although I simply derived a
ModifiedTriangleFunctor class from the original TriangleFunctor class and used
function over-ride on the this-operator() therein.
Is there a more elegant way to achieve this ?
Thanks
Sanat
--
Read
Hi Tom,
Do you know if any of the examples with the source code use this ? I understand
the principle but will be helpful if there is some sort of implemetation.
Thanks.
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31353#31353
Hi Jean, Nick, Paul
Thanks for all your suggestions thus far.
I was able to extract the triangles and after using the nodeVisitor as
suggested by Jean, it is much easier than using a for loop as the code is
generic using a visitor.
My problem is that I am collecting triangles from a complex
Hi Nick,
Yes, Windows and VS 2008. I had to do exactly that. The debugger works normally
(as expected) now
Thanks,
Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31245#31245
___
osg-users
Hi Jean,
I was not able to understand this behavior:
When I had a vec3Array and I queried it using
vec3 = vec3Array-at(0) I would get an exception. Why does it give that
exception ?
I needed to use (*Vec3Array)[i] to get each Vec3.
But then at i = 14113, I got an Unhandled exception:
at
Hi Nick, Jean
The problem was because I was using the Release version of osg. I used the
Debug instead and both size and numElements give the same value.
I had turned optimization off but it seems as though you cannot run through the
code even then.
Thanks
Sincerely,
Sanat
Hi,
I am having trouble figuring out how I can get the list of triangles (vertices)
that make up an osg object to use in another algorithm that needs a list of
triangle vertices that make up the model. (I have seen the models I intend to
use in osgviewer using the 'w' key and they are made up
Hi Paul,
Thanks for your suggestion. I take a look at tiranglefunctor.
I am trying to get the list of vertices like this: (the algorithm that I'm
trying to use, uses a file type called TRI or TRIS which is basically a list of
triangle vertices that it then uses to compare with another model's
Hi,
I was running a small test program to understand the concept a little better:
Code:
int main()
{
int numChildren, num1, num2, num3;
const char* geodeName;
const char* cowChildrenName;
osg::Group* root = new osg::Group();
osg::Node* cow = osgDB::readNodeFile(cow.osg);
Hi Jean,
Yes, I realize my mistake. I went through that section in the Quick Start Guide
to refresh my memory.
Thanks.
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31178#31178
___
Hi Jean,
Yes, I have the local bounding spheres of each of the child nodes. But I'm
still not clear what I need to do to join all the bounding spheres of the child
nodes for the entire model ?
In the code below I'm loading the lwo files and creating local bounding spheres
for each of the
Hi Jean,
I used bounding spheres on the transform nodes and that helped me get the
distance.
Thanks
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30983#30983
___
osg-users mailing list
Hi,
I tried the following code:
Code:
//BoundingSphere using computeBound()
osg::BoundingSphere bh1Sphere = backhoe1Group-computeBound();
osg::BoundingSphere bh1PATSphere = backhoe1PAT-computeBound();
//BoundingSpere using computeBound():
osg::BoundingSphere bh2Sphere
Hi,
My 3d model is a number of nodes linked by PATs and a Group node right on top.
So when I was going through the methods, I observed that the getBound() works
only for nodes.
Then I also came across the computeBound() which can be used with Group nodes.
Code:
virtual BoundingSphere
Hi Jean,
I am looking at osgBullet but for some reason all the binaries dont run after
building it.
Also, is there any tutorial that explains how to link osgbullet with an already
existing osg project ?
Thanks
Sanat
--
Read this topic online here:
Hi Paul,
That is the method I had initially thought of (i.e. the distance between
centres of spheres obviously :) and not the other one !)
I was building osgbullet and am able to build the projects in visual studio
successfully. All my dependencies are built right as osgWorks' binaries run
Hi,
I am trying to build osgBullet and while the projects build correctly in
VisualStudio, when I try to run the binaries created, they hang on me.
I hav the binaries from osgBullet and osgWorks copied into the binaries folder
for osgBullet.
When I opened the dll for osgdb_osgbBullet.dll in
Hi Fred,
I'll try that out. THanks.
Sorry Paul, I didn't realize there was a google groups separately for
osgBullet.
Thanks,
Sanat.[/quote]
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30809#30809
Hi Tony,Jan
I did go through delta 3d's tutorials and found that it had a lot more than I
might need for now. Plus I felt it was much simpler to set up a scene and go
from there in osg or maybe that's just because I have been using osg.
I will look at osgBullet and integrate it.
Thanks
Hi,
I am interested in knowing if there is some tool in osg that I can use to
perform proximity queries between a pair of objects. I looked at osgbullet.
But it offers a lot more than what I basically need.
One approach that I have thought of is using distance formula between the
Hi,
I am interested in adding Collision Detection to my current OSG application.
And after going through a number of threads on this topic, the common theme was
use Delta 3D.
So my question is:
Can I use my current OSG code as is, in Delta 3D and then just add other
features (like collision
Hi Jean,
Your suggestion to study the function that is called from the code was a very
good one indeed. This way, you do not have to
Thanks !!
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30663#30663
Hi Jean,
I decided to take the approach that displays graphics in a window. I am able to
get 2 windows. But right now, both monitors are displaying 2 windows. I am not
able to separate window 1 to screen 1 and window 2 to screen 2 only.
I tried following what you had suggested but I still get
Hi Jean,
You were right that my graphics card settings were not set to Configured
independently from each other (Dual View). I updated the settings in the nvidia
Control Panel and now have behavior similar to what you described with being
able to drag windows across screens, etc.
But
Hi Fred,
I had tried 0 and 1 before but that gave me the exact same behavior. So in your
application you have a different osgviewer window that displays in each screen
the moment your program starts running ?
I don't know if there is something wrong in the way I'm setting up my graphics
Hi Jean,
Thanks for that. It helped me solve the problem.
Also, I wanted to know if trial and error is the way one can pick up the
intricacies of osg, as there is so much in the api, its very difficult to know
how it all works.
Thanks,
Sanat
--
Read this topic online here:
Hi Torben,
I haven't decided on what the remote side architecture would be. I was not sure
if I needed to have a full fledged PC on the remote side or could I get away
with using a monitor connected to a device that receives the wireless video
feed.
Not having a full fledged OC on the remote
Hi Torben, Jason
Thanks for the explanation, I clearly understand the video transmission part
now.
But using a set up such as that, I am basically transmitting the entire video
feed to the remote screen.
I am interested in sending the rendering of only 1 of those 3 viewports(1 view
from the
Hi Skylark,
Thanks for your reply
Are there any examples in the source that show how to only render the bottom
left viewport on the second monitor (basically a generic example for
selective rendering) or any suggested reading ?
Thanks
Sanat
--
Read this topic online here:
Thanks Jean, I'll try this out right away using a cable for the remote screen
for now.
-Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30571#30571
___
osg-users mailing list
Hi,
I am not sure if I have phrased my question correctly, so I'll try to explain
what I am trying to achieve.
I am using osgCompositeViewer with 3 views as seen in the screenshot attached.
I am interested in wirelessly transmitting the thread for one of the views
(bottom left one) to a
Hi Ulrich,
Thread? I assume you want to transmit the *image* to a remote monitor?
Or do you want to somehow migrate the rendering to another box?
Yes, basically when the simulation is running on my main PC, I want to view the
exact same simulation on a remote monitor/screen. (In this case,
Hi Ulrich,
Thanks for that suggestion. I didn't know that the keyboard handler handle()
function gets called regardless of whether the key is pressed or not.
Thanks,
Sanat.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30407#30407
Hi Cory,
That was it. Thanks for catching that out.
Best,
Sanat
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30346#30346
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi,
I have been able to display a text box in my application but my problem is
something like this:
I have 2 PAT nodes under a root node. I want to display the distance between
these 2 nodes using simple distance formula at every run of the traversal.
Currently I have the text box added to my
bump
hoping to kno if any of you guys have faced this problem/any solutions ?
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30239#30239
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi Tom,
Yes, I should have probbaly tried outputting values to the console a little
earlier. It appears there is a bug in VS 2005 while setting a watch on
variables in member functions in classes.
So I have managed to narrow down my problem to the following lines of code:
xPos and yPos are
1 - 100 of 160 matches
Mail list logo