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:

## What have I missed here? (effect by vert color)

4 REPLIES 4
SOLVED
Message 1 of 5
410 Views, 4 Replies

## What have I missed here? (effect by vert color)

So I have read a bunch of python generated vertex colours into the Graph, that works really well, now I am trying to apply some point displacement/instances based on the vertex colour of the mesh.  Now, I realise that the "equal" node doesn't like vectors, so I made and tested a compound that converts everything to longs, does the comparison and outputs a bool from there.  When I plug in my colour array however, weird stuff starts happening.  I'm wondering if the implicit looping isn't the right way to do it, so tried a for-each, but same result.

Here's what's going on: I am looking for the points that are black (0,0,0) and adding -25 to those points y position (as a test).  The result however is also affecting the blue, the green etc.

And here's the compound that does the "finding"

Weird thing is that doing a test with 2 vectors works really well.
I feel like I am missing something really obvious but after bashing my brains against it for a couple of hours I figured I'd through it up here, thanks in advance

4 REPLIES 4
Message 2 of 5

FYI you can compare vectors using "members_equal" or other "members_xx" logic nodes. The result is a bool3 or booln depending on how many components are in the structure. You can then use "all_members_true" to convert to a boolean.

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

Join the Bifrost Addicts community on Discord:
Message 3 of 5

Call me crazy but I have been troubleshooting this tonight and here's what I'm doing ...

So I get at least one True output from this loop ... yet outside the loop I get a big fat False.

I am thinking I might be utterly misunderstanding how implicit and for-each loops work? Or it's a bug?

Message 4 of 5

Think I might have found the issue ... please ignore this for now.  I'll post a solution (to help anyone else trying to do this) if and when I find one.

Message 5 of 5

Ok, found and fixed ... when I was slicing my big array of strings that I generated from a file texture, I wasn't slicing them properly, and because the texture was coming through to the Bifrost object from it's input, my display wasn't reflecting this.  What I did to find this was bring in a duplicated mesh so the texture wouldn't update, then went hunting for the issue.

Here's the solution and result:
Step 1: Slice the (6 figure) array of floats into chunks of three as colour values with a sequence array:

Step 2: Use the members equal tip by @mjcg91 up there ^

Step 3: Profit!
Reds:

Greens:

You get the idea

Thanks for putting up with me everyone ... much appreciate

Tags (3)

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