Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Jean-Sébastien Guay
Hello Adrian,

> what i do at the moment is, i walk trought the drawables and collect all
> triangles, so i don't care about material, ... nor transformations. what i
> should do is to transform the triangles before insertion. but i don't like
> this way. another possibility is:
> for each geometry (hard) we can attache a kd-tree object, and then the
> intersection visitor transforms the objects when a transformation node is
> used, this is the
> way it works with the current intersection visitor (if i am not wrong), so i
> like just to replace a small part of code in OSG core, to check a ray (line)
> against the kd-tree
> and not against the list of triangles in the geometry. so we can speed up
> the intersection testing. but what we need is to implement this into osg
> core.

That second way makes more sense. But you don't necessarily need to  
integrate it into the core OSG...

If you want to do that without having to wait for someone to integrate  
it into the core OSG, you could just copy the classes you need from  
the OSG source tree into your sources, rename them so they don't clash  
and then modify them as needed. That way we could progress on this and  
later, when Robert is available, you'll have even less changes needed  
to integrate your code into the core.

J-S
-- 
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Adrian Egli
Hi Jean-Sebastien,

what i do at the moment is, i walk trought the drawables and collect all
triangles, so i don't care about material, ... nor transformations. what i
should do is to transform the triangles before insertion. but i don't like
this way. another possibility is:
for each geometry (hard) we can attache a kd-tree object, and then the
intersection visitor transforms the objects when a transformation node is
used, this is the
way it works with the current intersection visitor (if i am not wrong), so i
like just to replace a small part of code in OSG core, to check a ray (line)
against the kd-tree
and not against the list of triangles in the geometry. so we can speed up
the intersection testing. but what we need is to implement this into osg
core.

/adegli

2007/10/29, Jean-Sébastien Guay <[EMAIL PROTECTED]>:
>
> Hello Adrian,
>
> > The code as it stands does not currently support transforms. Can you
> >> help with that? I have never personally implemented a kd-tree
> >> algorithm, so I do not know where this support of transforms needs to
> >> be put in.
> >
> > correct, but when we have integrated it into the core of osg, then it
> should
> > work as expected.
>
> I still don't understand why the code would
> a) not support transformations if it isn't integrated into core OSG
> b) support them once it is.
>
> It's the same code, it won't "magically" support transforms, you need
> to write the code for that... Please explain, because there's
> something I'm missing here.
>
> J-S
> --
> __
> Jean-Sebastien Guay [EMAIL PROTECTED]
>  http://whitestar02.webhop.org/
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Jean-Sébastien Guay
Hello Adrian,

> The code as it stands does not currently support transforms. Can you
>> help with that? I have never personally implemented a kd-tree
>> algorithm, so I do not know where this support of transforms needs to
>> be put in.
>
> correct, but when we have integrated it into the core of osg, then it should
> work as expected.

I still don't understand why the code would
a) not support transformations if it isn't integrated into core OSG
b) support them once it is.

It's the same code, it won't "magically" support transforms, you need  
to write the code for that... Please explain, because there's  
something I'm missing here.

J-S
-- 
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Cedric Pinson
Hello,
I am interested by the subject but right now i just have time to help 
you in testing


Jean-Sébastien Guay wrote:
> Hello Adrian,
>
>   
>> i am working on a really general and fast implementation for reduce the
>> number of triangles checked against a line in LineSegement Intersection
>> Test.
>> May question coming up while reviewing the OSG core implementation, i am not
>> yet sure how and where i should implement this new feature. The current
>> implementation of KD-Tree is quite fast and could be included into the osg
>> core. are there some experience in line segement boosting?
>> 
>
> I would very much like to use your contribution, however it does not  
> seem Robert has time to guide you in integrating it for now. It would  
> therefore be very kind if you could help make it usable without  
> integrating it into the Core OSG.
>
> The code as it stands does not currently support transforms. Can you  
> help with that? I have never personally implemented a kd-tree  
> algorithm, so I do not know where this support of transforms needs to  
> be put in.
>
> I would really appreciate your help with this since in an example use  
> case, my current implementation with LineSegmentIntersector takes  
> about 2 minutes and with your kd-tree it takes about 11 seconds (with  
> bad results, but still promising).
>
> Thanks in advance,
>
> J-S
>   

-- 
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Raymond de Vries
Hi,

I have been reading (most of) your messages with great interest. Your work
might be interesting for a project in which I am involved so I would be
glad to help you. Unfortunately I am a newbie in raytracing
implementations so you need to guide me a little here and there.

Feel free to contact me offline too.

bye
Raymond


