Jump to content

alr77

Members
  • Posts

    17
  • Joined

  • Last visited

Personal Information

  • Name
    alr

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

alr77's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Dear Atom, First a big thank you to have answered to mys questionnings. Saddly, it didn't worked (on my side). BUT i've found a way to go over. 1.Step one was to record : volume origin and volume res (all in a classical detail wrangle) vector volRes = volumeres(0,"surface"); vector volrOrigin = volumeindexorigin(0,"surface"); setprimattrib(0,"origin",0,volrOrigin,"set"); 2.Step two was to "hard write" voxels ids in a vector array. This at the volume prim level : function vector[] vxids(vector volorigin; int volres[]) { vector vxid[]; for(int vorx = volorigin.x; vorx < (volorigin.x + volres[0]); vorx++) for(int vory = volorigin.y; vory < (volorigin.y + volres[1]); vory++) for(int vorz = volorigin.z; vorz < (volorigin.z + volres[2]); vorz++) vxid[len(vxid)] = set(vorx,vory,vorz); return vxid; } //WRITE VOXELS IDS : vector volorigin = prim(0,"origin",0); int volres[] = primintrinsic(0,"activevoxeldimensions",0); vector voxels_ids[] = vxids(volorigin,volres); setprimattrib(0,"voxels_ids",0,voxels_ids,"set"); 3.Step 3, i just had to read the volume primitive attribute "v[]@voxels_ids". My test example was to drop points at each active voxel centers (source shape is animated with a mountain node). Conclusion : contrary to the volume vop, the volume wrangle doesn't read "easily" the i@ix, i@iy, i@iz. It does BUT it is not obvius for me. (sorry for that). to read them easily, it is better to hard-write them into a vector array attribute at the volume primitive level. the funny thing (for me) is that now we could assign values into a volume from the created points. (humbly which looks easier for me as a beginner). So thank you Atom ! cheers, and all the bests. I've joined a quick screenshot of the houdini scene. if you want to have the .hipnc to add some corrections or even have a review on it, no problem, let me know ! alr77
  2. Dear all, Am actually encountering a problem. probably stupid for you as experienced users but like a "Huuuhh ?" for me. So the goal is to "printf" the i@ix, i@iy, i@iz of any voxel in a volume. a vdb here. So i type in a wrangle node : the source is a VDB from polygon in "surface" SDF mode printf("vox id vector : %g\n",set(i@ix,i@iy,i@iz)); I swear nothing comes out from that line. And i just cannot understad why as normally the volume wrangle "might" browse each voxel one by one. may be it is not the case ? Is anybody had this problem before ? Is it a bug on my side ? As well any advices are welcome, thank you already ! (i've probably made an error, probably basic but i cannot figure out what ^^) all the bests,
  3. So...sorry for the "OUPS post just before". If some are curious about the result of "my crushing decimals string approach". Please find the VEX below : Plug any geo, create the slider decimalsTrim and test. float floatCrushing(float myFloat; int decimal) { //VAR INIT: float crushedFloatValue = -9999; string crushedStringValue = ""; //CRUSHING : string stringizeMyFloat = sprintf("%s",myFloat); int match_science_notation = match("*e-*", stringizeMyFloat); if(!match_science_notation) { //CRUSH THE STRING VALUE : int byteSize = strlen(stringizeMyFloat); for(int byte=0; byte < byteSize; byte++) { crushedStringValue += stringizeMyFloat[byte]; if(stringizeMyFloat[byte] == ".") byteSize = byte + 1 + decimal; } crushedFloatValue = atof(crushedStringValue); } else { //KEEP CURRENT VALUE : crushedFloatValue = atof(stringizeMyFloat); } return crushedFloatValue; } //TEST ON point "P" : vector anyVector = {0,0,0}; for(int chan = 0; chan < 3; ++chan) anyVector[chan] = floatCrushing(@P[chan], chi("decimalsTrim")); @P = anyVector; The goal was to start from High definied geo to harsh geo in a "minecraft" way or 80's CGI. Here normal Geo Here one decimal Geo. As well add a fuse at the end. Change the code to make it works on single float or else, you can also "crush" any Cd vector or noise or else. And sorry for my "OUPS question ^^". If you find any use for you, it is cool. (on my side i needed it hehe^^). Good evening, Thank you, bests, alr + + +
  4. Ouupsss.... Thousand apologies...... I tried : string myString = "myString"; printf("%s",myString[0]); and it worked..... it printed "m". so if anybody as me primarily thought a built-in method was required to do this. it is not the case. It is native as in Python. Good evening, and sorry ! Houdini it is so great. alr + + +
  5. Dear all, Good Evening, So, i was digging into the VEX functions "string" section. And i didn't found any clue to chop a string into an array. string myString = "1234Abc"; The goal will be to get this below : string arrayFromString[] = {"1","2","3","4","A","b","c"}; As well in python it is "native" : myString = "1234Abc" myString[0] would be "1" etc etc.... But to use it in a wrangle i need VEX ....If anybody has a clue . It will be 100% Welcome, as it could be a very simple way to chop and bytecrush long floating numbers. Might it be a NOOB question and i apologize already for that. Thank you a lot, And all the best to everybody with Houdini !!! alr + + +
  6. Great man, Nice...i was wondering to set a VEX snippet...and they did..so it is the good solution. Thank you a lot. cheers.
  7. Thank's vicvvsh ! I'm checking right now ! cheers
  8. Please find my posted questionning below : Dear all, The plot : -> Am currently simulating a simple shatter with rbdPacked prims + Constraints Glue + a gorund plane, all into a DOP. (nothing Awesome till here). The Questions : -> But, strangely, the little rbds continue to vibrate once fallen on the ground. It looks like continuous vibrating tiny giggly wiggly inter-collisions. Did any body ever had this ? Would it be possible, i've to FORCE STOP them using a desactivating VEX snippet in a DOP/geomety wrangle node ? If anybody had this one time, let me know, please. You will be welcome and it will be pleasure to discuss that point you. Thank you all a lot, cheers.
  9. Dear Ahang, Just to say...i'm currently (right now) sharing the same problem.
  10. Dear all, The plot : -> Am currently simulating a simple shatter with rbdPacked prims + Constraints Glue + a gorund plane, all into a DOP. (nothing Awesome till here). The Questions : -> But, strangely, the little rbds continue to vibrate once fallen on the ground. It looks like continuous vibrating tiny giggly wiggly inter-collisions. Did any body ever had this ? Would it be possible, i've to FORCE STOP them using a desactivating VEX snippet in a DOP/geomety wrangle node ? If anybody had this one time, let me know, please. You will be welcome and it will be pleasure to discuss that point you. Thank you all a lot, cheers.
  11. Great Bunker Thank you a lot ! am currently brainwashin' myself from my Maya's usuals hehe ^^ I was tryin, tryin tryin any versions of boo[0][1] etc... but ok, we need this method, thank for it cheers, man
  12. Dear all, A simple looking question about how to pick up an @ttribute's value inside a MATRIX : 2@boo = set(1,2,3,4); printf("boo[0] : %g\n",@boo[0]); it doesn't work while it is working with vector or obviously with array. Saddly, i feel stucked, if needed to pick up one of these values, separatly. Humbly, all/any feedbacks are welcome even if i've dumbly mistaken myself (it could happen to anybody ), thank you all. cheers. alr77
  13. Dear F1, Thank you for explanations, because i've found myself in front of a locked door which finally was more like an illusion as you're explaining the classic "for" iteration is working. Thus we can say even if the academic notation : M[][] doesn't work, its functionality is implicitly embeded inside DOGMATIC 2x2 3x3 or 4x4...so...perfect. i deduce then the reverse getcomp() is setcomp(). I can now, sort, store , arrage datas inside. GR8 ! Thank you twice F1, and enjoy the week end. bests, alr + + +
  14. Dear all, Sorry if my question looks naive, as you're all surely usual with this : matrix reading /printing. But i'd like to "printf" it element by element. Usually, generally a matrix looks like : matrix M[r][c] -> then your iter through. eg : print(M[1][1]+"\n"); But here in Hou it is : matrix M Yes printf() prints the thing but the whole thing. Then, how to read elements one by one separatly, please? i humbly dunno. Am usual with this practice in other languages because Matrices could be used as a fantastic "Chest" to store values, compiling vectors pack, and on and on... So any advices to this practical question are welcome. Thank you a lot. Bests,
  15. Hello, i was reading you topic. Yes as you said. 1. There is a button into copyTopoint Sop : "Transform using points orientation." If you uncheck it you could orient your objects (admitting all the same) with an upper transform in your node tree. 2. with the button activated "Transform using points orientation." : As well using a attrWrglr on your grid let's you (as you've done) set up you @N oe @orient as you like. @N = set(urValueX,urValueY,urValueZ). Wishin it helped you. work well ! alr + + +
×
×
  • Create New...