Re: anyone know how ICE "get closest location" actually works under the hood?
Thanks, Steve! On Tue, Mar 31, 2020 at 1:30 AM Steven Caron wrote: > I am not suggesting you copy it... read the comments and treat it as a > guide as how to make your own. Jerome left really detailed comments! > > On Mon, Mar 30, 2020 at 6:47 PM Ben Paschke > wrote: > >> Oh man! I would if I could!! >> >> -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works
Thanks, Matt -- this is very helpful info. The brilliant kid developer we have working on this (a few years out of Stanford CS) went ahead and just built it in several hours night before last. It seems to work really well on splines; he's working on generalizing to surfaces next. Performance is pretty amazing on a fairly high-end GeForce GPU. 1M particles, all *inside* the cutoff distance, getting closest location on a curve, and pulling tangency and position data from there, runs at > 60fps. On Mon, Mar 30, 2020 at 7:05 PM Matt Lind wrote: > 'Get closest Locations' is patent protected, so you won't be able to do > anything commercial from the algorithm as implemented (but you may be able > to find it's description at the patent office). > > I spoke with the author of that tool at great length a few years ago as I > had questions about certain behaviors (bugs). He said the patented part > of > importance is the acceleration structures, which is a tree to store > results > of the searches. The benefits come from making certain assumptions about > when the tree needs to be updated in order to avoid unnecessary > computation. > > Location finding on meshes is basic linear algebra. You can derive it > yourself using the following: > > - distance equation (Pythagorean) > - the plane equation > - point inside a triangle > - projections > - vector dot product (aka inner scalar product) > - vector cross product > - determinant > - linear transformations > - fundamental understanding of barycentric coordinates. > > For example, finding closest vertex is no more complicated than iterating > through all the vertices of the mesh and computing the Pythagorean > distance > (d = sqrt( x^2 + y^2 + z^2) ), then choosing the vertex with the smallest > value of d. If you want closest location, the computation is a bit more > involved, but same general principle. In either case, you need to make > sure > the origin of your search is in the same coordinate space as your mesh. > That's where linear transformations and projections come into play. > > Brute force techniques are accurate and easy to implement, but perform > slowly. That may be adequate for situations where performance is not > critical such as a pick session. However, If you want speed, you'll need > a > more intelligent method to search only the parts of the mesh which are > likely to produce the desired result. That can get complex really fast > depending on your situation. > > I can't speak too much about implementation on a GPU other than to say you > have to organize your data and algorithm to consider race conditions and > other usual issues of multi-threaded environments. > > Matt > > > > Date: Sun, 29 Mar 2020 21:41:31 -0400 > From: Ed Manning > Subject: anyone know how ICE "get closest location" actually works > under the hood? > To: "Softimage Users Mailing List." > > need to reverse-engineer it in c++ > > thanks! > > > > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works under the hood?
I am not suggesting you copy it... read the comments and treat it as a guide as how to make your own. Jerome left really detailed comments! On Mon, Mar 30, 2020 at 6:47 PM Ben Paschke wrote: > Oh man! I would if I could!! > > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works under the hood?
Oh man! I would if I could!! - Original Message - > From: "Steven Caron" > To: "Official Softimage Users Mailing, List. > https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78rjo3fW-2BI05z8hPddj-2BYSrjut8V8Kr3SyUl8pLj-2FCGT-2FDhxNh9a-2B87fHsQzXGv8Z96f6mCYq4LnbYGm0CnG0VhKkoPOlH1i65L7uusvYX29FBW1E5Fbt4zIDiv31Gl3tCPY9OhPc88qeP2gNYzOXnnzB3FVNAPzUrtN-2BzEghymRk2sSrXRWJUad1U5lnS-2FD3IKM-2BojGZoBlhf1sr1vtKy0S8LUFa7bb68OOW7wGiO-2BDVEW93ThOd3V-2F49yRtaCqybKsLO7masimGJW-2BMoOhC5kcz-2BZrRpUUPqlmOjDnzNDBgBQxkY3pfZywnVeCn5oabmARpemGffpqmlJcxSDctgsF21Q8ram4DuE0TvQONxocF5P9JzqcTdPEP7nqH6awnKeA-3D-3DoJy__x9fWPgxQbfi69QJnHJqUKZsAJHrwlN1lgOIh62WX2fTRFAU6I8LzpsLwlCpOCJX7DT6lNl0YyWQSNgY-2FQbiXTIoIUdsEnuY3W9hKzT49rdWsy5UX-2FujHWg95uHm6pTJgmNUoULN-2BhTnzvxSxuOoReAnhRaaD1AFmAKEwkw7ZMdKQdtoJkWfIzwYRJEBIWDFm0Kc3C3DBD0HsVIf70F-2FsH6-2BIgfrrc9ajVhoYyZA7-2BMGqzo-2FGT4Jz9aEiiHQYf-2Bi7 > " > > Sent: Tuesday, 31 March, 2020 11:44:40 AM > Subject: Re: anyone know how ICE "get closest location" actually works under > the hood? > oh, if we are going that route I would look up the FabricEngine implementation > as a guide/hint since it was written by the same person who maintained much of > the Softimage implementation. > > > > On Mon, Mar 30, 2020 at 5:48 PM Ben Paschke < [ mailto:ben.pasc...@rsp.com.au > | > ben.pasc...@rsp.com.au ] > wrote: > > > Just for ideas, maybe you could check out blender source code for the > implementation of their closest_point_on_mesh function? > Possibly in here somewhere: [ > https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78riS8c7imIC4PYtRuv4xtaUFosZVsJb0-2F1opeLvVTOx0OZlPeGw4CGihmP5t3Y5i0exqRMrE0P2ejgnahdoEMl0M8sbUIO2FrIhd9hWiB6IYz-2BEJLf1k3vKyuB0fLMi6mMfQ5mHM4KSEx6lnOh6A5ZOBLYJGMFXyDJ-2BxZWjD0e3fNzvt-2F2YCN4lp2n8sVKwxCPIua0pbSL4e6k2-2Bvao1w9hd4abf-2BJrHq15qZdNECvEcxG-2BV5bkFBaL54zCP0IKey0DEwBakBf-2Bvw-2FleOsDa70H0LptCqva8vKtGlyEUSl658Qx-2FQ8oU9tQrpnaQWTgqR8Te16TYL4zaw3sTdYf4wKEISClYwXLm2p565bJK8vdO9Bx7UaRkXXWePUhvsvij8owXrpBgdIm7kfcYFzGY-2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NkrDGUr55gdCiqTlGgl8Qkgf4Ca1f0bNHWyizPX-2BfAAbj6yaRpfkDvLW7jMRjD-2B9-2FeILvX3T4IRiO6Ch0nPPgHyJ3hWeakuL6tdywPo4IDjBAZxPU4cmULrJEhQV9JtkUOa1R2iz6D0rBNzYlPTg-3D-3DBrb4_x9fWPgxQbfi69QJnHJqUKZsAJHrwlN1lgOIh62WX2fTRFAU6I8LzpsLwlCpOCJX7DT6lNl0YyWQSNgY-2FQbiXTObqvGAGoSTYYI3ch6SXJynK8T0ZFG4XWRCLPTvQJbCuUwANZNXSmKD7tdz03gZHMQ6RV9B0v5R2tfaNaZV-2Bcb1QwRW6WXWiWQROZ-2BVAdC9o5Wqr6UtJAAaCNHha15vN0ZkyFR36vqYIkxduP5O6kCxA54mcnhdYtQ-2Fk8KQDqNj4 > | > https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78rjo3fW-2BI05z8hPddj-2BYSrjut8V8Kr3SyUl8pLj-2FCGT-2FDLSRVI-2BJtA9WEfSslUfvcKBeq39MM4UMlr8qjXGeMzyr5eAItyf4Oswqj13ZSv0cLHuzjn15e9cCpEDuWPypLX5rk3XswSPY7xwhJo-2F-2BGiTa9A7vzluNJre-2FXSZcqIp3Rf9Wi6Ac5vQF1My2TGVmPNwV66ZOEDDFbHB3C30xnZA
Re: anyone know how ICE "get closest location" actually works under the hood?
oh, if we are going that route I would look up the FabricEngine implementation as a guide/hint since it was written by the same person who maintained much of the Softimage implementation. [image: image.png] On Mon, Mar 30, 2020 at 5:48 PM Ben Paschke wrote: > Just for ideas, maybe you could check out blender source code for the > implementation of their closest_point_on_mesh function? > Possibly in here somewhere: > https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78rjo3fW-2BI05z8hPddj-2BYSrjut8V8Kr3SyUl8pLj-2FCGT-2FDLSRVI-2BJtA9WEfSslUfvcKBeq39MM4UMlr8qjXGeMzyr5eAItyf4Oswqj13ZSv0cLHu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R-2BQ-2FRGqH3Fkak9O2GAwZDazO5yEIc9S5aTi9z8MnQUL-2BBql5OGhjb9bgo4hYEsMQpRgpI-2FI9bXqjARU3jbsbNImhYRNw0H0GHskKzhe917Td5dD8uHcMgczk4fCdHb8AlR6f57-2Fc0t3capxzM-2BE53aypkD6uVC6-2B8CCzX31gc2It2W1SzvK-2FpRrg3yDHYrS9AAZE8EemF4k1QkS7IGPCGf9lUEwdvmUwkBsLFlf7LFPnsjbmJMWTyeCdBLPT5bmICAtkARJY9U1nBvVCQSB5IlbFYFedEE1-2BQlqimdbaybFhtEs9-2FeMl2zEzIX5dpeHW-2FFQAThbRM0AEsBndhT0hX3jvq59-2BLwNGAJkaRv8y4-2F4g-3D-3DE9vW_x9fWPgxQbfi69QJnHJqUKZsAJHrwlN1lgOIh62WX2fSoNzffEIRFaNX7xN-2FSHeTW2-2B4J6T5HMCGvNJXyN1RXnAhkn0kdYMmMaPXS3aSJy7coN9ZZ6k9ZCfhDGUD95VC-2BsRKB9q2s9J-2F3xuJrej8FsWs3fRGjEAF4vVYTtEyXnjJwhtvMYrL4uzI-2BdRblZyMyO-2FdlWpyyXJbX0BhCfWkQn0o2BpXcomwAX7TyM6acQeM-3D > > > - Original Message - > > From: "Ed Manning" > > To: "Official Softimage Users Mailing, List. > https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78rjo3fW-2BI05z8hPddj-2BYSrjut8V8Kr3SyUl8pLj-2FCGT-2FDLSRVI-2BJtA9WEfSslUfvcKBeq39MM4UMlr8qjXGeMzyr5eAItyf4Oswqj13ZSv0cLHuzjn15e9cCpEDuWPypLX5rk3XswSPY7xwhJo-2F-2BGiTa9A7vzluNJre-2FXSZcqIp3Rf9Wi6Ac5vQF1My2TGVmPNwV66ZOEDDFbHB3C30xnZAyiTe15sWUjPYkXp1VQ4WGwqX638JLcxeVhFTTYABOFp84KFuZTzynZP3oBp8-2F9HhwkheDIKBc2o2j9jL4YMwKNi1OyZTe7fVsk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FQ1POMLQOAIQ-3D-3Dhfdh_x9fWPgxQbfi69QJnHJqUKZsAJHrwlN1lgOIh62WX2fSoNzffEIRFaNX7xN-2FSHeTW2-2B4J6T5HMCGvNJXyN1RXnOgVpGW28av3Cp1U3KaQzTO6KjeXdLemyVoKq4A2eb-2BE6SV0cK97Dh0sVNjI5XP3xJor-2FjwyBIwkfiMfOSN1Rt-2BvAtwAZGjvFpw-2B6Lfc3LDL5bNvHi7-2BXms3Tuvu2hV4AH38sX4EDV3PTtmNVhOyP-2Fs-3D > > " > > > > Sent: Monday, 30 March, 2020 12:13:06 PM > > Subject: anyone know how ICE "get closest location" actually works under > the hood? > > > need to reverse-engineer it in c++ > > > > thanks! > > > > > > > > -- > > Softimage Mailing List. > > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with > > "unsubscribe" in the subject, and reply to confirm. > > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works under the hood?
Just for ideas, maybe you could check out blender source code for the implementation of their closest_point_on_mesh function? Possibly in here somewhere: https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78rjo3fW-2BI05z8hPddj-2BYSrjut8V8Kr3SyUl8pLj-2FCGT-2FDeNKab7qfuyVCb3REukB7uOLzA5famBZ-2B-2F8zifufqpDPuQ7wQLjRylwsiJRsu59ZGmY-2B1E-2F0Fmg51M2sa35sxukGSO3EjQaY-2BBx42JE-2Fp-2F8AvZjIxx-2BiLvNnYzTcpSFKM1lo0SlbQq6EZsnDNfmf9Pz2GB2xb-2FJyU367clFaW7LGa0vi9RVBFToNbK71QlFYG2Af6DuYKQ5CxDsfL-2FI3MY5l7kJ8dT0K8f1HwIjBCT-2Fls0aWQT0a6cOZrjligXWxqbPTcy-2FpKPd4ABsuOWI5BGMi2mTMT1kTDc-2BDXE0ybHYRSip8006Vh2VbhYL2TxAqU-2BNNDld6iqJJqAfb7rZQ-2BQmtKltTV4kWSPvrL1N4zC9gXUIYWXehOrmzeoiwE9-2BhzYl-2Fjuw74Wus5jmgEimpNoQ-3D-3DH2VV_x9fWPgxQbfi69QJnHJqUKZsAJHrwlN1lgOIh62WX2fRjhCTUBdu-2F0zyafUDoOOGPVOqpBDJpKKHFfy1c-2FFsexjxhOrVa19bbVt3mqQpfKvnjbSnsL0JjiDkQgB1kYeShQG4Zp6krwG518O6z0u8tO-2FbugBLZhMiRvOfovqVQoajfXhLSJ3ayUZ6sjnGLewttpuUEcTi9b0tXwKBDz6Ru-2FJJjMMKLDLzE73h7-2F-2Becc4Q-3D - Original Message - > From: "Ed Manning" > To: "Official Softimage Users Mailing, List. > https://u9432639.ct.sendgrid.net/ls/click?upn=A5uD99yDGgJFqsHo0L78rjo3fW-2BI05z8hPddj-2BYSrjut8V8Kr3SyUl8pLj-2FCGT-2FDhxNh9a-2B87fHsQzXGv8Z96f6mCYq4LnbYGm0CnG0VhKkoPOlH1i65L7uusvYX29FBW1E5Fbt4zIDiv31Gl3tCPc7MMAFxQdvlA-2B8oPuiN0YJ5ex7QUoMLMl91MxxwPVf7Hb4weiIZSgW5qmpRWDqxw0SyQzqiDgOD5U8PMABjZu7t8VEQqXUG0BWQ2j1BxboQtsPNJHucCv388qyiL5lOD6-2Bd6zVbD-2BGWRIalt4mhRf0avwipYdRF3HAZn8C7cOIgWi8vVzRp7o6BFPY3-2BX5JJBi6RIxvnyAkbSwkDIcBIULTfQu57FpOLT9ypd-2BcAmN55I1F9wPbb18-2BD-2FWmGuY7Uw-3D-3DgH4J_x9fWPgxQbfi69QJnHJqUKZsAJHrwlN1lgOIh62WX2fRjhCTUBdu-2F0zyafUDoOOGPVOqpBDJpKKHFfy1c-2FFsexiccuqKa5XalG3y2nHuAhUz4JXxx5ZrI4OnIcPb6eKxFAaazA-2BlDtFVao0MgNHdIjmcVXXl6MNEA-2F-2Fm0c0qx0Ok-2BvhycxFz0I9yXM29QDQU4s9WjMiB2HRbfwqofrFvGNVlYIkqRKYEzBa6IyTQLsQU-3D > " > > Sent: Monday, 30 March, 2020 12:13:06 PM > Subject: anyone know how ICE "get closest location" actually works under the > hood? > need to reverse-engineer it in c++ > > thanks! > > > > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with > "unsubscribe" in the subject, and reply to confirm. -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works
'Get closest Locations' is patent protected, so you won't be able to do anything commercial from the algorithm as implemented (but you may be able to find it's description at the patent office). I spoke with the author of that tool at great length a few years ago as I had questions about certain behaviors (bugs). He said the patented part of importance is the acceleration structures, which is a tree to store results of the searches. The benefits come from making certain assumptions about when the tree needs to be updated in order to avoid unnecessary computation. Location finding on meshes is basic linear algebra. You can derive it yourself using the following: - distance equation (Pythagorean) - the plane equation - point inside a triangle - projections - vector dot product (aka inner scalar product) - vector cross product - determinant - linear transformations - fundamental understanding of barycentric coordinates. For example, finding closest vertex is no more complicated than iterating through all the vertices of the mesh and computing the Pythagorean distance (d = sqrt( x^2 + y^2 + z^2) ), then choosing the vertex with the smallest value of d. If you want closest location, the computation is a bit more involved, but same general principle. In either case, you need to make sure the origin of your search is in the same coordinate space as your mesh. That's where linear transformations and projections come into play. Brute force techniques are accurate and easy to implement, but perform slowly. That may be adequate for situations where performance is not critical such as a pick session. However, If you want speed, you'll need a more intelligent method to search only the parts of the mesh which are likely to produce the desired result. That can get complex really fast depending on your situation. I can't speak too much about implementation on a GPU other than to say you have to organize your data and algorithm to consider race conditions and other usual issues of multi-threaded environments. Matt Date: Sun, 29 Mar 2020 21:41:31 -0400 From: Ed Manning Subject: anyone know how ICE "get closest location" actually works under the hood? To: "Softimage Users Mailing List." need to reverse-engineer it in c++ thanks! -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works under the hood?
touchdesigner. Should have mentioned we need it run on the GPU. On Mon, Mar 30, 2020 at 1:06 AM Steven Caron wrote: > I don't know the exact implementation but generally speaking they are > spatial queries backed by some sort of an acceleration structure with some > barycentric coordinates to get a polygon position/location. Assuming your > mesh data structure has attributes to interpolate you can do that with the > weights I believe. > > Are you reverse-engineering in Softimage or another program? > > On Sun, Mar 29, 2020 at 6:42 PM Ed Manning wrote: > >> need to reverse-engineer it in c++ >> >> thanks! >> >> >> -- >> Softimage Mailing List. >> To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com >> with "unsubscribe" in the subject, and reply to confirm. >> > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: anyone know how ICE "get closest location" actually works under the hood?
I don't know the exact implementation but generally speaking they are spatial queries backed by some sort of an acceleration structure with some barycentric coordinates to get a polygon position/location. Assuming your mesh data structure has attributes to interpolate you can do that with the weights I believe. Are you reverse-engineering in Softimage or another program? On Sun, Mar 29, 2020 at 6:42 PM Ed Manning wrote: > need to reverse-engineer it in c++ > > thanks! > > > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.