Jump to content
Macha

accessing voxel neighbours

Recommended Posts

In dops, is it possible to get information from voxels surrounding another voxel? Say I get the density of a voxel v at position p and I want the density (or whatever other field) of nearest voxel in the y direction?

Edited by Macha

Share this post


Link to post
Share on other sites

I haven't used it, but the Gas Lookup DOP looks like it would do what you want.

The Gas Lookup DOP uses a position field to look up values inside the source field. The result is saved in the destination field.

Position Field  	

A single vector field which specifies the location each point should get its values from. Each voxel of the destination field will look into this field to find what position should be used to lookup into the source field.

http://www.sidefx.com/docs/houdini11.1/nodes/dop/gaslookup

Share this post


Link to post
Share on other sites

Yeah, hmmm, I saw that node and I'm trying to figure out ways to use it but I think it won't give me the control I need. I'd like to have vopsop-like control over voxels. Ideally a gas field vop node like a pciterate setup or something along those lines.

Share this post


Link to post
Share on other sites

In a sop solver couldn't you just make a point cloud constructed by placing a point per voxel. Then you would be able to sample your field at point A and the value on the nearest points that correlate to the voxels.

I believe that would work for what you are thinking.

Cheers

Share this post


Link to post
Share on other sites

Hey I thought that we can access this way:

volume pos to index -> increment index -> volume index to pos -> volume sample 

yeah it's working in sop level, but if we will try access to dop data in this way:

op:/obj/dopnet1:myObject/density

volume sample is not working... not working I mean it returns 0.0 all the time.

So I thought, maybe it's problem with field data in dops, so I used SOP solver to copy field as geometry data and it's not working as well :/

anyone had same problem to access data in dops?

Edited by bareja

Share this post


Link to post
Share on other sites

I've been taught a little trick that should work but doesn't ;P

I can't post a file but I can try to describe the method.

The idea is to use a Volume Index from File node and read the voxel's position. Then this position can be offset and a neighboring voxel can be read.

However, it doesn't work in dops. If we read in a field via an expression like /obj/dopnet1:obj0/density then it will only give us 0 values. Appending [$F] doesn't make a difference either. This trick works in SOPs though but not in DOPs!

Hm!

Edited by Macha

Share this post


Link to post
Share on other sites

Hm, looks like op: can't read from dops. if we put the fields into sops (sopsolver) we can do it all in there. Anybody know why?

Edited by Macha

Share this post


Link to post
Share on other sites

it looks like 'op:' can points only to operator, not to data in DOPs.

cheers,

Share this post


Link to post
Share on other sites

In a sop solver couldn't you just make a point cloud constructed by placing a point per voxel. Then you would be able to sample your field at point A and the value on the nearest points that correlate to the voxels.

I believe that would work for what you are thinking.

Cheers

Just dropping a +1 for this method in case you haven´t tried it yet! I used something similar a while ago with good results.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×