Attribute Wrangle: Compute Results In Place

   991   7   1
User Avatar
Member
64 posts
Joined: 4月 2022
Offline
I want to ask why the "Compute Results In Place" parameter in the Attribute Wrangle node does not affect anything. I have done various measurements but see no difference. Plus, I noticed that SideFX HDAa never use this parameter. Is it outdated or are there cases when it's better to activate it?
alexeyvanzhula.gumroad.com
User Avatar
Member
8555 posts
Joined: 7月 2007
Online
Alexey_Vanzhula
Is it outdated or are there cases when it's better to activate it?
I believe it's relatively new

I have personally not used it, but tooltip says it works when compiled so it likely has to be in a valid compile block

then since the attribute writes are in-place I assume the same restrictions to VEX code apply as with DOP version when geo is bound as: Myself (No Reads Of Outputs)
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
64 posts
Joined: 4月 2022
Offline
tamte
I believe it's relatively new
IIRC, it was present in version 13 or 14

tamte
I have personally not used it, but tooltip says it works when compiled so it likely has to be in a valid compile block
I analyzed many Attribute Wrangle nodes included in the SideFX HDAs and didn't find a single one where this option was active, including nodes within compile blocks.
Edited by anon_user_95266836 - 2023年10月7日 02:32:06
alexeyvanzhula.gumroad.com
User Avatar
Member
622 posts
Joined: 11月 2013
Offline
When compiled the Attribute VOP is able to work on the incoming geometry in place without making a copy of it. This can speed up processing as one less copy is made, but requires that the VEX code doesn’t bind for writing any attributes that are read from the first input.

I can't imagine how to use a vex node without writing any attributes.
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
I guess you could still create new ones?
User Avatar
Member
8555 posts
Joined: 7月 2007
Online
jerry7
When compiled the Attribute VOP is able to work on the incoming geometry in place without making a copy of it. This can speed up processing as one less copy is made, but requires that the VEX code doesn’t bind for writing any attributes that are read from the first input.

I can't imagine how to use a vex node without writing any attributes.
you can write into any attributes, just not the same ones you are reading from since it will not create a copy of the geo so it will not be able to read the original values if they are being overwritten

so this would for example become an invalid operation
v@P = point(0, "P", 0);
since each point needs to access "P" of the point 0
however that's likely to be overriden at some point during the execution, since point(0, ... will refer to the same geometry instance that's being written to instead of a copy, since all writes are done in place in that mode
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8555 posts
Joined: 7月 2007
Online
Alexey_Vanzhula
IIRC, it was present in version 13 or 14
I don't recall exactly when it was added, but could swear it was much later, especially since compile blocks weren't present until 16

Alexey_Vanzhula
I have done various measurements but see no difference
I see clear difference, when used as suggested within compile block

10mil points grid pointwrangle within loop of 100 iterations
- Compute In Place Off : 12.104s
- Compute In Place On : 2.551s

what makes it interesting is that without compiling both are around 2.5s
so either compiling forces some geo copying even if not necessary, making this option really important or a different reason that may require further investigation or an answer from jlait

