Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEWTOOL] Added Camera Frustum OBJ operator #48

Open
wants to merge 6 commits into
base: Development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions help/icons/camera_frustum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions help/nodes/obj/labs--camera_frustum-1.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#type: node
#context: sop
#internal: labs::camera_frustum.1.0
#icon: camera_frustum
#tags: sidefxlabs, camera, frustum

= Labs Camera Frustum =

""" This OBJ sets up a camera frustum and padded frustum based on the input parent camera. """

This OBJ sets up a camera frustum and padded frustum based on the input parent camera.
It uses the parent camera's parameter values to define it's near/far planes and view angle.
You can define a padded frustum either in the parameter panel or in the viewport thanks to the camera frustum state.
This is useful for selections based on the camera view.

@parameters

== Padding Options ==

Lower Padding:
#id: minpad
The padding on the left hand side of the camera, defined as a vector.

Upper Padding:
#id: maxpad
The padding on the right hand side of the camera, defined as a vector.

== Display Options ==

Primitive Group:
#id: frustum_display
Choose how to display the frustum geometry in the viewport: full or wireframe.

#id: frustum_output
Choose whether to output the original frustum only, the padded frustum only, or both.

#id: frustum_color
The color for the frustum

#id: padded_frustum_color
The color for the padded frustum

@related
- [Camera|Node:obj/cam]
8 changes: 5 additions & 3 deletions help/nodes/sop/labs--group_by_attribute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ NOTE:
This has similar functionality to the [Partition SOP|Node:SOP/partition] but without having to deal with expressions.

@parameters
Group:
Subset of the geometry from which to get the attribute to generate groups from.
Attribute Type:
Component Type for this attribute
Component Type for this attribute.
Attribute Name:
Name of the Attribute that we would like to use to generate groups from
Name of the Attribute that we would like to use to generate groups from.
Group Prefix:
Prefix to cluster the group names together. Like mat_ or col_
Prefix to cluster the group names together. Like mat_ or col_.
Precision:
When providing a float attribute, this will control after how many decimals the value will be truncated.

14 changes: 14 additions & 0 deletions otls/camera_frustum.1.0.hda/INDEX__SECTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Operator: labs::camera_frustum::1.0
Label: Labs Camera Frustum
Path: oplib:/labs::Object/camera_frustum::1.0?labs::Object/camera_frustum::1.0
Icon: opdef:/labs::Object/camera_frustum::1.0?IconSVG
Table: Object
License:
Extra:
User:
Inputs: 1 to 1
Subnet: false
Python: false
Empty: false
Modified: Mon Mar 21 14:54:57 2022

