Ok, I ended up using the add SOP set to “Delete gemotry but keep the points”. And, I deleted some points randomly with a treshold. Now it's super light to move around!
-Olivier
Found 1004 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » easy way to transform 4 million poly geos in the viewport?
- olivierth
- 1004 posts
- Offline
Houdini Indie and Apprentice » easy way to transform 4 million poly geos in the viewport?
- olivierth
- 1004 posts
- Offline
Hi!
I'm working with 2 photoscanned data of over 4 million polys each. I need to use a transform to scale/rotate/move each one but there's so much lag in the viewport, it's not practical.
I tried the remesh SOP but it takes forever to cook. I also tried the pack SOP but it doesn't seam to help much. Any better ideas?
-Olivier
I'm working with 2 photoscanned data of over 4 million polys each. I need to use a transform to scale/rotate/move each one but there's so much lag in the viewport, it's not practical.
I tried the remesh SOP but it takes forever to cook. I also tried the pack SOP but it doesn't seam to help much. Any better ideas?
-Olivier
Houdini Indie and Apprentice » find order from smallest to biggest value
- olivierth
- 1004 posts
- Offline
Ah!
that's a nice trick!
Thanks!
-Olivier
Array_For_Sort [ @ptnum ]
that's a nice trick!
Thanks!
-Olivier
Edited by olivierth - Sept. 26, 2018 19:27:15
Houdini Indie and Apprentice » procedurally take group points to use them in add SOP
- olivierth
- 1004 posts
- Offline
Ah! (I posted before seeing your post)
Good to know. I'll still try creating and snapping points on the geo. Grouping points on 4 millions poly meshes is annoying!! Snapping should be easier.
Thanks!
-Olivier
Good to know. I'll still try creating and snapping points on the geo. Grouping points on 4 millions poly meshes is annoying!! Snapping should be easier.
Thanks!
-Olivier
Houdini Indie and Apprentice » procedurally take group points to use them in add SOP
- olivierth
- 1004 posts
- Offline
Ah!
I'll bypass this problem by creating and snapping 3 points on the geo rather than grouping points from the scanned data. That way, my 3 created points will always be 0, 1, 2.
-Olivier
I'll bypass this problem by creating and snapping 3 points on the geo rather than grouping points from the scanned data. That way, my 3 created points will always be 0, 1, 2.
-Olivier
Houdini Indie and Apprentice » procedurally take group points to use them in add SOP
- olivierth
- 1004 posts
- Offline
Hi!
I grouped 3 points from scanned data.
group : 1182636 1255321 2282324
…I would now like to have an add SOP set to Polygons/by pattern to use those point numbers. At the moment, I have to manually copy/paste the point numbers…
-Olivier
I grouped 3 points from scanned data.
group : 1182636 1255321 2282324
…I would now like to have an add SOP set to Polygons/by pattern to use those point numbers. At the moment, I have to manually copy/paste the point numbers…
-Olivier
Houdini Indie and Apprentice » change @ptnum assignment in specific order
- olivierth
- 1004 posts
- Offline
Ah! found it!
I ended up just ordering the point number from smallest angle to biggest angle. (finding longest edge was useless)
// find Positions
vector p0 = point(0, “P”, 0);
vector p1 = point(0, “P”, 1);
vector p2 = point(0, “P”, 2);
// find edge lengths
float ab = distance(p0, p1);
float bc = distance(p1, p2);
float ca = distance(p2, p0);
// find vectors to next points
vector vab = normalize(p1 - p0);
vector vbc = normalize(p2 - p1);
vector vca = normalize(p0 - p2);
// find vectors to previous points
vector vac = normalize(p2 - p0);
vector vba = normalize(p0 - p1);
vector vcb = normalize(p1 - p2);
// find angles using each vectors
float aglA = acos(dot(vab, vac));
float aglB = acos(dot(vba, vbc));
float aglC = acos(dot(vca, vcb));
// set point value from angle A, B, C
f@angle = 0;
setpointattrib(0, “angle”, 0, aglA, “set”);
setpointattrib(0, “angle”, 1, aglB, “set”);
setpointattrib(0, “angle”, 2, aglC, “set”);
From there, I use a sort SOP and use the by attribute and use @angle.
I ended up just ordering the point number from smallest angle to biggest angle. (finding longest edge was useless)
// find Positions
vector p0 = point(0, “P”, 0);
vector p1 = point(0, “P”, 1);
vector p2 = point(0, “P”, 2);
// find edge lengths
float ab = distance(p0, p1);
float bc = distance(p1, p2);
float ca = distance(p2, p0);
// find vectors to next points
vector vab = normalize(p1 - p0);
vector vbc = normalize(p2 - p1);
vector vca = normalize(p0 - p2);
// find vectors to previous points
vector vac = normalize(p2 - p0);
vector vba = normalize(p0 - p1);
vector vcb = normalize(p1 - p2);
// find angles using each vectors
float aglA = acos(dot(vab, vac));
float aglB = acos(dot(vba, vbc));
float aglC = acos(dot(vca, vcb));
// set point value from angle A, B, C
f@angle = 0;
setpointattrib(0, “angle”, 0, aglA, “set”);
setpointattrib(0, “angle”, 1, aglB, “set”);
setpointattrib(0, “angle”, 2, aglC, “set”);
From there, I use a sort SOP and use the by attribute and use @angle.
Edited by olivierth - Sept. 26, 2018 14:49:49
Houdini Indie and Apprentice » find order from smallest to biggest value
- olivierth
- 1004 posts
- Offline
AH!
Found it!
…
// find angles using each vectors
float aglA = acos(dot(vab, vac));
float aglB = acos(dot(vba, vbc));
float aglC = acos(dot(vca, vcb));
// set point value from angle A, B, C
f@angle = 0;
setpointattrib(0, “angle”, 0, aglA, “set”);
setpointattrib(0, “angle”, 1, aglB, “set”);
setpointattrib(0, “angle”, 2, aglC, “set”);
Found it!
…
// find angles using each vectors
float aglA = acos(dot(vab, vac));
float aglB = acos(dot(vba, vbc));
float aglC = acos(dot(vca, vcb));
// set point value from angle A, B, C
f@angle = 0;
setpointattrib(0, “angle”, 0, aglA, “set”);
setpointattrib(0, “angle”, 1, aglB, “set”);
setpointattrib(0, “angle”, 2, aglC, “set”);
Edited by olivierth - Sept. 26, 2018 14:24:49
Houdini Indie and Apprentice » find order from smallest to biggest value
- olivierth
- 1004 posts
- Offline
I just saw your post after I replied.
The sort function is interesting but I don't get how to go from a sorted array to figuring what point number has the smallest value… I'm lost!
The sort function is interesting but I don't get how to go from a sorted array to figuring what point number has the smallest value… I'm lost!
Houdini Indie and Apprentice » find order from smallest to biggest value
- olivierth
- 1004 posts
- Offline
I know how to read a point attribute value (point function), but I would like to do the opposite and write a value on a specific point attribute.
Houdini Indie and Apprentice » find order from smallest to biggest value
- olivierth
- 1004 posts
- Offline
…Actually, I over-simplified my example.
My situation is this. I have a triangle and I managed to find the angle at each point and placed those values in @aglA, @aglB, @aglC. From there, I need to find smallest to biggest value and end up with:
pt0 @myOrder = 2
pt1 @myOrder = 1
pt2 @myOrder = 3
…since each value is stored on ALL points, I don't know how to proceed…
-Olivier
My situation is this. I have a triangle and I managed to find the angle at each point and placed those values in @aglA, @aglB, @aglC. From there, I need to find smallest to biggest value and end up with:
pt0 @myOrder = 2
pt1 @myOrder = 1
pt2 @myOrder = 3
…since each value is stored on ALL points, I don't know how to proceed…
-Olivier
Houdini Indie and Apprentice » find order from smallest to biggest value
- olivierth
- 1004 posts
- Offline
Hi!
If I have 3 points with @myValue:
pt0: 1.5
pt1: -12.89
pt2: 561.8
… and I want to find the order from smallest to biggest value and set that in attribute i@myOrder so it gives me:
pt0 @myOrder = 2
pt1 @myOrder = 1
pt2 @myOrder = 3
I could do it with a bunch of IF statements but I'm sure there's an easier way. Any idea?
-Olivier
If I have 3 points with @myValue:
pt0: 1.5
pt1: -12.89
pt2: 561.8
… and I want to find the order from smallest to biggest value and set that in attribute i@myOrder so it gives me:
pt0 @myOrder = 2
pt1 @myOrder = 1
pt2 @myOrder = 3
I could do it with a bunch of IF statements but I'm sure there's an easier way. Any idea?
-Olivier
Houdini Indie and Apprentice » change @ptnum assignment in specific order
- olivierth
- 1004 posts
- Offline
Ah!
I think I know how. In the sort sop I can set it "by attribute". I'll experiment and come back if I managed to get it working.
-Olivier
I think I know how. In the sort sop I can set it "by attribute". I'll experiment and come back if I managed to get it working.
-Olivier
Houdini Indie and Apprentice » change @ptnum assignment in specific order
- olivierth
- 1004 posts
- Offline
Hi!
I have 2 almost identical triangles (each from a different node) and I need the @ptnum to be consistent.
I would always want to have the point that has the smallest angle to be point 0. …and to always have the next point on the longest edge to be point 1 and the last one be point 2.
I'll be good with figuring the angles and the edge lengths. I just don't get how to change @ptnum from there…
Any ideas on this?
-Olivier
I have 2 almost identical triangles (each from a different node) and I need the @ptnum to be consistent.
I would always want to have the point that has the smallest angle to be point 0. …and to always have the next point on the longest edge to be point 1 and the last one be point 2.
I'll be good with figuring the angles and the edge lengths. I just don't get how to change @ptnum from there…
Any ideas on this?
-Olivier
Edited by olivierth - Sept. 26, 2018 12:31:49
Houdini Indie and Apprentice » rotate pt A to match pt B
- olivierth
- 1004 posts
- Offline
Houdini Indie and Apprentice » rotate pt A to match pt B
- olivierth
- 1004 posts
- Offline
Hi!
I'm making a tool that takes 2 similar meshes but have completely different rotation/scale/translate (and topo) and have mesh A match mesh B. I'm good for scale and translate but I need help for rotation:
At this step, I have point A and point B (each coming from different nodes). Both have a normal and a vector pointing perpendicular to that normal. I would like to know how to align point A so it has the same normal and rotate around that N to have the perpendicular vector matching point B's.
If it's not clear, I'll add images later.
Thanks for any help!
-Olivier
I'm making a tool that takes 2 similar meshes but have completely different rotation/scale/translate (and topo) and have mesh A match mesh B. I'm good for scale and translate but I need help for rotation:
At this step, I have point A and point B (each coming from different nodes). Both have a normal and a vector pointing perpendicular to that normal. I would like to know how to align point A so it has the same normal and rotate around that N to have the perpendicular vector matching point B's.
If it's not clear, I'll add images later.
Thanks for any help!
-Olivier
Edited by olivierth - Sept. 24, 2018 20:09:56
Houdini Indie and Apprentice » chv("") for colors?
- olivierth
- 1004 posts
- Offline
Houdini Indie and Apprentice » chv("") for colors?
- olivierth
- 1004 posts
- Offline
Hi!
I see people using vex scripts like:
vector MyColor = chv(“my_colors”);
…And they get a color swatch with hsv controls. When I use that script, I get 3 numerical inputs. Why?
-Olivier
I see people using vex scripts like:
vector MyColor = chv(“my_colors”);
…And they get a color swatch with hsv controls. When I use that script, I get 3 numerical inputs. Why?
-Olivier
Houdini Indie and Apprentice » Why the double "=" in if statement (if @P == 2)
- olivierth
- 1004 posts
- Offline
Houdini Indie and Apprentice » Why the double "=" in if statement (if @P == 2)
- olivierth
- 1004 posts
- Offline
Thanks for the explanations!
I see a lot of people using different symbols in “if” statements that I've never used. I wish there was a list of the symbols useful in “if” statements with explanations.
-Olivier
I see a lot of people using different symbols in “if” statements that I've never used. I wish there was a list of the symbols useful in “if” statements with explanations.
-Olivier
-
- Quick Links