20220318
CustomノードでSmoothStepの式を使わずにSmoothstepをやってみる
smoothstep(Min,Max,Value)の式で出来る事なんだけど、 式使わなくても再現できるらしいので試してみる。
float t = saturate((Value - Min)/(Max - Min)); return t * t * (3.0 - 2.0 * t);
参考:https://qiita.com/kaoru/items/cf2ec24b98ac23980c71
seen from United States
seen from China
seen from Sweden
seen from United Kingdom
seen from United States

seen from Malaysia
seen from Sweden
seen from Germany

seen from Uruguay

seen from Malaysia

seen from Canada

seen from Italy

seen from United States
seen from United States

seen from Uruguay

seen from Malaysia
seen from Indonesia
seen from Italy
seen from Germany

seen from Malaysia
20220318
CustomノードでSmoothStepの式を使わずにSmoothstepをやってみる
smoothstep(Min,Max,Value)の式で出来る事なんだけど、 式使わなくても再現できるらしいので試してみる。
float t = saturate((Value - Min)/(Max - Min)); return t * t * (3.0 - 2.0 * t);
参考:https://qiita.com/kaoru/items/cf2ec24b98ac23980c71
Smoothstep과 Mix 활용하기
위 사진에서 그려진 그래프의 선은 Smoothstep을 활용하여 만드는데, 구체적인 알고리즘은 아래와 같다.
float plot (vec2 st, float pct){
return smoothstep( pct-0.01, pct, st.y) -
smoothstep( pct, pct+0.01, st.y);
}
원래, 기존에 그려진화면위에, 무언가를 그리려하면, 기존까지 그려진 화면이 없어지고 새로운 화면으로 덮혀지기 마련인데, 위와같이 무언가 그리려는 대상을 층층히 쌓아올리기 위해서(마치 포토샵의 레이어)는 mix함수를 적절히 활용할 수 있어야 한다.
col.r = mix(col.r, colorA.r, sm);
col.g = mix(col.g, colorB.g, s );
col.b = mix(col.b, colorC.b, p);
Plotting with smoothstep()
So The Book of Shaders connects 2 smoothstep() to plot things. The variable names aren’t super clear.
- pct is short for percentage (... come on shader people, use clear names at least in examples)
- color = mix(color1, color2, percentage); // plotted = color2; percentage = plottedness ranging from 0.0 to 1.0
- float thickness = 0.02;
- float aboveness = smoothstep(plotted_y - 0.02, plotted_y, fragment_y); // anything with fragment_y > plotted_y has 1.0 aboveness, also fragements with fragment_y > plotted_y - 0.02 are smoothly, gradually tinted with color2
- float high_aboveness = smoothstep(plotted_y, plotted_y + 0.02, fragment_y); // try replace this with step(plotted_y, fragment_y) --> not smooth at all
- float plottedness = aboveness - high_aboveness; // plot fragments with y higher than plotted_y-0.02, but not higher than plotted_y+0.02
I was lucky enough to interview the ChillStep producer, idletide, to learn more about the man’s inspirations and motivations to make great music. Every once in a while we get to hear some music that breaks the rules and shocks us. The passion burning in his heart is destined to make music that breaks the border between dubstep and soul music.
#stayfree
*Wobble Wednesday* Foster the People - Helena Beat (idletide remix)
This Chillstep music claimed by dubstep producer idletide fits my tastes like Levis 501 STF fit my legs. Make sure to check out the Artist Spotlight on idletide appearing on Tuesday August 23rd, on freeligionmusic.com
#stayfree.
Idletide - Everything feels better
On his Soundcloud, he calls it SmoothStep. This song definitely has those strong kicks and snares a a dubstep tempo but the sax melody in this song is absolutely beautiful. Check out more smoothstep and chillstep at Idletide's Soundcloud.