In my case its Perspective.
I was able to work around the problem by using a PolyTope intersector with
a 1x1 rectangle. That worked perfectly.
On Tuesday, April 14, 2020 at 11:56:24 PM UTC-7, OpenSceneGraph Users wrote:
>
> Hi Andrew,
>
> When you say you have a isometric view, to be clear,
Hi Andrew,
When you say you have a isometric view, to be clear, you mean you have an
orthographic projection of the scene? The OSG itself support orthographic
projection via the osg::Camera's ProjectionMatrix, the intersection. It
can only account for this if the IntersectionVisitor knows about
Hi,
I am having a lot of problems with picking with LineSegmentIntersector in
OSG 3.6.5.
I have reduced the problem to a a simple cube, center 0.5,0.5,0.5 with a
boundingSphere radius of 1.2142
I create the intersection with ( x , y are screen coordinates)
picker=new
Hi Andrew,
On Thu, 6 Feb 2020 at 18:11, OpenSceneGraph Users <
osg-users@lists.openscenegraph.org> wrote:
> This is an old issue that appears to still be in 3.6.3
> It appears that if any geometry is under a MatrixTransform node then
> osg::LineSegmentIntersector fails to intersect properly with
This is an old issue that appears to still be in 3.6.3
It appears that if any geometry is under a MatrixTransform node then
osg::LineSegmentIntersector fails to intersect properly with this
geometry. I am not using scaling in the matrix transform.The only solution
is to manually transform the
I found the problem, and it was mine. It helps if I attach my root node to
the scene BEFORE I try to insect with it. ;)
On Monday, February 3, 2020 at 1:04:10 PM UTC-5, Nonsanity wrote:
>
> Thanks. I had thought to apply the visitor to the scene, but GetScene()
> didn't have Accept(). With your
Thanks. I had thought to apply the visitor to the scene, but GetScene()
didn't have Accept(). With your confirmation that using the scene was
correct, I found that viewer.getSceneData()->accept( iv ) did exist.
However, calling that line just results in a segfault. The rest of the code
is the
Hi Chris,
I guess you want the scene to accept the IntersectionVisitor, not the
camera.
Laurens.
On Sat, Feb 1, 2020 at 1:18 PM OpenSceneGraph Users <
osg-users@lists.openscenegraph.org> wrote:
> I have a scene built with a few objects loaded, the most pertinent one
> being a large plane surface
I have a scene built with a few objects loaded, the most pertinent one
being a large plane surface centered at the origin. I want to cast a ray
from a particular point at a particular angle inside the scene and get a
list of everything it intersects—both the point of intersection and the
Node
Excellent. I tested it and everything seems to work as expected. Thanks for the
quick response.
BTW: I'm also investigating a way to somehow "cache" the last drawable that we
intersected with (terrain only). If this works, it could prove to be a
significant performance gain in situations
HI Guy,
On Tue, 26 Jun 2018 at 20:10, Robert Osfield wrote:
> As for the creation or the Settings object on the heap, as it's a
> local new/delete and operation within a single thread it is probably
> safe to replace with an object on the stack.
I have implemented this and checked it into the
Hi Guy,
Just how many separate LineSegmentIntersection and Drawables are you
trying to intersect with?
As for the creation or the Settings object on the heap, as it's a
local new/delete and operation within a single thread it is probably
safe to replace with an object on the stack.
Robert.
On
Hi,
I recently upgraded to the OSG v3.6.1 and I noticed that the new
LineSegmentIntersector has changed significantly compared to v3.4.0. As I was
reviewing the changes, I noticed that the LineSegmentIntersector now allocates
an instance of LineSegmentIntersectorUtils::Settings every time the
Hi,
fixed the issue. I was using a defect Drawer. Thanks anyway
Thank you!
Cheers,
Jochen
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74103#74103
___
osg-users mailing list
Hi Robert,
thanks for your quick response.
so here's what I'm doing:
Code:
if (viewer)
{
returnValue =
ReactOnLCSPointClick(
*viewer, i_eventAdapter.getX(), i_eventAdapter.getY());
}
I tried as well with
Hi Jochen,
There is too many unknowns about what you are doing for us to be provide
any specific advice as to what is going wrong.
It could be that your are passing in the mouse coords incorrectly. It
could be that you are interpreting the intersections coordinates
incorrectly. It could be
HI Jannik,
I haven't had a look at the modified example yet, it's the weekend so I'm
just briefly online. Quick thoughts are:
inverting a zero'd matrix will naturally lead to an invalid matrix.
My inclination is that the case where a zero matrix could be produced is a
special case that needs
Hi,
The LineSegmentIntersector creates NaN warnings when applied to a node with
zero scale. I've attached a 3 line change to osgintersection.cpp to reproduce
the issue.
The NaN's first pop up when OSG tries to invert a zero matrix here:
HI ? Could you sign your post so we know how to address you :-)
From the description of the problem it looks likely to be a precision issue
where the line segment aligns right along the edge between two triangles
with neither triangle passing the test.
In the svn/trunk version of the OSG there
::Intersector::PrecisionHint::USE_DOUBLE_CALCULATIONS);
It worked. Woo!
Thanks again.
Rubby
From: Robert Osfield
Date: 2014-10-06 16:22
To: OpenSceneGraph Users
Subject: Re: [osg-users] LineSegmentIntersector bug?
HI ? Could you sign your post so we know how to address you :-)
From
Hi,
When i use LineSegmentIntersector in the following code.
there must be 8 lines. but after I run the code, only 7 lines exist.
int main( int argc, char** argv ){
float height = 5.f;
osg::ref_ptrosg::TessellationHints hints;
hints = new osg::TessellationHints;
Hi All,
I have just checked into svn/trunk the following changes to better handle
numerical precisions issues with the clamping of the line segment to the
bounding box in LineSegmentIntersector.cpp. These changes are compatible
with being merged with the OSG-3.2 branch and hence could be part of
Hi Robert,
This is perhaps un-related, but in a previous project, I've experienced
intersections numerical precision problems with big scenes, and I've switched
to the double precision line segment intersector taken fomr osgEarth source
code.
Maybe swiching from float precision to double
Hi Aurelien,
On 2 September 2013 11:22, Aurelien Albert aurelien.alb...@alyotech.frwrote:
This is perhaps un-related, but in a previous project, I've experienced
intersections numerical precision problems with big scenes, and I've
switched to the double precision line segment intersector
Hi Robert,
if I understand you correctly, you proposed the idea to not expand bounding
box, but to lengthen the line segment. I feel it as more complicated as I am
not convinced that it will not tend to more numerical problems. On small
slopes close to the edge, you may easily hit different
Hi John,
I wasn't thinking of expanding the line segment, rather expanding the
bounding box just with a epsilon scaled by the line segment length.
However, you confusion about what I was thinking has given me an idea -
perhaps the best thing to do is do the intersection against the original
Hi Robert,
after this new idea, I am starting to ask myself, what are the cases for which
we need epsilon?
- when the line segment accidentally misses bbox while triangle intersection
routines would indicate intersection (can this happen?)
- when clipping puts the start or end point inside the
Hi Robert and Alistair,
I gave it another long thought and found one more idea. Let me show it on
example of
bounding box of bb_max.[x,y,z] set to 1'000'000 and bb_min.[x,y,z] set to
999'999. I such
case, the size of bounding box does not matter and distance of start and end
neither
Hi John,
On 20 August 2013 06:09, PCJohn pec...@fit.vutbr.cz wrote:
**
We could use Robert's idea to get start and end points. From them, we can
get the biggest value for epsilon as well that would provide better
epsilon. It should be smaller in most cases, but still big enough to always
Hi Robert,
I have lost in your reasoning. Let me go back to be sure we understand each
other.
The bounding box based epsilon will likely fail when the size of the box is
very small compared to the length of the line segment.
I came to conclusion that size of bounding box does not matter.
Hi John,
I'm a bit confused as what to further explain. For precision purposes it's
the math operations done to clamp the line segment to the bounding box that
is important. The maths operations bascially use the length of the line
segment in each axis and the distance from each face to the
Hi Robert,
there was recently a commit concerning epsilon in LineSegmentIntersector
that is now carried as class member. I can imagine motivation behind, but I
belive there is a better approach to the problem.
If the motivation is just to allow the setting bigger epsilon for bigger
objects
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of PCJohn
Sent: 19 August 2013 07:38
To: OpenSceneGraph Users
Subject: [osg-users] LineSegmentIntersector numerical imprecisions
The correct solution in my
Hi John et. al,
I too am not too happy with the approach of a fixed epilson, adding the
ability for the user to set this value isn't much better.
Scaling the epsilon by the size of the bounding box may be an improvement
but I'm not yet convinced it's the best approach. The epsilon is there is
Hi Jaap,
In svn/trunk I've introduced the ability to set the Eplsion value to a
user specified value rather than the default of 1e-4, this may not be
an ideal solution though, I'd much rather have the code work with
defaults correctly.
The clipping of the line length to the bounding box is done
Dear Peter, Robert, and all.
I would like to endorse Peter's remarks on the current implementation of
the LineSegmentIntersector. We experience precisely the
Hello Robert.
I digged a bit into the OSG source code and I found out that its a precision
problem. I use big models where the vertex coordinate values are 1000.
I don't know the exact process of the intersection search, but I assume that
the lineSegment is clipped in the
HI Peter,
I'm afraid I've not got enough time available to look into this
problem right now, hopefully others can dive in. My suspicision is
that due to nuermical precision issues on constructing the linesegment
and/or intersecting this with the bonding volumes or meshes you aren't
always
I use the LineSegmentIntersector in my application to select planar faces. The
problem is that sometimes when I click on the face facing to you (check the
red Xes on the picture), I get no intersection of this face. I get only an
intersection on the face which is not visible from this view -
Hi Peter,
I can't specifically say what you are seeing a problem, but it does
rather sound like a precision issue with projecting the mouse poistion
into clip space and then to world and final object coordinates.
Robert.
On 17 October 2012 14:19, Peter Bako osgfo...@tevs.eu wrote:
Hi,
I've
Hi,
I've got a problem with line segment intersector. Sometimes I get only one
intersection (on the bootom side of the table), while I should get two.
Please check the screenshot.
Do you have any idea why this happens? What should I do?
STLFILE.stl (ZIPPED) is attached
Thank you!
Cheers,
Ok...so I upgraded to OSG 3.0.1 and tried this intersection limit test in my
app (setIntersectionLimit())
I first tried LIMIT_ONE. Performance did improve over the NO_LIMIT case but I
noticed that the number of intersections calculated were as high as 6 for some
of the line segments. I would
Hi Shayne,
On Thu, Sep 13, 2012 at 10:32 AM, Shayne Tueller shayne.tuel...@hill.af.mil
wrote:
I first tried LIMIT_ONE. Performance did improve over the NO_LIMIT case
but I noticed that the number of intersections calculated were as high as 6
for some of the line segments. I would have
Farshid,
I'm actually modifying the osgSim::LineOfSight class for my tests. I went into
LineOfSight.cpp and modified the computeIntersections() method to support
setIntersectionLimit() since there's currently no way to control this for the
Line of Sight stuff in OSG. I added the call
Hi Shayne,
Is each LineSegmentIntersector instance getting more than one intersection
result? Or is the total number of results among all intersectors more than
1? The limit is applied to each intersector instance, so the total number
of results should max out at the number of intersectors being
Farshid,
If I understand the code correctly, each intersector in the LOS code is
associated with a start end pair defining the line segment. In other words,
it's a 1 to 1 mapping. If I have 45 LOS queries, the code generates 45
LineSegmentIntersectors. Each intersector in turn is added to an
All,
I have a couple of questions regarding LineSegmentIntersector.
I noticed that for a given line segment, it currently computes and
returns ALL intersections with a given geometry in the scene.
My questions are:
1) Does it support a feature of detecting a hit and then
Hi Shayne,
The base osgUtil::Intersector class supports setting the limits on
intersection results, using the setIntersectionLimit() method. The current
options are NO_LIMIT, LIMIT_ONE_PER_DRAWABLE, LIMIT_ONE, LIMIT_NEAREST.
On Tue, Sep 11, 2012 at 9:47 AM, Tueller, Shayne R Civ USAF AFMC 519
...@lists.openscenegraph.org] On Behalf Of Farshid
Lashkari
Sent: Tuesday, September 11, 2012 11:08 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] LineSegmentIntersector question...
Hi Shayne,
The base osgUtil::Intersector class supports setting the limits on
intersection results, using
To: OpenSceneGraph Users
Subject: Re: [osg-users] LineSegmentIntersector question...
Farshid,
Thanks much for the input and addressing my questions. That is good news
that the support is there.
I'm assuming the default is NO_LIMIT. Is this true?
Thanks,
-Shayne
-Original Message-
From
Sent: Tuesday, September 11, 2012 11:13 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] LineSegmentIntersector question...
Farshid,
Thanks much for the input and addressing my questions. That is good news
that the support is there.
I'm assuming the default is NO_LIMIT. Is this true
...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Tuesday, September 11, 2012 11:13 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] LineSegmentIntersector
Hi Robert,
robertosfield wrote:
Secondly the intersections you get returned return the leaf node and
drawable that is intersected along with the node path from the root of
the intersection traversal down to the leaf node that was intersected.
you found my problem: I forgot that the demo
Hello Heiko,
But this won't compile too:
error C2039: 'getName': Ist kein Element von
'std::_Vector_const_iterator_Myvec'
error C2839: Ungültiger Rückgabetyp 'osg::Node *const *' für überladenen Operator
'-'
IntelliSense: Der Ausdruck muss den Typ pointer-to-class aufweisen.
Any idea?
I
Hi,
you are right :). I tried this myself before and saw that VS show me
nevertheless an error. But didnt seen that the error message changed (I had
forgot the .empty() on comparism) ;)
Thank you!
Cheers,
Heiko
--
Read this topic online here:
Hi Heiko,
I'm afraid I can't work out what is going on from your description so
the best I can do is provide some general suggestions.
First up only polygonal meshes can be interested by
LineSegmentIntersector, so point clouds and lines will not return
intersections.
Secondly the intersections
Hi,
I have a simple question to LineSegmentIntersector: Which objects can be
intersect with the test ray?
I ask because I have following problem: I have following osg tree:
- Geode -Field
- Node (Model loaded from disc) - Contains Name obj1 by Model (so not set
by my - don't want to presume
Hi Robert,
thanks for the reply. I have used the ShapeDrawable as an example. My code uses
nodes read from COLLADA models and it doesn't work there either (those nodes
display just fine, with the texture on them, so I know uv mapping is also
working).
I can't understand why the code allows the
Hi Oliver,
There isn't much the osgUtil intersection code can do about temporary
data as created by ShapeDrawable. ShapeDrawable is really just meant
for very simply usage, such as quick a dirty debugging, I don't
recommend it's general usage.
Robert.
On Tue, Jan 4, 2011 at 1:52 PM, Oliver
Hi,
I am trying to get uv coordinates and color of a point I found using the
LineSegmentIntersector. My problem is that the found intersection has no
indexList so I cannot use the code used in osgmovie.
This short code example should boil down to the point:
Code:
osg::Box* b = new osg::Box(
All,
I have a question about LineSegmentIntersector. Does it always return all
intersections or does it have a feature that tells you whether or not you
got a hit or not? I have a need to use something for terrain masking from a
viewpoint to another location. In this case, all I want to know
...@lists.openscenegraph.org] On Behalf Of
Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Tuesday, August 24, 2010 1:13 PM
To: OpenSceneGraph Users
Subject: [osg-users] LineSegmentIntersector...
All,
I have a question about LineSegmentIntersector. Does it always return
all intersections or does it have a feature
input.
-Shayne
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson,
Gordon
Sent: Tuesday, August 24, 2010 11:37 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] LineSegmentIntersector...
In the past
Hi,
I finally found another post that gets pretty close to what I wanted, but did
not work right out of the box (see
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-January/021653.html).
I wrote the following function starting from the above post's code and it
Hi,
Does anyone know how to access the rgba texture values at the point of
intersection in a polygon found using osgUtil::IntersectionVisitor and
osgUtil::LineSegmentIntersector? Ideally I would pass a threshold to the
IntersectionVisitor so that it automatically skips intersecting polygons
Hi,
look at the intersection code in osgmovie. I think it gets the texture
coords of intersection.
jp
Matthew Hielsberg wrote:
Hi,
Does anyone know how to access the rgba texture values at the point of
intersection in a polygon found using osgUtil::IntersectionVisitor and
Hello Matthew,
Does anyone know how to access the rgba texture values at the point of
intersection in a polygon found using osgUtil::IntersectionVisitor and
osgUtil::LineSegmentIntersector? Ideally I would pass a threshold to the
IntersectionVisitor so that it automatically skips
Hi Julien-Charles,
The interesection code only using the node bounding spheres during
traversal, it doesn't use them for the final intersection calculation as
this is done against the actual primitives of the drawable leaves. I can't
say way is wrong with your setup, but it won't be a parental
Hi,
I am using LineSegmentIntersectors with IntersectionVisitor to do some ray
casting in my architecture. Everything works fine to select and move objects.
However I want to implement a drag-and-drop interaction, where I can move an
object onto another and have something different happen. I
Hello,
I am trying to use a LineSegmentIntersector and want to specify start and end
points in world space coordinates. Aditionally, the Drawable I want to
intersect has parent nodes with transformations (translate / rotate / scale).
How can I achieve this ?
regards,
bill
Hello Guillaume,
I am trying to use a LineSegmentIntersector and want to specify start
and end points in world space coordinates. Aditionally, the Drawable I
want to intersect has parent nodes with transformations (translate /
rotate / scale). How can I achieve this ?
When you use your
Hi,
I'm using osgUtil::LinesegmentIntersector to pick objects from my scene.
It works all fine except Geode containing line geometry (with LineWidth
stateset). But, I want to pick somes thick lines, how can I do?
Thanks in advance!
Aude
Créez votre adresse électronique [EMAIL PROTECTED]
Hi Aude,
a.lagnier schrieb:
Hi,
I'm using osgUtil::LinesegmentIntersector to pick objects from my scene.
It works all fine except Geode containing line geometry (with LineWidth
stateset). But, I want to pick somes thick lines, how can I do?
LinesegementIntersector cannot pick lines (or
Hi Judd,
I have done some work on osgUtil::IntersectionVisitor to add proper
support for Billboards. Could you try out the attached
IntersectionVisitor header/source files and let me know how you get
on. This builds against OSG-2.6/OSG-SVN, but might also compile
against 2.4.
In my own testing
It seems to work just fine in my application. Thanks for the support.
Judd
Robert Osfield wrote:
Hi Judd,
I have done some work on osgUtil::IntersectionVisitor to add proper
support for Billboards. Could you try out the attached
IntersectionVisitor header/source files and let me know how
Robert
I have added a method called set (did not know what to call it) that
allows you to set the start and end points for the LinSegmentIntersector
using the CooridnateFrame and the x, y values like one of the
constructors does. It just makes it easier to reset the start and end
points
Hi Judd,
Could you post your ammendments to osg-submissions.
Cheers,
Robert.
On Thu, Aug 14, 2008 at 5:11 PM, Judd Tracy [EMAIL PROTECTED] wrote:
Robert
I have added a method called set (did not know what to call it) that allows
you to set the start and end points for the
Hi Judd,
I've just tried
osgpick lz.osg
And zooming into the trees and attempting picking is showing no
intersections results where I'd expect. Reviewing the relevent code
in IntersectionVisitor.cpp suggests that there is no special code for
handling the local model transforms that are
Yes you are right. Code compiles fine in release-mode.
Greetings
Hagen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Hello everyone,
I using the following code:
Is it a bug? Its used inside C++/CLI Environment but inside a pure
native class.
This was halfways copypasted from one of the examples. It's a function
inside a GUIEventHandler called in cas of a GUIEvenetAdapter::REALESE:
void pick(const
HI Hagen,
I think there is a good chance that this is false reading or perhaps a
bug in your setup/environment.
FYI, the intersection visitor isn't multi-threaded so there will be no
need to enforce thread safe ref/unref.
Robert.
On Tue, Jul 22, 2008 at 9:38 AM, Kaiser, Hagen (CT)
[EMAIL
I traced the error now:
The function LineSegementIntersector::getFirstIntersection() executes
very well to the last bit that is:
Dereference _intersections.begin();
It jumps therefor to xtree.h :
reference operator*() const
{ // return designated value
Hi Hagen,
I believe the OSG code is OK, a quick code review just now doesn't
reveal anything that might be amiss. I have been told of bug with
certain combinations of VS's iterator debugging. I'm not a Windows
developers so the exact details went over my head, but my guess is
that this might be
Hi Glenn,
Your analysis is correct, when the DatabaseCacheReadCallback is
deployed one can potentially end up with dangling pointers.
Switching to ref counted NodePath would be the safest way to fix this.
There is a performance penalty though, which is why a straight
NodePath was used. There
84 matches
Mail list logo