Found 1007 posts.
Search results Show results as topic list.
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- olivierth
- 1007 posts
- Offline
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- olivierth
- 1007 posts
- Offline
I'm trying a simpler example and I still get weird results. My InAngle (theta 1) is 45 degrees (makes sens) but the resulting OutAngle (theta 2) is 135 when it should be less than 45. What am I not doing right? What am I not understanding?
-Olivier
-Olivier
Edited by olivierth - Feb. 6, 2024 13:53:16
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- olivierth
- 1007 posts
- Offline
hmm... that's odd. we do things differently. I start with intersect to get the surface normal before I use refract.
EDIT: I'm confused. In your example, the IOR is below 1...?
EDIT: I'm confused. In your example, the IOR is below 1...?
Edited by olivierth - Feb. 6, 2024 12:02:00
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- olivierth
- 1007 posts
- Offline
Looks like the refract function works BUT, I think the surface normals have to be inverted for it to bend the rays in the logical direction...
-Olviier
-Olviier
Edited by olivierth - Feb. 5, 2024 17:59:58
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- olivierth
- 1007 posts
- Offline
Technical Discussion » Random Color to Packed Geometry
- olivierth
- 1007 posts
- Offline
Hey!
My method was to use Attribute Promote sop to get the name on primitives. After that, I used a wrangle set to primitive with this code:
themeans to remove the first 5 letters. that way, if I have piece12 it will give me 12
atoi is the function to take a string and convert it to integer
rand is to generate the random color. (*the rand function doesnt work with a string)
My method was to use Attribute Promote sop to get the name on primitives. After that, I used a wrangle set to primitive with this code:
@Cd = rand(atoi(s@name[+5:]));
the
s@name[+5:]
atoi is the function to take a string and convert it to integer
rand is to generate the random color. (*the rand function doesnt work with a string)
Edited by olivierth - Feb. 5, 2024 13:37:45
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- olivierth
- 1007 posts
- Offline
Hi!
I came across a very informative video explaining Snell's Law. The trouble I'm having is how to solve for "r" (angle of outgoing ray). Can anybody tell me how to switch the formula around to find "r" if I have all the other values? I'm bad at math...
I came across a very informative video explaining Snell's Law. The trouble I'm having is how to solve for "r" (angle of outgoing ray). Can anybody tell me how to switch the formula around to find "r" if I have all the other values? I'm bad at math...
Edited by olivierth - Feb. 5, 2024 13:13:00
Technical Discussion » Create Drop Down Menu from a String Array?
- olivierth
- 1007 posts
- Offline
Hi!
I've have an array automatically generated depending on what geo I input. It gives me a list of names like this:
{ GeoA, Tube, Box }
I would like a node to have a string parameter with a drop down menu (or whatever the technical name is) already populated with the name from my array. (fake exemple in my image below). Any tips?
-Olivier
I've have an array automatically generated depending on what geo I input. It gives me a list of names like this:
{ GeoA, Tube, Box }
I would like a node to have a string parameter with a drop down menu (or whatever the technical name is) already populated with the name from my array. (fake exemple in my image below). Any tips?
-Olivier
Edited by olivierth - Jan. 25, 2024 10:20:50
Technical Discussion » Poly Bridge topology is funky [{SOLVED}]
- olivierth
- 1007 posts
- Offline
Ok, I think I found the solution. in the PolyBridge sop, under the Bridge tab, there's an Explicit Pairs section all the way at the bottom. All I need to do is pair the first point of each curve. So if my first curve has 66 points, the pairing will be 0 and 66 (first point of each curves). That seams to fix all my problems no matter what curves I bridge together!
-Olivier
-Olivier
Edited by olivierth - Jan. 23, 2024 10:41:16
Technical Discussion » Poly Bridge topology is funky [{SOLVED}]
- olivierth
- 1007 posts
- Offline
Hi!
I've got 2 nearly identical curves (one is a copy of the other). The only difference is a slight position change but the point numbers are identical. When I use polyBridge I end up with lines that converge on the sides. Is there a way to force a perfect quads-only pattern?
I've got 2 nearly identical curves (one is a copy of the other). The only difference is a slight position change but the point numbers are identical. When I use polyBridge I end up with lines that converge on the sides. Is there a way to force a perfect quads-only pattern?
Edited by olivierth - Jan. 23, 2024 10:40:10
Houdini Indie and Apprentice » Can't take snapshots of my renders [{SOLVED}]
- olivierth
- 1007 posts
- Offline
OOOHHH!!!
So, I was right to set my resolution to a max of 1280x720 (the maximum alowed in Apprentice), but I forgot to lock my viewport to my camera (lock icon at the upper right of the viewport). So instead of rendering in 1280x720, it took the full with/height of my viewport of 1860x725. Since that was above the maximum alowed by the Apprentice, it failed!
So, I was right to set my resolution to a max of 1280x720 (the maximum alowed in Apprentice), but I forgot to lock my viewport to my camera (lock icon at the upper right of the viewport). So instead of rendering in 1280x720, it took the full with/height of my viewport of 1860x725. Since that was above the maximum alowed by the Apprentice, it failed!
Houdini Indie and Apprentice » Can't take snapshots of my renders [{SOLVED}]
- olivierth
- 1007 posts
- Offline
I set my resolution to 1280x720. When I click on the "Snap" button, I get the error: "Failed to save image". I played around and eventualy I got one single snap to save, but next time after, I got the same error again.
Any idea what causes the fail?
-Olivier
Any idea what causes the fail?
-Olivier
Edited by olivierth - Jan. 21, 2024 15:13:24
Technical Discussion » Add Edge Loops? [{SOLVED}]
- olivierth
- 1007 posts
- Offline
ah! The Poly Split method is interesting.
In the end, I made a script to create a string that will be use as a group for the Edge Divide sop. It's a bit complicated but it works well.
in a Detail Wrangle I used:
This give me a string like: "p0-1-2-3-4-5-6 p7-8-9-10-11-12-13". I invert the result with a Group combine sop and use the result in the Edge Divide sop.
EDIT: Arg! Some times, the edgeDivide is very unpredictable and gives weird topology... The PolySplit with the Split Locations set to1e1 did the trick!
In the end, I made a script to create a string that will be use as a group for the Edge Divide sop. It's a bit complicated but it works well.
in a Detail Wrangle I used:
int npts = npoints(0); int listA[], listB[]; for(int i=0; i<npts/2; i++) { append(listA, i); append(listB, i+npts/2); } int firsStop = npts/2-1; string loopA = "p"; string loopB = "p"; for(int i=0; i<npts/2; i++) { loopA += itoa(listA[i]) + "-"; loopB += itoa(listB[i]) + "-"; } s@edgeGroupS = loopA[:-1] + " " + loopB[:-1];
This give me a string like: "p0-1-2-3-4-5-6 p7-8-9-10-11-12-13". I invert the result with a Group combine sop and use the result in the Edge Divide sop.
EDIT: Arg! Some times, the edgeDivide is very unpredictable and gives weird topology... The PolySplit with the Split Locations set to1e1 did the trick!
Edited by olivierth - Jan. 17, 2024 12:36:24
Technical Discussion » Add Edge Loops? [{SOLVED}]
- olivierth
- 1007 posts
- Offline
Hi!
I have a bunch of surfaces with no edge loops in the center. Is there a procedural way of adding multiple edge loops on each?
-Olivier
I have a bunch of surfaces with no edge loops in the center. Is there a procedural way of adding multiple edge loops on each?
-Olivier
Edited by olivierth - Jan. 17, 2024 12:29:14
Technical Discussion » Vex: Convert Upper case to lower case? [{SOLVED}]
- olivierth
- 1007 posts
- Offline
Wow, a few seconds after posting I found it. The functions tolower and toupper will do exactly that.
-Olivier
-Olivier
Technical Discussion » Vex: Convert Upper case to lower case? [{SOLVED}]
- olivierth
- 1007 posts
- Offline
Hi!
I've got letters in upper case but I need them in lower case. Is there a function for that?
-Olivier
I've got letters in upper case but I need them in lower case. Is there a function for that?
-Olivier
Edited by olivierth - Jan. 15, 2024 10:22:20
Technical Discussion » How to accces prim intrinsic "bounds" values? [{SOLVED}]
- olivierth
- 1007 posts
- Offline
AHHH!! You have to store it in an array. That's the part I was missing.
Thank you!
-Olivier
Thank you!
-Olivier
Technical Discussion » How to accces prim intrinsic "bounds" values? [{SOLVED}]
- olivierth
- 1007 posts
- Offline
Hi!
I'm using an Instance node to scatter a bunch of assets. I wanted to make a script that places each individual asset one next to each other. I noticed a prim intrinsic named "bounds" that seams to have the width value in the bounds index 3.
How can I access the bounds index 3 and store it in a float?
-Olivier
I'm using an Instance node to scatter a bunch of assets. I wanted to make a script that places each individual asset one next to each other. I noticed a prim intrinsic named "bounds" that seams to have the width value in the bounds index 3.
How can I access the bounds index 3 and store it in a float?
-Olivier
Edited by olivierth - Jan. 15, 2024 10:17:18
Technical Discussion » Camera Match Movement of Point? {[SOLVED]}
- olivierth
- 1007 posts
- Offline
Technical Discussion » Camera Match Movement of Point? {[SOLVED]}
- olivierth
- 1007 posts
- Offline
Hi!
It would be super usefull for troubleshooting what's wrong on my animation if I could have a camera look at a specific Point/prim on my geometry while matching it's movements. Is there an easy way to do this?
-Olivier
It would be super usefull for troubleshooting what's wrong on my animation if I could have a camera look at a specific Point/prim on my geometry while matching it's movements. Is there an easy way to do this?
-Olivier
Edited by olivierth - Jan. 12, 2024 11:23:55
-
- Quick Links