Programming/Houdini - TWA

[Houdini] Joy of VEX (Day 6)

와들S 2023. 7. 24. 15:41

1. Outputs

2. Reviews

- 같은 코드를 사용했을 때, points의 경우,

- primitives의 경우

- points의 경우 조금 더 부드러우나, primitive의 경우 각 primitive마다 색이 반영되어 픽셀아트 같은 느낌을 보인다.

 

- 무슨 속성이 있는지 보려면 vop을 열어 확인해보면 된다.

- 또한 wrangle을 쓸 때 primitive인 경우 @N로 넣을 순 없고 읽는 것만(가져오는 것만) 된다.

 

3. Exercises

1) Set normals per prims

- prim_normal이란 함수를 쓸 수 있는 것 같다.

-> 아님. 저건 그냥 return값임

 

2) Set a @d attribute on prims in one wrangle, and use it to create a colour sine wave in another.

- 흠 이게 맞나 너무 쉬운데..?

 

3) set a d@ attribute on prims in one wrangle, and use it to create a position sine wave in another. 
   Hint; as mentioned above, @P is read only for prims, but read/write for points. You need to find a way to read @d into points. You can do this in vex in roundabout ways, but its easier to just transfer or promote attributes from prims to points, this is a common operation in Houdini setups. There might even be a sop to do this... I wonder what it's called....

- 결국 못 풀었다. 별짓을 다했는데 ㅋㅋㅋㅋㅋㅋ

- 점을 wrangle-points로 떼어내서 다시 primitive로 만든 다음, primitive 타입에서 다시 저렇게 코드를 짠 후, 여기서 set이 안되는걸 알고 다음 points wrangle에서 @P.y에 넣었음 근데 문제점은,

 

- primitive에서 만든 벡터 속성은, (화면의 경우 dd)

- 다음 points wrangle에서 인식이 될 때 vector가 아니라 float으로 인식이 되었다. @P.y = @dd.y를 하면 에러가 난다. 

- 역시 바로 에러난다. 진짜 어이없을 무

- 분명히 해당 벡터 속성을 만든 노드에선 3 components를 지닌 노드라 뜨는데.... 뭐가 문젠지 모르겠다

'Programming > Houdini - TWA' 카테고리의 다른 글

[Houdini] Joy of VEX (Day 8)  (0) 2023.07.28
[Houdini] Joy of VEX (Day 7)  (0) 2023.07.27
[Houdini] Joy of VEX (Day 5)  (0) 2023.07.23
[Houdini] Joy of VEX (Day 4)  (0) 2023.07.20
[Houdini] Joy of VEX (Day 3)  (0) 2023.07.20