Houdini In Five Minutes 11: The Foreach Loop

  Рет қаралды 64,662

Entagma

Entagma

4 жыл бұрын

Download project file (.hipnc): www.entagma.com/downloads/fiv...
For more of everything: www.entagma.com
Support us on Patreon: / entagma

Пікірлер: 38
@N3.1Kryuk
@N3.1Kryuk 2 жыл бұрын
Thank you! This is exactly what I was looking for.
@anxhelo7383
@anxhelo7383 2 жыл бұрын
im still confused, i understand what it does but i dont understans in which cases do we use for each loop
@fallenhoenix1255
@fallenhoenix1255 3 жыл бұрын
Anyone out there know why might my code completion not work in the same way when typing the target geometry string of the detail function like in the video? I'm using relative references the same way. Is there a hotkey or something?
@blaaablooo5233
@blaaablooo5233 Жыл бұрын
Legend!
@harun3Ddigitalartist
@harun3Ddigitalartist Жыл бұрын
thank you bro man...
@user-ou7ek3gg7w
@user-ou7ek3gg7w Жыл бұрын
Genious!
@maximtuts1780
@maximtuts1780 2 жыл бұрын
Where can i learn to make such a cool reflective texture with sun sparkles just like u did in the intro.
@jack_drums
@jack_drums 4 жыл бұрын
Hey guys! As an exercise I tried to implement it in VEX, it's extremely faster! I just used a Facet node (with Unique Points checked to "separate" the primitives) and then a Primitive Attribute Wrangler, I'll paste my VEX snippet down here (and a .hip too with the comparison) if anyone is interested! (Does anyone know if it's possible to transform a primitive directly without having to access all its points? I wasn't able to just use/set a @P attribute for them)
@jack_drums
@jack_drums 4 жыл бұрын
matrix3 mat; vector pos; int success; //Get per axis rotation amount from Controller (red null) float rotX = ch("../Controller/rotation")*ch("../Controller/rotationX"); float rotY = ch("../Controller/rotation")*ch("../Controller/rotationY"); float rotZ = ch("../Controller/rotation")*ch("../Controller/rotationZ"); //Get primitive points int points[]; points = primpoints(0, @primnum); //Rotate each point of the primitive using the transform matrix matr foreach (int pt; points){ mat = ident(); rotate(mat, radians(@primnum * rotX), {1,0,0}); rotate(mat, radians(@primnum * rotY), {0,1,0}); rotate(mat, radians(@primnum * rotZ), {0,0,1}); pos = pointattrib(0, "P", pt, success); if(success) setpointattrib(0, "P", pt, pos*mat , "set"); }
@lveronese
@lveronese 4 жыл бұрын
@@jack_drums thanks for the code, it's extremely faster
@mattreed6871
@mattreed6871 4 жыл бұрын
@@jack_drums SO much faster!!!
@aboldmule
@aboldmule 2 жыл бұрын
great inspiration and application of linear algebra! Thanks!
@jack_drums
@jack_drums 2 жыл бұрын
@@aboldmule Thank you! Glad it helps! ☺️
@robertschroer5794
@robertschroer5794 2 жыл бұрын
Awesome Tutorial! Isnt Chris Hebert the director of finances at SideFX ? :D
@Zerefthedark
@Zerefthedark 4 жыл бұрын
I have a doubt .... I tried to replace the pigs head with an alembic animation and the result i got was the entire body rotating instead of the polygons... what should i do to get the polygons rotating
@psychedlicavfx6646
@psychedlicavfx6646 4 жыл бұрын
Hard to say as there could be a number of reasons but did you try using Unpack sop right under alembic import?
@Zerefthedark
@Zerefthedark 4 жыл бұрын
@@psychedlicavfx6646 thank you for replying 😄. I did, the thing is it works on the first or well the selected frame but not on the rest of the animation 😶. I tried unpacking and also using time shifting and using that to link the animation to geo node but so far no luck 😣
@psychedlicavfx6646
@psychedlicavfx6646 4 жыл бұрын
@@Zerefthedark that's strange. maybe write out the geo as a single frame bgeo after unpacking. then read it back in. this way you can diagnose if houdini is having trouble reading the alembic or there is something off in the alembic itself. bit of a hack but it could work. let me know if it works. am curious :)
@Zerefthedark
@Zerefthedark 4 жыл бұрын
@@psychedlicavfx6646 ok I will let you know when I try it 😄 thanks for replying tho
@Tyson2k55
@Tyson2k55 4 жыл бұрын
DAVID T VARGHESE maybe place an unpack and then a convert node. After the unpack I think it’s still a poly soup. The convert will make it into polygons. I’m no expert though.
@undertone_dj
@undertone_dj 3 жыл бұрын
Hmmm, for some reason, I don't get the same results. When typing the expression for the seed to connect to the iteration attribute of the metadata node, the results deviate for me. It's still green. Tried it twice, and get the same, differing result. I'm on 18.5.483
@undertone_dj
@undertone_dj 3 жыл бұрын
Figured it out. Had iteration spelled incorrectly.
@Evemy_
@Evemy_ 8 ай бұрын
@@undertone_dj Cheers for this, you made me realise I'd made the same mistake 😅
@pinkospace9040
@pinkospace9040 3 жыл бұрын
What does it mean to rotate each primitive according to iterations? I imagine each of the primitives to rotate in place, but in the video they are flying around, so I don't understand what is it actually doing? Where is the origin of the primitive's rotation?
@Entagma
@Entagma 3 жыл бұрын
Heyhey, the origin of each individual primitive is at {0,0,0}, so that's why they appear to be "flying" around. If you wanted to have the primitives rotate in place you'd first have to translate them so their center is at {0,0,0}, then rotate them, then translate them back. Cheers, Mo
@pinkospace9040
@pinkospace9040 3 жыл бұрын
@@Entagma Thank you so much for your reply, so each primitive's origin is at 0,0,0 but they are positioned based on the points they are connected to, which could be anywhere, sorry coming from a 3ds max background, didn't get this until now
@Entagma
@Entagma 3 жыл бұрын
Yes, exactly this. :) Cheers, Mo
@FullThrottle1091
@FullThrottle1091 2 жыл бұрын
In the transform sop's pivot transform type $CEX $CEY $CEZ in the pivot translate's X Y Z channels respectively to transform around the centroid.
@Goten1010
@Goten1010 2 жыл бұрын
why does the for each loop split the individual primitives up? Why wouldnt it keep it as a complete mesh?
@Entagma
@Entagma 2 жыл бұрын
Because the foreach loop (as we set it up in this case) is used to execute whatever nodes you put inside the loop body for each primitive separately. If you want to work on the geo as a whole, simply don't use a foreach loop :) Cheers, Mo
@Goten1010
@Goten1010 2 жыл бұрын
@@Entagma First of all, thanks for the answer, and thanks for all the great vids you guys do :) I think what I was trying to say was that the vertices between the polygons get split up, instead of the mesh being kept closed. I feel like it isn't intuitive that the loop would do that: after all, it could just, one after the other, transform each polygon, while NOT separating each polygon from the ones next to it(kind of like a displacement would do it). It seems like you wouldn't be able to do that in the loop, right? Sorry, maybe that's a bit stupid to point out, since I can't think of a good example why one would want to do that either at the moment, just something that I noticed^^
@FullThrottle1091
@FullThrottle1091 2 жыл бұрын
@@Goten1010 There's For-Each Connected Piece which uses the connectivity sop defining an attribute ("class" by default) that is used for the piece attribute in the block end.
@pavelpetrikor
@pavelpetrikor Жыл бұрын
First peak of the sound too high and beat my ears every time.
@waqar_de
@waqar_de 2 жыл бұрын
Why are you running in hurries? ... Sounds extremely stupid and enjoying!!! .... Completely loosing the focus what I am trying to achieve 😂... The learning! ... It's not a demo of your performance 😉 ... It's how better I can understand what you have to theater for me as audience.....
@wavelogic8471
@wavelogic8471 3 жыл бұрын
This is ridiculous! there is no god forsaken reason to have to type code on a foreach loop in a node interface. Look at unreal engine blueprints to see how it's done.
@Entagma
@Entagma 3 жыл бұрын
Thank you for your valuable feedback. Cheers, Mo
@vincestevenson9430
@vincestevenson9430 7 күн бұрын
@@Entagma Lovely deadpan passive aggressive reply.
Houdini In Five Minutes 12: Setting Up Particles
7:57
Entagma
Рет қаралды 60 М.
Houdini In Five Minutes 09: For-Loops & Extrusions
7:33
Entagma
Рет қаралды 44 М.
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 8 МЛН
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН
顔面水槽をカラフルにしたらキモ過ぎたwwwww
00:59
はじめしゃちょー(hajime)
Рет қаралды 37 МЛН
Eccentric clown jack #short #angel #clown
00:33
Super Beauty team
Рет қаралды 22 МЛН
Foreach Loops in Houdini for Beginners
26:54
bubblepins
Рет қаралды 26 М.
Houdini - Ответ - Блоки Foreach
8:44
Houdini по-русски
Рет қаралды 10 М.
Houdini In Five Minutes 13: Setting Up Grains
5:52
Entagma
Рет қаралды 57 М.
The Copy Stamp is No More! Do this instead!
7:38
CGI Nerd
Рет қаралды 7 М.
Feedback Foreach Loop Part 1 - Basic Concepts 1 to 3
14:20
bubblepins
Рет қаралды 9 М.
For Each Loop - Houdini Vex - CG Forge
6:46
CG Forge
Рет қаралды 12 М.
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 8 МЛН