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: 

Modify sample location from sample closest accelerator on strands/curves?

1 REPLY 1
Reply
Message 1 of 2
kmdaniel
256 Views, 1 Reply

Modify sample location from sample closest accelerator on strands/curves?

Hi!

 

As far as I know, for closest point sampling currently the sample_closest_accelerator and get_closest_point can be used. Using these on curves, the later only gives vertex index/location data, not inbetween, interpolated data.

So, I'm trying to use the former, sample_closest_accelerator.

 

My question is, after doing the closest location lookup with sample_closest_accelerator, and I get the geolocation, how can I add noise data to my geolocation along the curve? Let's say I get a location at 0.5 length , between index 4 and 5. I have the geolocation of "??" something. (I tried to look into the actual datastucture, to somehow manually add noise to it, without luck.) How can I add a random 0.1 size "wiggle" to the sample location, to be able to get data on 0.4 or 0.6 length points? 

As far as I understood geolocation on curves is able to get data between points. So how can I determine, or manipulate this?

 

Thanks

Daniel

 

1 REPLY 1
Message 2 of 2
Grahame_Fuller
in reply to: kmdaniel

Hi,

 

You could sample point_position at the returned location to get its world position, then add a small random vector to it, and resample the accelerator using the modified position to get a jittered location. Of course, if the first location was very close to one of the segment's endpoints then the second location might be on the segment on the opposite side, but maybe that's not an issue for your purpose? Also, it would be hard to control the random distribution (e.g if you wanted uniform or Gaussian distribution between 0.4 and 0.6), and you might get clumps at the endpoints of the whole strand.

 

What is the final effect you want to achieve? There may be other ways.

 

Cheers,

gray


Grahame Fuller
Learning Content Developer

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

Post to forums