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
Reply
Message 1 of 5
valhallen
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.

valhallen_0-1613597146594.png

valhallen_1-1613597324430.png

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

valhallen_2-1613597419166.png

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

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:
https://discord.gg/bifrost-addicts
Message 3 of 5
valhallen
in reply to: valhallen

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

valhallen_0-1613875858718.png

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

valhallen_1-1613875968591.png

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

Message 4 of 5
valhallen
in reply to: valhallen

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

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:

valhallen_0-1613883717874.png

valhallen_1-1613883805660.png

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

valhallen_2-1613883861859.png

Step 3: Profit!
Reds:

valhallen_3-1613883965525.png

Greens:

valhallen_4-1613884001465.png

You get the idea

valhallen_5-1613884035412.png


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



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

Post to forums  

Autodesk Design & Make Report