Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Closest Point Along Ray Direction

7 REPLIES 7
Reply
Message 1 of 8
sachinshrestha
2028 Views, 7 Replies

Closest Point Along Ray Direction

This example file demonstrates getting the hit point on a mesh along a given ray direction from a ray origin point. The user can choose to return the closest point by distance if the ray misses.

 

 

The intersection test is performed by marching the ray along the ray direction. The max iterations count is high by default to ensure that the intersection test is accurate enough since I'm using a low threshold. The diagnostic output shows the hit point as green and ray as blue if the ray hits and hit point as yellow and ray as magenta if the ray misses.

 

Hope you find this useful.

 

Cheers,

Sachin

LinkedIn: https://www.linkedin.com/in/sachinshrestha/
Twitter: https://twitter.com/_sachinshrestha
Instagram: https://www.instagram.com/noizfactory/
SoundCloud: https://soundcloud.com/noizfactory
7 REPLIES 7
Message 2 of 8

Hi.

I'm intersted to what the purpose of this procedure.

I'm sorry i'm totally ignorant on this.

Thanks

Message 3 of 8

Not sure if I've understood you correctly but I guess you're asking how can this be used? Well, if you need to sample something on a mesh based on another mesh along its normal direction then this can he helpful. The closest point returns the closest point and not the intersection point along a ray so this is sort of a raycast example. Once you get the intersection point then you can do things like sample the intersection point's normal or binormals and use them to orient or constrain another object on that point, etc. You can also potentially use this for a shrink wrap type deformer. There can be different use cases.

 

Hope that helps.

LinkedIn: https://www.linkedin.com/in/sachinshrestha/
Twitter: https://twitter.com/_sachinshrestha
Instagram: https://www.instagram.com/noizfactory/
SoundCloud: https://soundcloud.com/noizfactory
Message 4 of 8

I've opened this, but it wasn't working, seems its missing some compounds 

Message 5 of 8

Could you post a screenshot of the missing compounds? 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
Message 6 of 8

Whoops, I mean to reply saying I found them,   I was missing the mjcg compounds:
https://forums.autodesk.com/t5/bifrost-forum/mjcg-compounds/m-p/8962108/highlight/true

Message 7 of 8
ShreddinPB
in reply to: sachinshrestha

Hey,  I am new to bifrost and am checking this out. I open the scene and get an error. I see the mention of mjcg compounds, so I installed those also and do see them when I hit tab to make new nodes. I tracked it down tho this (see image) is this how this is supposed to look? Seems to be missing some connections?

Is that another compound I need to find somewhere else?

Thanks for this!!

Message 8 of 8
ShreddinPB
in reply to: ShreddinPB

Soon after I appear to have found the solution, it appears the rebel_pack also needs to be installed.

I am leaving this here so if anyone else runs into this problem they can find the solution, thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums