Hey There,
I got a quick question:
Say I have an add sop and I have an attributeCreate sop below it (that adds some value/variable). Now below this I have a point sop.
How do I read the values I created with my attributeCreate into the point sop. I can see all my points in the spreadsheet and all their values but I dont know how to access them…the local variable created by the attributeCreate does not seem to be available.
getting data from the geometry spreadsheet
7397 3 0-
- Phillip
- Member
- 17 posts
- Joined: 7月 2005
- オフライン
-
- stevenong
- Member
- 1634 posts
- Joined: 7月 2005
- オフライン
Hi Phillip,
You can use the point() function to read the value of the attributes.
/ -> exhelp point
float point (string SOP, float point_number, string attribute, float index)
This function will extract information from a point in a sop. The
attribute parameter is the name of the attribute (eg. “Cd” for
diffuse color). Two special attributes exist “P” and “Pw” which
represent the position of the point in space (“Pw” allows you to
access the W component of the position).
For example:
point(“/obj/geo1/facet1”, 3, “P”, 0)
Will return the X component of point 3 of the facet1 SOP in geo1.
point(“/obj/geo1/facet1”, 3, “N”, 2)
Will return the Z component of the normal attribute of point 3 in the
facet1 SOP of object geo1.
Note: This function will interpolate between point values if the point
number is fractional, such as 3.35
I hope the above helps!
Cheers!
steven
You can use the point() function to read the value of the attributes.
/ -> exhelp point
float point (string SOP, float point_number, string attribute, float index)
This function will extract information from a point in a sop. The
attribute parameter is the name of the attribute (eg. “Cd” for
diffuse color). Two special attributes exist “P” and “Pw” which
represent the position of the point in space (“Pw” allows you to
access the W component of the position).
For example:
point(“/obj/geo1/facet1”, 3, “P”, 0)
Will return the X component of point 3 of the facet1 SOP in geo1.
point(“/obj/geo1/facet1”, 3, “N”, 2)
Will return the Z component of the normal attribute of point 3 in the
facet1 SOP of object geo1.
Note: This function will interpolate between point values if the point
number is fractional, such as 3.35
I hope the above helps!
Cheers!
steven
-
- edward
- Member
- 8071 posts
- Joined: 7月 2005
- オフライン
-
- Phillip
- Member
- 17 posts
- Joined: 7月 2005
- オフライン
-
- Quick Links