> So what's going on for the next month,
>
> Line Intersecting behaviour:
> (a) integrating the code into OSG
> (b) testing
> (c) optimising and so on
>
> is there some one how can support me? (not Robert, he is still really
> busy,
> isn't he?)
>
> Only for testing the kd-Tree implementation and it's speed:
> http://www.openscenegraph.org/projects/osg/wiki/RayTraced
>
> /adegli
>
> 2007/10/24, Jean-Sébastien Guay <[EMAIL PROTECTED]>:
>>
>> Hello Adrian,
>>
>> > i am working on a really general and fast implementation for reduce
>> the
>> > number of triangles checked against a line in LineSegement
>> Intersection
>> > Test.
>> > May question coming up while reviewing the OSG core implementation, i
>> am
>> not
>> > yet sure how and where i should implement this new feature. The
>> current
>> > implementation of KD-Tree is quite fast and could be included into the
>> osg
>> > core. are there some experience in line segement boosting?
>>
>> I would very much like to use your contribution, however it does not
>> seem Robert has time to guide you in integrating it for now. It would
>> therefore be very kind if you could help make it usable without
>> integrating it into the Core OSG.
>>
>> The code as it stands does not currently support transforms. Can you
>> help with that? I have never personally implemented a kd-tree
>> algorithm, so I do not know where this support of transforms needs to
>> be put in.
>>
>> I would really appreciate your help with this since in an example use
>> case, my current implementation with LineSegmentIntersector takes
>> about 2 minutes and with your kd-tree it takes about 11 seconds (with
>> bad results, but still promising).
>>
>> Thanks in advance,
>>
>> J-S
>> --
>> __
>> Jean-Sebastien Guay [EMAIL PROTECTED]
>>  http://whitestar02.webhop.org/
>>
>> 
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> --
> 
> Adrian Egli
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Adrian Egli
Hi Jean-Seb,

2007/10/24, Jean-Sébastien Guay <[EMAIL PROTECTED]>:
>
> Hello Adrian,
>
> > i am working on a really general and fast implementation for reduce the
> > number of triangles checked against a line in LineSegement Intersection
> > Test.
> > May question coming up while reviewing the OSG core implementation, i am
> not
> > yet sure how and where i should implement this new feature. The current
> > implementation of KD-Tree is quite fast and could be included into the
> osg
> > core. are there some experience in line segement boosting?
>
> I would very much like to use your contribution, however it does not
> seem Robert has time to guide you in integrating it for now. It would
> therefore be very kind if you could help make it usable without
> integrating it into the Core OSG.



greate

The code as it stands does not currently support transforms. Can you
> help with that? I have never personally implemented a kd-tree
> algorithm, so I do not know where this support of transforms needs to
> be put in.


correct, but when we have integrated it into the core of osg, then it should
work as expected.


I would really appreciate your help with this since in an example use
> case, my current implementation with LineSegmentIntersector takes
> about 2 minutes and with your kd-tree it takes about 11 seconds (with
> bad results, but still promising).


:-)

Thanks in advance,
>
> J-S
> --
> __
> Jean-Sebastien Guay [EMAIL PROTECTED]
>  http://whitestar02.webhop.org/
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-29 Thread Adrian Egli
So what's going on for the next month,

Line Intersecting behaviour:
(a) integrating the code into OSG
(b) testing
(c) optimising and so on

is there some one how can support me? (not Robert, he is still really busy,
isn't he?)

Only for testing the kd-Tree implementation and it's speed:
http://www.openscenegraph.org/projects/osg/wiki/RayTraced

/adegli

2007/10/24, Jean-Sébastien Guay <[EMAIL PROTECTED]>:
>
> Hello Adrian,
>
> > i am working on a really general and fast implementation for reduce the
> > number of triangles checked against a line in LineSegement Intersection
> > Test.
> > May question coming up while reviewing the OSG core implementation, i am
> not
> > yet sure how and where i should implement this new feature. The current
> > implementation of KD-Tree is quite fast and could be included into the
> osg
> > core. are there some experience in line segement boosting?
>
> I would very much like to use your contribution, however it does not
> seem Robert has time to guide you in integrating it for now. It would
> therefore be very kind if you could help make it usable without
> integrating it into the Core OSG.
>
> The code as it stands does not currently support transforms. Can you
> help with that? I have never personally implemented a kd-tree
> algorithm, so I do not know where this support of transforms needs to
> be put in.
>
> I would really appreciate your help with this since in an example use
> case, my current implementation with LineSegmentIntersector takes
> about 2 minutes and with your kd-tree it takes about 11 seconds (with
> bad results, but still promising).
>
> Thanks in advance,
>
> J-S
> --
> __
> Jean-Sebastien Guay [EMAIL PROTECTED]
>  http://whitestar02.webhop.org/
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-24 Thread Jean-Sébastien Guay
Hello Adrian,

> i am working on a really general and fast implementation for reduce the
> number of triangles checked against a line in LineSegement Intersection
> Test.
> May question coming up while reviewing the OSG core implementation, i am not
> yet sure how and where i should implement this new feature. The current
> implementation of KD-Tree is quite fast and could be included into the osg
> core. are there some experience in line segement boosting?

I would very much like to use your contribution, however it does not  
seem Robert has time to guide you in integrating it for now. It would  
therefore be very kind if you could help make it usable without  
integrating it into the Core OSG.

The code as it stands does not currently support transforms. Can you  
help with that? I have never personally implemented a kd-tree  
algorithm, so I do not know where this support of transforms needs to  
be put in.

I would really appreciate your help with this since in an example use  
case, my current implementation with LineSegmentIntersector takes  
about 2 minutes and with your kd-tree it takes about 11 seconds (with  
bad results, but still promising).

Thanks in advance,

J-S
-- 
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-22 Thread Adrian Egli
Hi Daniel,

i am working through this projects, for real time ray tracing. (I assum this
would be a really fast implementation for LineIntersection tests :-) )
http://www.devmaster.net/articles/raytracing_series/part7.php
http://ompf.org
http://phantom.coldcity.com/

