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: 

visualize bifrost object geometry propperties by color

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
calibrix
892 Views, 4 Replies

visualize bifrost object geometry propperties by color

I am in the process of trying to learn the workings of BiFrost. I have quite a bit of experience in houdini and in many aspects I start my learning process in BiFrost by trying to replicate a Houdini workflow and see what improvements BiFrost can offer. One sticking point that I've come across is how to visualize data. BiFrost seems to go to great lengths to hide data from users. For example, in Houdini I can middle click a node and can see every attribute. I can use the geometry spreadsheet to see specific data values for attributes. I can use nodes to convert attribute data to color that can be easily visualized in the viewport. BiFrost seems to lack these basic features. If I'm scattering points on a surface and add a custom per point property that I want to then use to drive a simulation aspect, how can I visualize that property? There's no "point to color" node. There isn't a "point_color" attribute that controls point colors in the viewport. "Point_scope" has a default color, but it doesn't have any functionality to display specific colors per point. I would like to suggest that watchpoints are very limited in how they display data. Dumping data to a text file is incredibly cumbersome at best. Is there something I'm missing?

Labels (1)
4 REPLIES 4
Message 2 of 5
wuhailu
in reply to: calibrix

Houdini is a finished software, and Bifrost is still in development.
I guess Bifrost is currently mainly developing FX special effects modules and performance optimization, and other functions are later.
I think performance optimization is the main thing.

Message 3 of 5
calibrix
in reply to: wuhailu

Sorry. This came off as a little ranty, it was a long day. My question is: Does BiFrost have functionality similar to what I described? I have been unable to find it, but that does not mean it doesn't exist.

Message 4 of 5
labbejason
in reply to: calibrix

Hey calibrix,

 

It is possible to visualize data to color, though not as straight forward as slapping in a node that will do the work (something to hope in the future!).

 

What you can do is use the `set_geo_property` node and set `property` to `color`, and target as `point_component`. Since the property is a color, set the node's `default` parameter to a float4 value. Make this an obvious color so you know if later steps have an issue. Then plug the geometry you want to visualize onto the input geometry parameter. The last thing you need to plug into is `data`, which will be the data you want to actually visualize. This needs to be an array of float4 (rgba) values between 0-1. Once that's in you can take the output geometry and plug it into the top-level output to create a bif and see the result.

 

It's a bit tricky at first as you have to make sure the data you plug in are actually values between 0-1. An example: I had a compound that would select vertexes, though I wasn't sure what vertexes it was getting at first so I needed to visualize it. Here's a graph that I used to visualize boolean values:

set_colors_example.jpg

 

Here's a video example of what that's doing.

 

I'm doing some calculations in the `for_each` that outputs a boolean for each point. Then I plug that into an `if` node. Any point that evaluates to true will be colored green, and any that are false will be colored red. This gets plugged into the `set_geo_property` data's input. Hope that makes sense.

 

As for tracking your data a cheap hack would to connect a value to the top-level output then use `getAttr` to print it to the Script Editor.

 

There are also watchpoints you can create by right-clicking on a connection. Though correct me if I'm wrong, devs, I think this only displays data if it's eventually connected to the top-level output. It's not super robust as it doesn't display everything, except the size of its array and its most min and max values. This usually is enough to let you know if something is wrong, like if the min/max values aren't what you expect or the array is empty when it should have items.

 

Hope that helps!

 

Message 5 of 5
calibrix
in reply to: labbejason

Ah there we go. Thanks. As you said it is a bit cumbersome, but it does work.

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

Post to forums  

Autodesk Design & Make Report