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 is a geo location? What type of data is it?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
kmdaniel
625 Views, 5 Replies

What is a geo location? What type of data is it?

Hi!

 

I'm trying to understand some aspects of Bifrost, and I kind of stuck with this expression, "geo locations". (Generate sample locations compound's default output.) 

The node info tab says: Generetes random locations on a geometric object.

sample_locations[out]

The generated sample locations.

 

Okay, cool, but what is it? As far as output coloring goes the containing data seems different, then simple array<float3>. What is it?  Is this an array of generated point location in the face local uv space?

 

I'm asking this, because for example if a geometry is deforming, is this "geo location" stays intact? Can I use it to pass the new (deformed) position data to the scattered points? (In case, the base geometry is deforming.)

 

Because I checked it, and I can. (Sample_locations compound). But oddly enough, when I wasn't sampling the position, but normal and tangent values, I got nothing. BUT, after getting the position data, hooking after a "get_closest_locations", and then sample this node's location output, I was able to access the normal and tangent values.

 

Thanks, 

Daniel

 

5 REPLIES 5
Message 2 of 6
mjcg91
in reply to: kmdaniel

geoLocation is a data structure containing coordinates on a geometry. It stores point indices for points / strands, and barycentric coordinates for meshes. The location is preserved if a geometry is deformed, as long as its structure doesn't change.

geoLocation.jpg

To sample locations, you first must generate the said samples, either using generate_sample_locations, which generates random location on a surface / volume, or by using the geometry query nodes such as get_closest_location, get_closest_point... etc.

 

For the later, you must use the positions to query geometries. Based on these positions, the geometry's closest component informations will be stored in the location. (closest point index, closest face, barycentric coordinates for faces...).

 

Once you have your locations, you can use it using sample_property to sample a property on your object.


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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 3 of 6
kmdaniel
in reply to: mjcg91

Oh, great, thanks! This is clear now.

Somehow in my case, the sample_property node wasn't getting right values from the deforming geo as far as the point_normal goes, only point_position. But probably something bad on my end.

Thanks!

 

Message 4 of 6
anthony.dreaming
in reply to: mjcg91

@mjcg91 Hi Maxime,

 

In regards to: "Based on these positions, the geometry's closest component informations will be stored in the location. (closest point index, closest face, barycentric coordinates for faces...)"

 

I've tried unsuccessfully to retrieve the closest face indices from raycast locations via sample_property or sample_property_from_closest_point. Any ideas how to do this?

Message 5 of 6
mjcg91
in reply to: anthony.dreaming

@anthony.dreaming 

You could extract the index directly from the location data itself using a value node with type set to Geometry::Common::GeoLocation

mjcg91_0-1649208949789.png

 

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

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 6 of 6
anthony.dreaming
in reply to: mjcg91

Most excellent! The geolocation value node with batteries included for the win. 😎 Thank you!

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

Post to forums  

Autodesk Design & Make Report