Alexey_Vanzhula
I analyzed many Attribute Wrangle nodes included in the SideFX HDAs and didn't find a single one where this option was active, including nodes within compile blocks.
I'd assume it may be tricky to randomly find one, since it may be not that well known or understood feature, even for TDs at SideFX so not all nodes that can really use it may have it on
and if you find one it may be questionable what is the purpose, which I honestly can't answer
but if it helps, these have it on (note that some are not inside of compiled loops but the HDA containing them may be added to one later so it may still benefit):
adaptiveprune
prune
agentcliptransitiongraph
compute_transition_graph/set_transition_graph_attribs
compute_transition_graph/find_rewire_target
compute_transition_graph/link_regions
compute_transition_graph/find_overlapping_regions
compute_transition_graph/compute_sample_ranges
compute_transition_graph/assign_samples
compute_transition_graph/compute_pose_similarity
compute_transition_graph/accumulate_over_blend_range
compute_transition_graph/find_best
compute_transition_graph/filter_transitions
agentconstraintnetwork
init_names
agentedit
set_intrinsics
create_points
agentmetadata
read_metadata
agentterrainadaptation
terrain_projection
terrain_adaptation
update_up
agentvellumunpack
unpack_vellum/update_restlength
unpack_vellum/compute_pscale
unpack_vellum/update_attachments/update_prim_attachments
unpack_vellum/update_attachments/update_pt_attachments
group_has_vellum_layer
removesimlayers
assemble
partition__create_groups
attribadjustdict
adjust_dict
booleanfracture
create_name_attrib
build_constraints/build_constraints_surface/create_constraints
transfer_attribs_to_inside/find_src_prim
connectadjacentpieces
connect_nearby_points
create_ordered_point_pairs
mark_duplicates
crowdassignlayers
assign_layers
crowdsource::3.0
create_name_attrib
set_state_and_clips
instance_agents/compute_agent_id
setlayer
setcollisionlayers
defaultstate
randomize_state_patterns
crowdsource::3.0
create_name_attrib
set_state_and_clips
instance_agents/compute_agent_id
setlayer
setcollisionlayers
defaultstate
randomize_state_patterns
explodedview::2.0
move_pieces
explodedview::2.0
move_pieces
guideprocess
compute_bent_positions
kinefx::agentposefromrig
apply_pose
group_roots
sort_roots
kinefx::configureclipinfo
set_properties
kinefx::configurejoints
set_fbikconfig
kinefx::fbikconfiguretargets
set_fbikconfig
kinefx::scenecharacterimport
set_obj_attributes
posespacedeformcombine
psd_combine
rbdbulletsolver
dopnet/emission/update_pivot_and_id
rbdcluster::2.0
rename_from_cluster
renumber_detached_clusters/renumber_clusters_for_detached_pieces
transfer_cluster_id
fuse_pieces/find_piece_neighbours
fuse_pieces/move_to_centroid
rbdcluster::2.0
rename_from_cluster
renumber_detached_clusters/renumber_clusters_for_detached_pieces
transfer_cluster_id
fuse_pieces/find_piece_neighbours
fuse_pieces/move_to_centroid
rbdconcretefracture::3.0
generate_cutters/build_cutter_geo/voronoi_diagram_3d/compute_voronoi_point_positions
generate_cutters/build_cutter_geo/voronoi_diagram_3d/add_points_for_boundary_faces
generate_cutters/build_cutter_geo/voronoi_diagram_3d/build_voronoi_faces
generate_cutters/build_cutter_geo/voronoi_diagram_3d/expand_boundary_faces
generate_cutters/build_cutter_geo/voronoi_diagram_3d/apply_expansion
rbdglassfracture::3.0
getRotationMatrix
rotatePoints
rotate_impact_points
rbdinteriordetail
compute_mindist_outside
rbdunpack
update_name
rbdwoodfracture::2.0
build_cutting_planes/shift_cutter_planes
splinter_jitter
testsim_crowdtransition
setup_attribs
vellumpack
record_agent_shape_info_prim
record_agent_shape_info_pt
vellumunpack
update_name
voronoifracture::2.0
build_constraints/build_constraints_solid/create_constraints
build_constraints/build_constraints_surface/create_constraints
compute_clip_piece/find_clip_neighbours
setup_piece_names/create_name_attrib
voronoifracture::2.0
build_constraints/build_constraints_solid/create_constraints
build_constraints/build_constraints_surface/create_constraints
compute_clip_piece/find_clip_neighbours
setup_piece_names/create_name_attrib
xformpieces
add_pt_vel
make_input_xform_and_xform_pivot_add_temppiece
make_rest_xform_inverse
Edited by tamte - 2023年10月7日 21:20:38
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
64 posts
Joined: 4月 2022
Offline
tamte
Thank you for such a detailed answer. Now it makes sense.
alexeyvanzhula.gumroad.com
  • Quick Links