CG에 관련한 다양한 튜터리얼이나 도움이 될만한 자료를 올려주세요. 항상 업그레이드가 가능할 수 있도록 살아있는 데이타베이스가 되도록 노력합니다. 

Subcategories from this category:

Happy rendering with VEX, Tutorial & Tips, Blogs

leafveins.vfl

/* * Name : leafveins.vfl * * Produced By : Keita Maeda * Modifed By : 정현준 * * Shader 소개 : 잎모양의 displacement shader입니다. */#include <prman.h>#include <vexnotes.h>displacementleafveins( float Km = 0.02; float vein_freq = 8;){ float magnitude = 0.0, layer_mag; float ss, tt; float fuzz = 0.02, d; float dampzone = 0.1, mag_fac;/* main stem l...

Continue reading
  747 Hits

eclipse_pattern.vfl

/* * Name : eclipse_pattern.vfl * * Produced By : Miho * Modifed By : 정현준 * * Shader 소개 : eclipse의 과정을 보여주는 듯한 Shader 입니다. * */#include <prman.h>#include <vexnotes.h>surface regular(float Ka=0.5, Kd= 0.5; float Ks=0.5, roughness= 0.16; color specular_color=1;){ color surface_color, layer_color; color surface_opac; float layer_opac; colo...

Continue reading
  642 Hits

jellysurf2.vfl

/* * Name : jellysurf2 * * Produced By : Keita Maeda * Modifed By : 정현준 * */#include <prman.h>#include <vexnotes.h>surface jellysurf2(float Kd=.1, Ka=.1, Ks=.1, roughness=.1){ color surface_color, layer_color; color surface_opac; float layer_opac; float fuzz = 0.0025; float fuzz2 = 0.035; float noi = 0; point center; color baby_blue = {...

Continue reading
  830 Hits

Sublime text, Python property 자동완성 템플릿

​파이썬의 property는 클래스에서 정보은닉을 위한 용도로 쓰입니다. 지금 제가 강조하고자느는 것은 sublime text(이하 subl)에서 제공하는 템플릿에 대한 내용입니다. 아래의 코드는 subl에서 자동완성 기능을 통해 만들었습니다. 인터넷에서 찾아보시면 여러가지 예제 코드들이 있을텐데, 이 코드가 특별히 나쁜점은 없는거 같아요. 메소드에 의한 클래스 데이타 접근은 코드가 깔끔하지 않습니다. 개인적으로 property를 사용해서, 기존의 클래스를 깔끔하게 다듬는 과정에 있습니다.  아주 좋아요. class Test(object): """간단한 test클래스입니다.""" def __init__...

Continue reading
  1056 Hits

aurora.vfl

/* Name : Aurora.vfl * * Produced By : Akanee Mahasith * Modifed By : 정현준 * Shader 소개 : turbulence를 이용하여 Lightwave가 패턴처럼 생성되는 Shader입니다. * Parameters에 대한 설명 * - turbfreq : use for increasing or decreasing the size and the number of wave, working like zoom in, zoom out. * - frame: use for changing the light wave pattern in order to make different pa...

Continue reading
  777 Hits

bub.vfl

/* Name : bub.vfl * * Produced By : Paul Badger * Modifed By : 정현준 * Shader 소개 : 원들끼리 서로 합쳐진 타일 Shader 입니다. */#include <prman.h>#include <vexnotes.h>surface bub(float tile_no = 8){float d, opac, rand, per, blend1, sd;float tile_s, tile_t, tileX, tileY;color paper, ink, color1, color2, color3, color4, layer1, layer2;float fuzz = .02;tile...

Continue reading
  789 Hits

twosides

/* Name : twosides.vfl * * Produced By : Keita Maeda * Modifed By : 정현준 * Shader 소개 : 바깥면과 안쪽면의 색이 다른 Shader 입니다. * */surfacetwosides(vector front_color={0.1, 0.5, 1}, back_color={0.5 ,0.5,1}){ vector clr, nml; nml = frontface(normalize(N), I); if (dot(nml, N) < 0) clr = back_color; else clr = front_color; Cf = clr * (diffuse(nml) + ambient());}

  768 Hits

cloudy

/* Name : cloudy.vfl * * Produced By : Marla Mayerson * Modifed By : 정현준 * */ #include <prman.h>#include <vexnotes.h>surface cloudy(float turbfreq = 0.3; color topc = {1, 0, 0}; color bottomc = {0, 0, 1}; float Ka = 0.5, Kd = 0.5; float Ks =0.5, roughness = 0.16; color specularcolor = 1){ color paper, ink; float paper_opac, ink_opac; fl...

Continue reading
  652 Hits

brick

/* Name : brick.vfl * * Produced By : Akanee Mahasith * Modifed By : 정현준 * Shader 소개 : whichtile, turbulence를 이용하여 벽돌 패턴을 생성하는 Displacement Shader 입니다. * Shader의 Parameters 설명 * - freq: numbers of brick per row and column. * - Km: Km of brick. * - dfreq: number of freq for turbulence. * - flatness: flatness of surface. */#include <prman.h>#in...

Continue reading
  629 Hits

displacement map

/* * Name : dmap.vfl * * Produced By : Keita Maeda * Modifed By : 정현준 * * Shader 소개 : 이미지를 이용하여 Displacement Mapping을 할수 있는 Shader 입니다. * */#pragma hint map file displacement dmap( string map=""; float amp=0.1; int forpoly=1; vector uv=0){ float ss, tt; float lum; vector nn; if (map != "") { if (isbound("uv")) { ss = uv.x; tt = uv.y; } else { ss = ...

Continue reading
  606 Hits