Кабуш Павел
lizardstailz
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Default values for function arguments in vex snippets error Oct. 30, 2017, 4:02 p.m.
tamte
if you expect it to work like python and being able to just omit b to get the defaults, then it's not automatic
you can however create the representation of the function with just a and use default value for b inside
like this:int test(int a;int b) { return a+b; } int test(int a) { int b = 2; return test(a, b); } printf("%g\n", test(1)); // returns 3 (1 + default 2) printf("%g\n", test(1,1)); // returns 2 (1 + 1)
That's exactly what i did)
Still it's strange that this example errors out in snippets
taken from http://www.sidefx.com/docs/houdini/vex/lang [www.sidefx.com]
surface noise_surf(vector clr = {1,1,1}; float frequency = 1; export vector nml = {0,0,0}) { Cf = clr * (float(noise(frequency * P)) + 0.5) * diffuse(normalize(N)); nml = normalize(N)*0.5 + 0.5; }
Difference between SOP volumes and scalar fields in DOPS April 23, 2017, 5:56 a.m.
So volumes seem to be almost the same thing as the scalar fields.
Though for scalar fields you have a lot of predefind microsolvers like advection,gas analisis and so on.
But it seems that you can make something similar using volume wrangles in SopSolver.
Is there a more important difference between them that im not able to grasp?
Though for scalar fields you have a lot of predefind microsolvers like advection,gas analisis and so on.
But it seems that you can make something similar using volume wrangles in SopSolver.
Is there a more important difference between them that im not able to grasp?