Jump to content
lynbo

Erosion Effects

Recommended Posts

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
Yes all surface shader

post-535-1138351307_thumb.jpg

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
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? :blink:

Sorry... having a bit of a lazy Friday and had a sudden evil urge to hijack a good thread with a pointless post :P :thumbdown:

Cheers!

Share this post


Link to post
Share on other sites

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. :D

Thanks!

Alex

Share this post


Link to post
Share on other sites
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?  :blink:

Sorry... having a bit of a lazy Friday and had a sudden evil urge to hijack a good thread with a pointless post :P :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 :D ).

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 :P ).

Sven

Share this post


Link to post
Share on other sites
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. :P

Share this post


Link to post
Share on other sites
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
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

Some interesting stuff, confusing as hell, but all in a good sense :D

Share this post


Link to post
Share on other sites

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
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
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

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 &lt;voptype.h&gt;
#include &lt;voplib.h&gt;

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) &lt; 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 &gt; 0.001 )
	{
  density=0;
  currdist=0;
  while ( density &lt; iso &amp;&amp; currdist &lt; 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 &gt;= iso)
  {
  // Shading
  	marchpoint -= marchdir*step;
  	if ( avg(marchpoint-P) &lt;= 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
i love short posts.

thanks SvenP!!

:blink:

24387[/snapback]

Dont thank me thank our lovely mods that dont allow .vfl attachments on an houdini board :P

Sven

Share this post


Link to post
Share on other sites
Dont thank me thank our lovely mods that dont allow .vfl attachments on an houdini board  :P

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
Dont thank me thank our lovely mods that dont allow .vfl attachments on an houdini board  :P

Ok; you big whiner, I've allowed vfl/otl/hip attachments now :)

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×