Jump to content

accessing voxel neighbours


Macha

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
Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...