bytezen Posted January 13, 2014 Share Posted January 13, 2014 1) According to the documentation in Python, hou.hmath.noise1d, is equivalent to the noise in Hscript. Give this I would expect calling noise1d with the same parameters would produce similar images. However, I am unable to get the same plasma-blob look using the python noise function. I have adjusted the scaling factors for TX and TZ in the python version but no matter what I choose I can not get large black sections. (above - python version below - hscript version) in Primitives SOP I am adding color in the red channel as follows: hou.hmath.noise1d((lvar('TX')*0.4,lvar('TY'),lvar('TZ')*0.6)) in the hscript version: noise($TX*0.4,$TY,$TZ*0.6) 2) Also according to the documentation you should be able to provide the noise1d function with a sequence of 1 to 4 numbers for different types of noise fields. I get an error whenever with the following: hou.hmath.noise1d((lvar('TX')*0.4)) or hou.hmath.noise1d(lvar('TX')*0.4) Could someone educate me? Cheers and thanks in advance! noise testing.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted January 13, 2014 Share Posted January 13, 2014 first of all the help says that hou.math.noise1d() matches noise() function from VEX not HScript, and it does, so for your case put AttribWrangle SOP in set class to Primitive and type: @Cd = 0; @Cd.x = noise(@P*{0.4,0,0.6}); and you will see the same result as your python script in Primitive SOP (however I recommend VEX approach from performance point of view) secondly, for sequence of 1 number you need to type hou.hmath.noise1d((lvar('TX')*0.4, )) it's a python thing, since (x) is not the sequence, it's one value in parentheses (x, ) is sequence with the length of one Quote Link to comment Share on other sites More sharing options...
bytezen Posted January 14, 2014 Author Share Posted January 14, 2014 Thanks for the clarification Tomas! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.