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: 

Raycast

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

Raycast

Wanted to try building a raycast node since there's no built-in node yet. I have constructed an ultra simple graph for now that raycasts a single point onto a target mesh from a source mesh. The hit point turns red if its outside the mesh.

 

Used this excellent resource for the math. I have attached a WIP graph if you want to test it yourself. Please remove the .txt extension as the maya board does not seem to allow json files (should probably be chnaged). Note that I have used the rebel pack for some compounds. I will be working on making this more generalized next and to make it work with more points and eventually mesh objects.

 

Cheers,

Sachin

 

bifrost_raycast_single_point_hit_test.gif

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
mjcg91
in reply to: sachinshrestha

Cool stuff! 

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 3 of 8

That's some pretty incredible work, really awesome to see! If it worked with strands too, that'd be amazing - maybe I'll try to do that, I love projects like this 😄

 

I know @sachinshrestha already knows this, but for everyone else we do absolutely intend to have a full suite of spatial queries like raycast, closest points, etc.. but it's great to see how inventive and self-sufficient people are. 

 

I'll get the issue with inability to attach .json files logged. 

Jonah Friedman
Bifrost Product Manager
Message 4 of 8

Thanks @jonah.friedman! Its a lot of fun to solve some of these problems visually in bifrost. Re this working with strands, here is a simple example of a ray line intersection where the line is a strand with just a start point and end point. Of course, this is as simple as it gets. Getting this to work on a non straight strand made of up multiple line segments would be my next attempt. The graph is a bit mucky so not sharing it right now but should be easy to rebuild if one follows numerous examples online for this problem. I followed this specific example.

 

On an unrelated note, I noticed that the bifrost viewport was not getting updated correctly when the anti-aliasing was on. I had to always tumble or pan around to see the updated results. So I had to turn that off when screen grabbing this gif.

 

Cheers,

Sachin

 

Simple ray to line intersection testSimple ray to line intersection test

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

Glad to hear it's fun 🙂

 

Please post the scene file that reproduces the viewport not updating with AA issue, I have not seen that one. Also please include what version of Bifrost, Maya, and OS you're suing. 

Jonah Friedman
Bifrost Product Manager
Message 6 of 8

Hi Jonah,

 

I was unable to reproduce the issue again at my end. Tried a few things and updates seem to work fine right now. Could have an issue with my machine. Just for the record here are the specs:

 

Maya 2019.2 (Cut ID 201907021615-48e59968a3)

Bifrost 2.0.1.1

CentOS 7.6.1810 (3.10.0-957.5.1.el7.x86_64)

 

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
Message 7 of 8

Closest point test without using the built-in node.

 

Cheers,

Sachin

bifrost_closest_point.gif

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

Attaching the scene file. I've cleaned up the node names a bit so it should be hopefully clear on what's going on. Was feeling lazy to turn this into a compound or add backdrops etc. Btw, backdrops seem a bit redundant right now as the nodes they contain can go outside of the backdrop if you were to auto-layout the graph (the L hotkey). I also may have some redundant parts in the graph which I'm sure can be cleaned up or made simpler.

 

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

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

Post to forums  

Autodesk Design & Make Report