but thanks for the link, i worked once with RAPID, but isn't as stable as it
should be, may OPCODE is much more robust compared against
RAPID. (Rapid and OPCode is quite old, and may there is no active community
left, i don't know).

/adrian


2007/10/22, Kallfass, Daniel, SDGE1 <[EMAIL PROTECTED]>:
>
>  Hi Adegli,
>
>
>
> have a look at opcode:
>
> http://www.codercorner.com/Opcode.htm
>
> (It's used as a collision word for e.g. for the physics engine "ode").
>
>
>
> Daniel
>
>
>
>
>  --
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Adrian Egli
> *Sent:* Sunday, October 21, 2007 10:11 PM
> *To:* OpenSceneGraph Users
> *Subject:* [osg-users] kd-Tree LineIntersection speedUp
>
>
>
> *Hi all,
>
> i am working on a really general and fast implementation for reduce the
> number of triangles checked against a line in LineSegement Intersection
> Test.
> May question coming up while reviewing the OSG core implementation, i am
> not yet sure how and where i should implement this new feature. The current
> implementation of KD-Tree is quite fast and could be included into the osg
> core. are there some experience in line segement boosting?
>
> /Adegli
>
>
> have alos a look at:
> [osg-users] Searcing for raytracer implementation based on OSG*
>
>
>
>
> --
> 
> Adrian Egli
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-22 Thread Kallfass, Daniel, SDGE1
Hi Adegli,

 

have a look at opcode:

http://www.codercorner.com/Opcode.htm

(It's used as a collision word for e.g. for the physics engine "ode").

 

Daniel

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian
Egli
Sent: Sunday, October 21, 2007 10:11 PM
To: OpenSceneGraph Users
Subject: [osg-users] kd-Tree LineIntersection speedUp

 

Hi all, 

i am working on a really general and fast implementation for reduce the
number of triangles checked against a line in LineSegement Intersection
Test. 
May question coming up while reviewing the OSG core implementation, i am
not yet sure how and where i should implement this new feature. The
current 
implementation of KD-Tree is quite fast and could be included into the
osg core. are there some experience in line segement boosting? 

/Adegli 


have alos a look at: 
[osg-users] Searcing for raytracer implementation based on OSG 




-- 

Adrian Egli 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] kd-Tree LineIntersection speedUp

2007-10-22 Thread Robert Osfield
Hi Adrian,

I have had the time to review you submissions yet, but as a general
note, in the past I have tentatively planned to use the osg::Shape
hierarchy to build a much finer grained segmentation of osg::Geometry
- a granularity which is appropriate for ray and other types of
intersection testing.  This could be done a s KD-Tree.

One needn't use osg::Shape though, perhaps a custom data structure for
this type of work might be better.  I'd suggest putting it into the
core though so that tools like osgUtil::IntersectionVisitor and its
associated Intersector classes can all use it.

I have also wondered about the possibility of using a custom
Registry::ReadFileCallback to automatically generate the intersection
data structures.

Robert.

On 10/21/07, Adrian Egli <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> i am working on a really general and fast implementation for reduce the
> number of triangles checked against a line in LineSegement Intersection
> Test.
> May question coming up while reviewing the OSG core implementation, i am not
> yet sure how and where i should implement this new feature. The current
> implementation of KD-Tree is quite fast and could be included into the osg
> core. are there some experience in line segement boosting?
>
> /Adegli
>
>
> have alos a look at:
> [osg-users] Searcing for raytracer implementation based on OSG
>
>
>
>
> --
> 
> Adrian Egli
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] kd-Tree LineIntersection speedUp

2007-10-21 Thread Adrian Egli
*Hi all,

i am working on a really general and fast implementation for reduce the
number of triangles checked against a line in LineSegement Intersection
Test.
May question coming up while reviewing the OSG core implementation, i am not
yet sure how and where i should implement this new feature. The current
implementation of KD-Tree is quite fast and could be included into the osg
core. are there some experience in line segement boosting?

/Adegli


have alos a look at:
[osg-users] Searcing for raytracer implementation based on OSG*




-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org