Don't think .off is used very much anymore (if it wever was)
It's pretty simple to write a new file format writer (reader is trickier)
Just start from the .obj source, post any questions you have here.
Cheers,
Martin
--
Read this topic online here:
Some experimental work on supporting OSG directly under webgl
http://plopbyte.net/?page_id=111/
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27597#27597
___
osg-users mailing list
And it can now do Qt
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27548#27548
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Even with a dbl click you still get a RELEASE event first for each click
Cheers,
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27501#27501
___
osg-users mailing list
Thanks - I had combined two different problems into one question so it wasn't
clear.
The first problem was - I have a subset of vertices that I want to flag in some
way. One obvious way of doing this was to make a POINTS primitiveset drawable
of them. But I don't want them to be drawn as
The event picker doesn't take a nodemask to traverse like the nodevisitor, so
it returns all hits - visible or not.
I made a small mod to the IntersectorVisitor to take a traversal mask and only
visit those nodes with it set.
It needs a bit of cleaning up to meet OSG standards - I will post it
Is it possible to have a drawable that isn't drawn?
I have a complex object split into a number of geodes but sharing a common
vertex array - this is necessary because some of the meshes combine across
objects.
But I do need a way of quickly knowing if a particular vertex is in a certain
But there didn't seem to be any code inside the intersector to act on the
traversal mask.
I added to:
Code:
bool IntersectorGroup::enter(const osg::Node node) {
if ( !(node.getNodeMask() _traversalMask) ) return false;
.
Martin
--
Read this topic online here:
Tim Moore wrote:
You could subclass Geometry ( I presume that's what you're actually using),
but...
Trouble is that then I have a non-osg model so I need custom load/save etc
I presume you mean that the common vertex array(s) is shared among several
Geometry objects, which are the
Tim Moore wrote:
PrimitiveSet::getNumIndices() returns the number of vertices in the
PrimitiveSet. PrimitiveSet::index() returns the actual index of vertex n in
the vertex arrays.
Thanks that's what I was missing - I could only find a way of getting the
number of elements - which if they
Tim Moore wrote:
PrimitiveSet::getNumIndices() returns the number of vertices in the
PrimitiveSet. PrimitiveSet::index() returns the actual index of vertex n in
the vertex arrays.
Sorry - looks like I was a little premature, getNumIndices() returns the
number of triangles, just the same
Haven't tried composite view but i use multiple OSGWidgets with QDockWidgets to
make an MDI app
The
nice thing about dockwidgets is that you can move them outside the app and so
use multiple monitors effectively.
Martin
This is how I
Don't know if it applies to OSG, but a common speedup with OpenGL used to be to
sort by vertex color so you draw all the vertex of the same color at once.
That might be out of date with modern cards and VBOs but shouldn't be too
difficult to implement.
Martin
--
Read this
You might struggle to output 30fps with many video codecs
Just writing jpegs should be ok. 640x480 apprx 70k * 30fps = 2MB/s
Of course that is 10,000 frames/hour!
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26540#26540
Easiest way is probably just to write N jpegs named image000.jpg to imageN.jpg
and then use virtualdub to convert them into a movie in whatever format you
want.
Writing an MJPG movie, where each frame is just a jpeg, isn't much harder.
If your whole screen changes through the movie (eg a fly
what graphics card? I've had this behaviour on Intel's embedded laptop
chipsets with their crappy OpengGL drivers.
I'm guessing it's because most games only need to render triangles and this is
all the driver is really tested for.
- Have you tried increasing the lineWidth?
Cheers,
Martin
In general you need to pick a point - because a 2d mouse point is a line in 3d.
But if you are showing a view form a known direction of a relatively flat
object (such as a plan view of the ground) you can go direct from mouse to
world.
Code:
bool pick(const osgGA::GUIEventAdapter
You can also use part of the nodemask You only need the top bit for the
culling, you can use the rest for any id number you want.
The advantage of this is also that the nodemask is saved in the osg file
without you having to make any modifications - assuming your id is valid across
loads.
I don't know how current it is, i've never had to do this, but the tutorial at
http://www.openscenegraph.org/documentation/NPSTutorials/index.html
describes multiple cameras following a node (scroll down to the pictures of
tanks)
Cheers,
Martin
--
Read this topic online here:
As a test, you can use the openthreads from vs2008 build.
As long as you are on the same number of bits the .dlls are compatible.
Cheers,
Martin
Unfortunately I can't swtich yet until Qt-vs-addin supports 2010.
--
Read this topic online here:
I have some text labels in my scene, but when I switch the polygon mode (eg
with the 'w' key in osgviewer) the text is rendered broken (in line mode) and
dissapears (in point mode). How do I force osg::PolygonMode::FILL, or force
text to ignore it?
I tried:
Code:
That works perfectly
Thank you!
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26256#26256
___
osg-users mailing list
osg-users@lists.openscenegraph.org
OSG files are very easy to edit by hand, it's helpfull to have a text editor
that can fold blocks of text with { }
A bit of trial and error, keep a backup copy and osgviewer - should do it.
Martin
--
Read this topic online here:
It's not osg specific
VS2008 (erronously) didn't have iterator as a separate header vs2010 obeys
the standard - you may as well include it wherever you have std::Vector.
http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx
Martin
wiki does a good job for the
intel chipsets http://en.wikipedia.org/wiki/Intel_GMA
Nvidia
http://en.wikipedia.org/wiki/Comparison_of_Nvidia_graphics_processing_units
Ati http://en.wikipedia.org/wiki/Comparison_of_ATI_graphics_processing_units
Of course there is supports OpenGL2.1 and
Specifically set the CullMask in the camera with eg.
Code:
#define DRAW 0x8000
viewer-getCamera()-setCullMask(DRAW);
Then just toggle the bit in _nodeMask for each node
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26166#26166
In linux you set the two monitors to be totally independant - with their own
desktop? Then they are probably running separate copies of X
You can start a session on a different X display with --display :2
But I'm not sure how you would get osgviewer to run on multiple displays at the
same time
You need to dirty the display lists to tell OSG to send the new positions to
the graphics card
Code:
geometry-dirtyDisplayList();
Or you can set the geometry to dynamic and it will dirty it on each pass.
Can't remember the exact syntax, but search for dynamic.
Martin
--
On this topic, is there a way of having an eventHandler remove itself?
I want a one-shot selection of a point.
I can't call removeHandler(this) inside the handler and there is no callback
function I can pass to the handler to be triggered when handle() returns true.
Any suggestions?
Cheers,
Thanks - I think I am misunderstanding the threading in OSG.
In the gui I though frame() was called at 60fps, eg with a model rotating in
the view.
If I have a gui thread (say a non-modal dialog) that modifies the scene then I
need to make sure that I don't have an invalid drawable/vertex array
Hi,
I coded something to do this as a test of writing handlers
It's probably not the best solution - the keyboardhandler example describes
using a single handler with loadable functions mapped to each key.
But this does work and should get you started.
It saves the entire scene with a filename
Not know how it goes with wxwidgets, if you can build it statically,
then you do not need to include it.
You can do either, it's LGPL + static allowed.
If you use dll's you have the option of only shipping the parts you use - so
leaving out say database or webbrowser components.
The other
robertosfield wrote:
Could Windows and Mac users have a play with these tools.
TortoiseGIT is pretty much identical to TortoiseSVN
A couple of minor issues on windows.
TortoiseGIT requires a separate install of git - TortoiseSVN includes SVN.
The git tool on windows needs perl,tcl and a
Tim Moore wrote:
On gitorius you create a clone at gitorious.org (http://gitorious.org) and
push your changes there; you can also submit merge requests to the original
project / repository. Are you thinking of more than that?
No that should be enough, it wasn't obvious how you did it
There is a need to be able to have 'experimental' stuff in osg.
Otherwise you have the - nothing gets in unless it's tested and nothing gets
tested cos it's not in - problem, a DVCS seems the best option.
I am looking at moving to git from SVN for my own project when I came across
this intro to
robertosfield wrote:
Construct you scene graph into parts that need to be saved, and parts that
are just decoration?
That was my first approach - at the root I had 'scene' and 'display' groups and
only save the 'scene' tree.
But it would be nice to be able to attach decorations
I'm trying to set a culling mask for osg::writeNodefile
so that certain items are drawn in the scene but not saved (gridlines, axes,
labels etc)
I have a specific bit pattern in their nodemasks but I can't find how to set a
corresponding culling mask for the write?
Martin
--
Is there a better approach?
-Basically I just want to flag certain nodes (and their children) as not part
of the model.
At the moment I do this with a bit in the nodeMask, so they can't be picked,
don't contribute to the bounding box etc.
Shouldn't be difficult to add a test to the writer -
modjtabaf did some useful improvements to the spherical manipualtor - you could
contact him.
Alternatively if this is a requirement that might have general usefulness you
could post the requirements here and see if anyone is (or would be interested
in) working on it anyway.
Cheers,
Martin
Does anyone have any suggestions for showing a live mouse selected region on
screen?
Currenlty for selecting areas near the ground I create a transparent plane just
below ground level, do a linesegment intersect and then draw a polygon on the
plane at the intersection points.
But I now need
Trajce Nikolov wrote:
I have done this before with selection bufferNick
Erm - can you elaborate a little?
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22969#22969
___
osg-users mailing list
I have a bunch of line segments (generated by cutting a mesh) that I need to
join together into a polyline.
Defining the optimal polyline as the shortest ordering of the points.
Is there any better algorithm (or library) for stitching the line segments -
other than niavely searching all other
Theres a problem with the QOSGwidget (at least on windows)
You need to add a:
Code:
QPaintEngine* QOSGWidget::paintEngine () const
{
return 0;
}
see http://forum.openscenegraph.org/viewtopic.php?t=4432highlight=
Martin
--
Read this topic online here:
Sukender, would you not also have to remove all the #include osg/header
from each cpp file for all the headers that are in the PCH?
Otherwise doesn't Visual Studio just parse them again anyway?
Martin
--
Read this topic online here:
Sorry - wasn't thinking.
The PCH still has all the include guards, I was imagining having to put if
USE_PCH wrappers around the include section in every cpp file.
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22849#22849
I have been trying to build OSG 2.9.6 with precompiled headers.
As a starting point I just included all the headers in osg
This causes an issue with ShadowVolumeOccluder which defines a std::pair named
Point, but the precompiled header already includes an osg::Point.
ShadowVolumeOccluder has
I would need all the zoom features of Sphericalmanipulator (eg mouse wheel) to
work the same in ortho mode - or at least have the same visual effect, so the
users don't need to understand the difference.
But this seems to be getting away from what the Spherical manipulator is.
Martin
Paul Martz wrote:
Perspective versus orthographic projection should be unrelated to the view
controls, so there's really no reason why you shouldn't be able to
use either projection type with OSG's CameraManipulators.
That was my view, my users don't care wether the eye is being moved or
It isn't, worldmatrices is a list of all the individual matrices up the leg to
the top.
But multiplying these together gives a single matrix that is equivalent to
going through all these individual conversions - thats the whole beauty of
matrix transforms.
Cheers,
Martin
--
I need to set a 2d view of a basically flat landscape. I am using Spherical
manipulator and perspective view
To get the world position of a mouse pick (while in plan view) I need the
eye-distance, but in the same 'normalised' units as GUIEventAdapter
getX/Ynormalized(). Not sure how I can do
jterpstra wrote:
1) Is this type of integration even possible with QT?
Yes, you can embed a OSG view into a Qt frame, dock window etc.
There are two ways to do this shown in the osgViewerQt example.
Adapterwindow is easiest, the oosgwidget needs a little fix on windows to stop
a redrawing
Rather than add stdafx.h to everything you can tell Visual studio to insert it
automatically
Project properties - Configuration-C++-Advanced and in the Force includes
box put stdafx.h.
Don't know if you can do this from the CMake file.
Martin
--
Read this topic online here:
Or you could multiply each of the vertices in the node by the matrix to put it
into a world coordinate, and then just ignore the matrix.
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22335#22335
Take a look at the hud (headup display) example
And see here
http://www.cs.clemson.edu/~malloy/courses/3dgames-2007/tutor/web/hud/hud.html
Cheers,
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22247#22247
Ok another embarrassingly newbie question.
I have a scene with a large number of points, I want to interactively delete
some points.
It's too time consuming to go through the vertex array and remove the values.
So in the past in OpenGL I shuffled them with values at the end and changed the
a) you need to open source ( you may still link statically but any changes to
OSG code should be open sourced ( and not your app code ))
Just to clarify that.
OSG is LGPL with the extention that you can link OSG statically into your app.
This exception like the one in the wxWidgets
Not as a standard OpengL feature (AFAIK) the whole point is that the driver
takes care of it and you don't have to care (I know you do really !)
You can check the versions of GLSL supported but not how the card is doing it -
see http://www.gamedev.net/community/forums/topic.asp?topic_id=552800
I thought DrawArrays were the equivalent of OpenGL DisplayLists and
DrawElements was like indexed arrays?
So it's efficent to have a DrawElements{ } with inidivdual entries 1,2,3,4,5
to 1000 ?
If it's OK to have DrawElements jumping all over the vertexarray then it might
make sense for
Jason Daly wrote:
If you're familiar with OpenGL, osg::DrawArrays is equivalent to
glDrawArrays(), osg::DrawElements is equivalent to glDrawElements().
The first uses the vertex arrays directly, the second uses an index
array to select vertices from the vertex arrays.
Thank you.
I had
Jason Daly wrote:
The advice about breaking up large geodes is still applicable. If you're
talking about hundreds of thousands of vertices, it's probably best to
represent those as multiple geodes (and group them spatially, if possible).
The problem with multiple geodes is that I need to
Do you have PAT nodes in your tree to set the relative postions of the objects?
You aren't saving these with the geodes, an alternative woudl be to multiply
every vertex in each geode with the worldmatrix as it is saved.
Martin
--
Read this topic online here:
Take a look at the osgpick example and osgkeyboardmouse.
If you are picking an object with a size (a surface) look at line interesect
visitor, there is a tutorial here
http://www.openscenegraph.org/documentation/NPSTutorials/osgIntersect.htm
Martin
ps. it seems horribly complex but when you
Yes, I am clearing the display lists (sorry I cut it out with a bunch of other
irrelevent code)
It's odd that it draws a filled polygon upto 4 points but then no further - it
doesn't matter if the extra points would make it convex or simple, or if I go
cw or ccw.
I know the tesselator works
I am trying to draw a rubber band wioth the mouse around a selection
I get the mouse position, convert into world coords (assumign a plan view) then
add the new point to the geometry.
I then call osg::Util Tessellator to build the selection into a polygon.
This works, but only for the first 4
there is a picking example in the LMB tutorials (#6)
http://www.openscenegraph.org/projects/osg/attachment/wiki/Support/Tutorials/
And there is a slightly more complete, but more complex example in osgpick in
the main sources
Picking a triangle basically consists of firing a single ray and
You need a glcontext to query the openGL - because it's possible that some
supported features might depend on the configuration at runtime.
I couldn't find an OSG specific exampel , but this might help
I simply started from the TreeModel in
http://qt.nokia.com/doc/4.6/itemviews-simpletreemodel.html
I have a QTreeitem which contains a pointer to the parent QTreeItem and a list
of children and a osg::Node pointer to the actual scene node.
This slightly duplicates the structure of the osg::scene
I remember Don's point about the background paint attribute being different on
windows Qt but i could never get a reliable fix.
The dummy QPaintEngine function has fixed the flicker problem for me on Windows
(XP, Qt4.6.0, Osg 2.9.6).
What further testing do we need for it to be an accepted
I have the same problem on Windows for 2.8 and 2.9.6
The only solution I have found is to rebuild Qt with experimental OpenGL
rendering support - but that makes all the dialogs too slow to be usable.
Otherwise AdaptorWidget works well, sorry I am at a client next week so I can't
investigate
I've upgraded to 2.9.6 and done some more tests
With just vertex data it can handle large coordinates in the scans.
But fails if I also have marker and text components.
However that does work if I subtract off the large part of the coords and put
that offset in a root level PAT, leaving all the
When displaying a model positioned at real world coords (ie values in 6
figures) I get an error about _clampProjectionMatrix not applied and a znear
of roughly max_float and a zfar of -max_float.
This only seems to be a problem with vertex data, display osg::shapes at these
coords is fine.
Is
There is also a rumor that Intel will simply buy NVidia - which might be a good
thing 'OpenGL wise'
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21288#21288
___
osg-users mailing list
I have an object with separate component eg: a top, bottom and an outline.
I have a choice of storing a group with each component in a separate osg::Geode
but the outline points are shared by the top and bottom and I would rather not
have data duplicate. There are a lot of points because the
So a good model would be :
Single osg::Geode representing the entire part with all the vertex data
and separate child geodes each with a single drawable for the points in the
top, bottom and outline.
Then meshes etc can be added to the children all sharing the same vertex data,
in the parent ?
Sorry for the slight thread hijack - but does anyone know of a free artificial
terrain builder that is in any way compatible with OSG?
I would just like some interesting looking terrain (mountains etc) to use when
demoing some software - and because it's boring to be testing with the same
Mike Connell wrote:
Have you heard differently from the authors? That would be good news indeed.
Sorry my memory was playing tricks, the only license statement is:
This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied
For the streaming mesh have you had a look at
http://www.cs.unc.edu/~isenburg/sd/
It's by the same team that did the famous 'triangle' program - but this is free
(MIT licence)
Cheers,
Martin
--
Read this topic online here:
Hi,
I have a class derived from PositionAttitudeTransform. It's simply an Adapter
it contains no new variables but fixes up some methods for osg::PAT to be used
in an existing design for some navigation routines.
The existing navigation library is fixed I can't change it to understand
[quote=Paul Martz]If you can (obviously) change your code to understand
instances of your new custom class, then I don't understand why you can't
change your code to understand instances of ref_ptrs to your new custom class.
Please explain this restriction further.
I have a complicated
Thanks but not really - then I can't use the new class in the scene graph.
The idea was to have a 'location' object in the scenegraph which is a PAT as
far as OSG is concerned but has methods which reflect the interface I'm used to
and fit the needs of my problem domain. That I can do with an
If you need to do this with a complex model (1000s of points) the Delauney
triangulator doesn't work very well.
I have a written a wrapper for Jonathon Shewchuk's Delauney code but that code
is restricted to non-commercial use so I haven't submitted it.
If you can accept this and need a worlds
You need osg::computeLocalToWorld() to get the coordinate transform matrix,
then multiply each point by this matrix to get real world coords.
eg:
osg::Matrix matrix = osg::computeLocalToWorld(nv-getNodePath());
osg::Vec3 point = data-at(ii) * matrix;
Cheers,
Martin
(at least that's what i did
Yes I was assuming all the OSG and 'heavy lifting' in C++ with just a python
gui (and scripting) so no need for osg-swig.
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16794#16794
___
It seems that following Qt going LGPL we will soon have LGPL python bindings
(the current pyqt is commercial).
Has anyone any experience/interest in a python QtViewer?
Both the pyqt and the new pyside bindings are very thin wrappers around the Qt
C++ code so it shoudn't be a huge challenge.
New in a series of embarrassing newbie questions :-*
When do I need a switch node if I have a nodemask?
Suppose I have a number of components to a model (wings/body/wheels etc) these
are all children of a single parent node and each have a nodemask allowing them
to be switched on/off
That was rather what was confusing me. The 'already included in every node'
nodemask seemed to have more capability than the 'have to add it the scenegraph
and manage it manually' switch.
The only advantage for a switch node I could see was the example in Paul's book
where you have a number of
I want to add some functionality to my app as a plugin - so the user can add
features at runtime.
It just needs to take a tree of nodes and some other data (possibly as an XML
string) and do something to the nodes, or return a result xml string.
Is there an example/tutorial of using OSGs plugin
Thanks I was hoping to avoid reinventing too many wheels.
OSG already has code to find a plugin by name, create nodes, receive nodes.
I just needed some examples of accessing a node directly through the registry,
getting back changed nodes and passing/receiving extra data.
Cheers,
Martin
See http://forum.openscenegraph.org/viewtopic.php?t=2552
Cheers,
Martin
ps. sorry in a hurry, please reply if this doesn't answer question
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16404#16404
Paul Martz wrote:
I strongly encourage everyone to take a look at the OSG In Chine
presentation. It's amazing to see how big their OSG community is.
That's great news, the OpenCV community in China is also very strong.
I suspect there's a big first mover advantage for whoever has translated
It's fairly easy to do in OpenCV using Haar trackers.
OpenCV also handles all the webcam stuff for you fairly painlessly.
See http://www.codeproject.com/KB/cpp/TrackEye.aspx for example.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15968#15968
Sorry forgot to add, OpenCV is C/C++, cross platfom is BSD licensed and works
well with OSG.
The documentation isn't bad and it's used by a lot of vision courses so quite a
few tutorials out there. There is a good intro book from O'Reilly
Martin
--
Read this topic online
Do you have a osgdb_jpeg.dll file? Is it in a directory on your path ?
Did you build OSG from source?
You may need the 3rd party add-ons (especially if on windows) this contains the
low level jpeg library needed the plugin.
Martin
ps. You should probably post in the 'general' forum - this is
No, other than running the demo.
I once did something to automatically find pupil position/size for an opthalmic
system but it didn't do gaze direction.
One thing that was very useful (if you can control the environment) was to use
an IR LED which reflects off the cornea and an IR sensitive
The XXXd.dll is the debug version, it will be used by the debug build of osg.
Don't know why you don't have the release version.
As a test I think you should just be able to copy the debug dll to
osgdb_jpeg.dll (although this might depend on how forgiving your compiler is)
Cheers,
Martin
Using opencv with OSG but the integration isn't very tight - texture images and
point locations get copied between the different format where necessary.
Cheers,
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15192#15192
Congratulations - been there, done that although I never used the freezer trick.
Thank you!
Martin
ps. If you want to have some people mirroring the data drop me a line.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15003#15003
I was just testing 2.9.5 with the highest level of debug messages turned on and
noticed that DatabasePager::addLoadedDataToSceneGraph is called on every frame
- even when the model was simply loaded from an osg file. Do I have to do
anything to disable the database pager if I'm not using it?
Thanks Robert - I commented out the timing message it generates.
Other than that 2.9.5 works great in my admittedly limited usage.
Martin
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=14369#14369
[quote]The point of Polytopes is that they are convex which makes
all kinds of tests very easy. If you want to modell something
non-convex (something like Constructive Solid Geometry) then
PolytopeIntersector will not help you as it is.[quote]
My solutution was to triangulate the convex
1 - 100 of 178 matches
Mail list logo