4 changes: 4 additions & 0 deletions otls/camera_frustum.1.0.hda/Sections.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
""
INDEX__SECTION INDEX_SECTION
houdini.hdalibrary houdini.hdalibrary
labs_8_8Object_1camera__frustum_8_81.0 labs::Object/camera_frustum::1.0
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"hdaroot/polyextrude9.def":1623966442,
"hdaroot/transform8.def":1624296833,
"hdaroot/translate_xy2.def":1624296065,
"hdaroot/group4.def":1623848927,
"hdaroot/PADDED/polyfill2.def":1629192920,
"hdaroot/PADDED/blast11.def":1623935785,
"hdaroot/PADDED/clip2.def":1629192826,
"hdaroot/PADDED/blast10.def":1623935785,
"hdaroot/PADDED/null1.def":1629192775,
"hdaroot/PADDED/CLIPPED.def":1629187433,
"hdaroot/PADDED/FAR.def":1623935798,
"hdaroot/PADDED/clip1.def":1629192826,
"hdaroot/PADDED.def":1629186351,
"hdaroot/FRUSTUM/blast7.def":1623935785,
"hdaroot/FRUSTUM/output0.def":1629186351,
"hdaroot/FRUSTUM/NEAR.def":1623935798,
"hdaroot/FRUSTUM/FRUSTUM.def":1624352284,
"hdaroot/FRUSTUM.def":1629186351,
"hdaroot/FRUSTUM/blast6.def":1623935785,
"hdaroot/transform7.def":1624296833,
"hdaroot/transform4.def":1624296833,
"hdaroot/transform6.def":1624033531,
"hdaroot/color5.def":1623833865,
"hdaroot/FRUSTUM/FAR.def":1623935798,
"hdaroot/scale_xy1.def":1624296065,
"hdaroot/polyextrude6.def":1623966442,
"hdaroot/grid2.def":1624034653,
"hdaroot/PADDED/NEAR.def":1623935798,
"hdaroot/group1.def":1623848927,
"hdaroot/PADDED/output0.def":1629186351,
"hdaroot/polyextrude8.def":1623966442,
"hdaroot/OUT_FULL.def":1623849082,
"hdaroot/choose_display.def":1623833556,
"hdaroot/choose_frustum_to_output.def":1623833556,
"hdaroot/from_NDC6.def":1623746775,
"hdaroot/OUT_WIREFRAME.def":1623849082,
"hdaroot/PADDED/blast6.def":1623935785,
"hdaroot/make_wireframe.def":1623329450,
"hdaroot/merge2.def":1623833837,
"hdaroot/PADDED/polyfill1.def":1629192920,
"hdaroot/from_NDC4.def":1623746775,
"hdaroot/color3.def":1623833865,
"hdaroot/DISPLAY.def":1623833416,
"hdaroot/translate_xy1.def":1624296065,
"hdaroot.def":1647865692
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"values":["19.0.562"
],
"indexes":{
"hdaroot/group4.userdata":0,
"hdaroot/PADDED/polyfill2.userdata":0,
"hdaroot/PADDED/polyfill1.userdata":0,
"hdaroot/PADDED/blast10.userdata":0,
"hdaroot/PADDED/CLIPPED.userdata":0,
"hdaroot/PADDED/NEAR.userdata":0,
"hdaroot/FRUSTUM/output0.userdata":0,
"hdaroot/FRUSTUM/blast7.userdata":0,
"hdaroot/FRUSTUM/blast6.userdata":0,
"hdaroot/PADDED/blast6.userdata":0,
"hdaroot/FRUSTUM/FAR.userdata":0,
"hdaroot/FRUSTUM/NEAR.userdata":0,
"hdaroot/translate_xy1.userdata":0,
"hdaroot/transform7.userdata":0,
"hdaroot/transform4.userdata":0,
"hdaroot/transform8.userdata":0,
"hdaroot/FRUSTUM/FRUSTUM.userdata":0,
"hdaroot/translate_xy2.userdata":0,
"hdaroot/scale_xy1.userdata":0,
"hdaroot/PADDED.userdata":0,
"hdaroot/polyextrude6.userdata":0,
"hdaroot/polyextrude9.userdata":0,
"hdaroot/transform6.userdata":0,
"hdaroot/FRUSTUM.userdata":0,
"hdaroot/OUT_WIREFRAME.userdata":0,
"hdaroot/PADDED/output0.userdata":0,
"hdaroot/OUT_FULL.userdata":0,
"hdaroot/grid2.userdata":0,
"hdaroot/merge2.userdata":0,
"hdaroot/PADDED/FAR.userdata":0,
"hdaroot/choose_display.userdata":0,
"hdaroot/polyextrude8.userdata":0,
"hdaroot/PADDED/blast11.userdata":0,
"hdaroot/PADDED/clip2.userdata":0,
"hdaroot/group1.userdata":0,
"hdaroot/DISPLAY.userdata":0,
"hdaroot/choose_frustum_to_output.userdata":0,
"hdaroot/PADDED/clip1.userdata":0,
"hdaroot/make_wireframe.userdata":0,
"hdaroot/PADDED/null1.userdata":0
}
}
Loading