peliosis 0 Posted January 27, 2006 Yes all surface shader Well, it's not that simple is it Share this post Link to post Share on other sites
Andz 8 Posted January 27, 2006 I guess this version is decent. erode_02.mov Share this post Link to post Share on other sites
lynbo 0 Posted January 27, 2006 Hey Andz This is great. and thanks for the screens Sven. They help. I hope to try some tests this weekend armed with this new knowledge. Share this post Link to post Share on other sites
Visual Cortex Lab 0 Posted January 27, 2006 Yes all surface shader Sven 24179[/snapback] awesome!... now i've something really cool to study and learn from ... thanks a lot SvenP for your precious help cheers Share this post Link to post Share on other sites
Mario Marengo 32 Posted January 27, 2006 Yes all surface shader 24179[/snapback] Nice work there Sven! But how can you guys work with VOPs when things get somewhat involved like in Sven's case? This is not at all a criticism (the shader obviously works fine and is a very nice one), I'm simply curious... I would find it almost impossible to maintain the resulting visual spaghetti (not to mention the catastrophic effects of plugging/unplugging inputs to sub-networks and in-line vops). I know this is just a case of personal preference and really doesn't matter (unless someone else has to maintain it as well that is), but would the equivalent ~50 lines (just a guess) of clean VEX code be scarier to look at? Sorry... having a bit of a lazy Friday and had a sudden evil urge to hijack a good thread with a pointless post :thumbdown: Cheers! Share this post Link to post Share on other sites
TheUsualAlex 4 Posted January 27, 2006 This is 'hypertexture' shader, right? This is the first time I've seen someone doing this. I've only seen it in books prior. Good job, Sven. That's something for me to learn too! Yeah, I guess with a full-blown, complex production shaders, I'd definitely enroute VEX coding over VOP. However, in geometry context, I'd still favor VOP for its rapid feedback. Thanks! Alex Share this post Link to post Share on other sites
SvenP 2 Posted January 27, 2006 Nice work there Sven! But how can you guys work with VOPs when things get somewhat involved like in Sven's case? This is not at all a criticism (the shader obviously works fine and is a very nice one), I'm simply curious... I would find it almost impossible to maintain the resulting visual spaghetti (not to mention the catastrophic effects of plugging/unplugging inputs to sub-networks and in-line vops). I know this is just a case of personal preference and really doesn't matter (unless someone else has to maintain it as well that is), but would the equivalent ~50 lines (just a guess) of clean VEX code be scarier to look at? Sorry... having a bit of a lazy Friday and had a sudden evil urge to hijack a good thread with a pointless post :thumbdown: Cheers! 24192[/snapback] Actually i prefer to write code too and yes i am really having a lot of problems with that visual spaghetti but the people on the chan are beating me out of irc if i dont do it in vops so that they understand it ( Hey Ratman and Sum][One ). And now i am of to write that shader again in code and add some more advanced stuff that i really dont want to do with vops ( another if and for in there for substepping no thanks ). Sven Share this post Link to post Share on other sites
altbighead 23 Posted January 27, 2006 I guess this version is decent. 24185[/snapback] hey nice job.. I am also experimenting with the effect .. You manage to get the subtle deatiled .. So we are all having Erosion fever here. Share this post Link to post Share on other sites
Andz 8 Posted January 27, 2006 hey nice job.. I am also experimenting with the effect .. You manage to get the subtle deatiled .. 24205[/snapback] It is just a fade from one .TGA to another. All 10 images were done with that WorldMachine. Share this post Link to post Share on other sites
Mario Marengo 32 Posted January 27, 2006 It is just a fade from one .TGA to another. All 10 images were done with that WorldMachine. 24207[/snapback] Nice. Anyone who has used both WorldMachine and Terragen willing to compare and contrast? Share this post Link to post Share on other sites
Ratman 1 Posted January 27, 2006 Some interesting stuff, confusing as hell, but all in a good sense Share this post Link to post Share on other sites
peliosis 0 Posted January 27, 2006 I don't quite get what this shader does, are you going to send it to exchange to let noobs study it's full version or is it just a teaser ? About shaders, if a shader is written in vex code doesit need to be compiled and installed in order to be used? Then any change would force you o recompile reinstall? I understand code can be less messy but is it as easy to change and control it with immediate visual feedback as VOPs? Share this post Link to post Share on other sites
Mario Marengo 32 Posted January 27, 2006 About shaders, if a shader is written in vex code doesit need to be compiled and installed in order to be used? Then any change would force you o recompile reinstall?I understand code can be less messy but is it as easy to change and control it with immediate visual feedback as VOPs? 24211[/snapback] Well, I don't want to spoil this thread so I'll just say: Yes, you need to recompile vex code (usually some tenths of a second), and you only need to reload if there's been a UI change (though even that is automatic on recooks for VOPs). But, even though I admit I'm the one guilty of having mentioned it to begin with, we should really save that discussion for a different thread. My bad sorry. Share this post Link to post Share on other sites
Andz 8 Posted January 28, 2006 Nice.Anyone who has used both WorldMachine and Terragen willing to compare and contrast? 24208[/snapback] I see World Machine as a hightmap or mesh creator, Terragen does the same and renders it, im not sure if you can export anything else. WorldMachine's gallery is rendered on other softwares. Share this post Link to post Share on other sites
SvenP 2 Posted February 2, 2006 Heres another version of the implicit surface shader this time code and at least for me it works better then the vops one. Sven #include <voptype.h> #include <voplib.h> float bias(float b,x;) { return( pow(x,log(B)/log(0.5))); } float density_function(vector marchpoint,frequency,offset; float roughness,attenuation,gain; int turbulence; ) { float density; density = bias(gain,onoise(marchpoint*frequency-offset,turbulence,roughness,attenuation)); return(density); } surface Implicit( // Raymarching Parameters float maxdist = 20; float iso = 0.5; float step = 0.001; // density_function Parameters vector frequency = {1,1,1}; vector offset = {0,0,0}; float roughness = 0.5; float attenuation = 0.5; float gain = 1; int turbulence = 4; // shading parameters vector amb = {0,0,0}; vector diff = {0.5,0.5,0.5}; vector spec = {1,1,1}; float shinyness = 0.5; ) { int front; front = (vop_dot(I, N) < 0.0) ? 1 : 0; if ( front != 0 ) { vector marchpoint,marchdir,marchnormal,raydir; float marchlength,density,currdist; marchpoint = P; marchdir = normalize(P-Eye); raydir =P+(marchdir*maxdist); marchlength=rayhittest(P,raydir,0.05); if ( marchlength > 0.001 ) { density=0; currdist=0; while ( density < iso && currdist < marchlength) { density = density_function(marchpoint,frequency,offset,roughness,attenuation,fit(gain,0,1,iso,1),turbulence); currdist = distance(P,marchpoint); marchpoint += marchdir*step; } if ( density >= iso) { // Shading marchpoint -= marchdir*step; if ( avg(marchpoint-P) <= 0.01) { marchnormal=N; } else { marchnormal=set(density_function(marchpoint-{0.001,0,0},frequency,offset,roughness,attenuation,fit(gain,0,1,iso,1),turbulence)-density, density_function(marchpoint-{0,0.001,0},frequency,offset,roughness,attenuation,fit(gain,0,1,iso,1),turbulence)-density, density_function(marchpoint-{0,0,0.001},frequency,offset,roughness,attenuation,fit(gain,0,1,iso,1),turbulence)-density); } marchnormal = frontface(marchnormal, I); Cf = amb*ambient(); Cf += diff*diffuse(marchnormal); Cf += spec*phong(normalize(marchnormal),-normalize(I),1-shinyness); Of = {1,1,1}; Af = 1; } else { // NoShading Cf={0,0,0}; Of={0,0,0}; Af=0; } } else { Cf={0,0,0}; Of={0,0,0}; Af=0; } } else { Cf = {0,0,0}; Of = {0,0,0}; Af = 0; } } Share this post Link to post Share on other sites
aracid 5 Posted February 2, 2006 i love short posts. thanks SvenP!! Share this post Link to post Share on other sites
SvenP 2 Posted February 2, 2006 i love short posts.thanks SvenP!! 24387[/snapback] Dont thank me thank our lovely mods that dont allow .vfl attachments on an houdini board Sven Share this post Link to post Share on other sites
Mario Marengo 32 Posted February 2, 2006 Dont thank me thank our lovely mods that dont allow .vfl attachments on an houdini board 24388[/snapback] Hehe. You can use [codebox] and [/codebox] to keep it a little more manageable. Or just zip it. Looks interesting Sven. I'll have a look when I get home. Thanks for sharing! Share this post Link to post Share on other sites
Jason 134 Posted February 2, 2006 Dont thank me thank our lovely mods that dont allow .vfl attachments on an houdini board Ok; you big whiner, I've allowed vfl/otl/hip attachments now Share this post Link to post Share on other sites
michael 169 Posted February 2, 2006 should the codebox be converting the code into smiley's? I don't think that's right... Share this post Link to post Share on other sites