Very Good Site

Houdini/Houdini etc 2015. 8. 24. 03:30 |
Posted by scii
:



Special characters in path definition are:
	 @ - Typically expands to the HOUDINI_PATH. Thus, if the
			 HOUDINI_PATH was set to:
			 $HIP
			 $HFS/houdini
			 $HOME/houdini
			 a path defined as "@/vex" would expand to the paths
			 $HIP/vex
			 $HFS/houdini/vex
			 $HOME/houdini/vex
	 = - This expands to the $HIP variable. This path will always
			 point to where the currently loaded hip resides.
	 & - The ampersand character expands to the "default" path.
			 For example, to add a directory to the a path without
			 worrying about what the default path should actually be,
			 simply set the path to: "/mypath;&". This will search
			 the "/mypath" path first, then search the default path.
	 ^ - Some paths are used for multiple directories. For
			 example, the HOUDINI_VEX_PATH is used to define the
			 search path for Surface, Displacement, Sop, etc. VEX
			 shaders. For VEX, the ^ symbol expands to the shader
			 type. Thus, if the HOUDINI_VEX_PATH variable is set to
			 something like "/usr/local/vex;$HOME/vex/^", when
			 loading Surface shaders, the following directories will
			 be scanned:
			 /usr/local/vex
			 $HOME/vex/Surface
			 and if Sop shaders are being searched for, the
			 following paths will be searched:
			 /usr/local/vex


Houdini command-line Shell :  "hconfig -ap" 


Posted by scii
:


수학 공식을 분해하여 Houdini에서 적용시키니 정말 이해가 잘 가고 좋다~!! 


 => length 


 => normalize


 => dot

 => dot


 => arccosine






'Houdini > Houdini etc' 카테고리의 다른 글

Very Good Site  (0) 2015.08.24
Houdini Special characters  (0) 2014.04.21
뷰창에서 보이는 View Option 들 제거하는 Hscript  (0) 2013.02.21
RenderMan Shader Compiles  (0) 2013.01.08
Houdini User가 갖춰야 할...  (0) 2012.12.02
Posted by scii
:



맨 처음에는 viewoptrm `run("viewoptls")` 이렇게만 적용하였다.

그런데 문제가 실수로 한번만 툭 눌러도 view option들이 싸그리 지워지는 것이다. 

그래서 별 것 아니지만, 메시지를 띄어서 사용자가 선택할 수 있게하였고, 그 결과 값을 if문을 통해서 선택적으로 명령이 실행되게끔 코딩하였다. 



'Houdini > Houdini etc' 카테고리의 다른 글

Houdini Special characters  (0) 2014.04.21
dot product, arccosine, length, normalize 분해하기  (0) 2013.06.21
RenderMan Shader Compiles  (0) 2013.01.08
Houdini User가 갖춰야 할...  (0) 2012.12.02
Cross Product  (0) 2012.11.27
Posted by scii
:

RenderMan Shader Compiles


The simplest way to get RenderMan shaders compiled and into Houdini is to do this:

% shader myshader.sl% 

rmands -l myshader.otl myshader.slo

This will create a digital asset with the compiled shader in it. Then you install thatthrough the file menu (File->Install Operator Type Library), and you're done - it willbe on the shader menu, with all of the UI elements already set up.


Even better, you can do this:

% rmands -l rmanshaders.otl *.slo

and this will put all your shaders into one asset. Then you can put this someplace like

$SHOW/houdini/otls

and set up Houdini with an environment variable, thus

HOUDINI_OTL_PATH = $SHOW/houdini/otls


Then whenever anyone runs Houdini, it will automatically load up all the shaders(and even better, the dialogs and other stuff).10


Posted by scii
:
Posted by scii
:

Cross Product

Houdini/Houdini etc 2012. 11. 27. 21:07 |

up x(cross) N    =>    X축.

N x(cross) X       =>    Y축.

N    =>    Z축.

'Houdini > Houdini etc' 카테고리의 다른 글

RenderMan Shader Compiles  (0) 2013.01.08
Houdini User가 갖춰야 할...  (0) 2012.12.02
후디니 내에서 쓸 수 있는 함수를 만들 때, 기본적으로 알아야 할 것들  (0) 2012.11.20
12.08.20 MON  (0) 2012.08.23
짝수 공식  (0) 2012.05.16
Posted by scii
:

후디니 내에서 쓸 수 있는 함수를 만들때의 기본 틀:

[return_type] functionName([[arg_type1] arg_name1 [, [arg_type2] arg_name2] ...])
{
...
}
반환형 타입과 인수 타입은 float,  string, vector, or matrix 를 쓸 수 있다.

#은 주석처리.


만약 반환형과 인수의 타입을 명시하지 않으면 후디니는 자료형에 float이 있는 것처럼 인식한다.

그리고, 만약 인수타입에 string을 넣어야 하는데 그것을 잊고 넣지않으면, float으로 인식해서 잠재적 버그를 

열심히 찾는다고 한다.

자료형을 꼭 명시해야겠다.



Examples

# Function to find the minimum value of two
# floating point numbers

min(v1, v2) {
    if (v1 < v2) {
        return v1;
    } else {
        return v2;
    }
}

# Function to reverse the order of a string

string strreverse(string in) {
    float len = strlen(in);
    
    string result = "";
    
    for (src = len-1; src >= 0; src--) {
        result += in[src]; return result;
    }
}

# Example to find the minimum element in a vector

float vecmin(vector vec) {
    min = vec[0];
    
    for (i = 1; i < vsize(vec); i++) {
        if (vec[i] < min)  min = vec[i];
    }
    
    return min;
}

# Example to transform a vector into the space
# of an object passed in.

vector opxform(string oname, vector v) {
    matrix xform = 1;
    
    if (index(oname, "/obj/")) {
        xform = optransform(oname);
    } else {
        xform = optransform("/obj/"+oname);
    }
    
    return v * xform;
}

# Example to find all objects which have their
# display flag set

string opdisplay() {
    string objects = run("opls /obj");
    string result = "";
    nargs = argc(objects);
    
    for (i = 0; i < nargs; i++) {
        string obj = arg(objects, i);
        if ( index(run("opset " + obj), " -d on") >= 0 ) result += " " + obj;
    }
    
    return result;
}

'Houdini > Houdini etc' 카테고리의 다른 글

Houdini User가 갖춰야 할...  (0) 2012.12.02
Cross Product  (0) 2012.11.27
12.08.20 MON  (0) 2012.08.23
짝수 공식  (0) 2012.05.16
$F, $FF 의 차이점  (0) 2012.05.04
Posted by scii
: