Jump to content

Metacloud Raymarcher


Recommended Posts

Here my test of pure reymarcher through metafield.

As for me, it works better than i3d in "rocket trail" like situations,

because no need to worry about i3d resolution.

Since rocket trail is just sequence of bgeo saved to disk, i have a one BIG problem...

I have no idea how to obtain Motion Blur.

Any suggestions on how to fix this are welcomed.

I`m afraid it is not possible at all, but who knows... :coffee1:

MetaCloud.zip

post-136-1143575584_thumb.jpg

Link to comment
Share on other sites

Thanks guys :)

AMD 3700+

2Gb RAM

Step Size: 0.05

Self Shadow Step Size: 0.1

Self Shadow Noise: On

Render Time: 8 min 35 sec...this is the price of "no need to worry about..." :)

On the other hand the time to prepare 1024x1024x1024 i3d is much longer.

There is nothing special about the shader...it uses almost the same "engine"

as VEX 3D Texture Fog.

Link to comment
Share on other sites

That is really good Andrew.

Motion Blur is going to be a pain with an object from disk.

No velocity vectors.

You might try using the metaballs in a seperate render that gives you 2d motion vectors and do a post process motion blur

using reel samrt or smooth kit plugins.

My 2 Cents

Link to comment
Share on other sites

Hey guys. It is possible to write out velocities of metaballs but here is one problem - which velocity must be rendered? Or velocities must be integrated? In last case I see other problem - if one "smoke layer" have velocity = 1 and other "smoke layer" have velocity = -1 we can get result velocity = 0. :angry:

Link to comment
Share on other sites

It is metabals copied over points (particles) (non renderadble "model" object)

Ok...i will try this:

export velocity vectors to metaballs

Import vector when density registered for the first time....

output this vector to deep raster...blur in comp

Link to comment
Share on other sites

Is it possible to force metaweight to use the source

sop rather than a file?

Unfortunately no...

op: syntax doesnt work

also what's causing the hard edge when I reduce density?

Can You show picture?

My guess...unhidden original metabals.

Link to comment
Share on other sites

so files are used because it *couldn't* work

with the sop? just curious...

also here's the pic. changed settings are:

density: 0.8, turbulence: 4. no self shadows.

removed masks to all but 1 light placed behind the cloud.

if you just reduce density, turbulence and switch

off self shadows on the posted file you'll get a similar

result. looks like clamping or an additive effect.

-cpb

post-369-1143792992_thumb.jpg

Link to comment
Share on other sites

so files are used because it *couldn't* work

with the sop? just curious...

Exactly...:(

Is red line drawn by You to show edge or this is mantra?

I can not reproduce red line...

Hardness of the "edge" depends on how density

is distributed inside the volume.

Perhaps there is to much metabals...so the density is MUCH greater than 1

I`m think You will get the same result if You create i3d from this metacloud

and render it with VEX 3D Texture Fog shader

Link to comment
Share on other sites

there is a very old technique to get moBlur without actually render it.

just render subframes, this will produce a lot more images,

then timestretch them in compositing - the interpolation will give you the motion blurred look.

timewise the difference is not that big - rendering volumetrics with motion blur usually takes a lot of time.

rendering of non-motion blurred volumetrics is faster, but rendering bunch of additional subframes will rise the render times.

so ... it's so - so.

Link to comment
Share on other sites

  • 3 months later...

I have reworked shader slightly

Now it uses metamarch function, perpoint colors,life depended opacity and noise amplitude.

However i am still fight with velocity.

How to get attribute of single mataball from a large amount of metaballs?

Suppose i want to get velocity...

int found = 0; // Velocity Not Found yet
...
...
...
while (metamarch(index, fname, p0, p1, bias)) //Lets roll
{
 ...
 ...
 ...
 for (i = 0; i < nsteps; i++) // Something found...lets test it
   {
	...
	...
	...
	opac = density * clamp(dfunction(fname,p0+noise,dexp),0,1); // Is there some density?
	if (!found && opac > 0.0001){ // If not found and there is some density then...
	  v = getvelocity(fname,"v",p0+noise); //get velocity
	  found = 1; // I found it 
	}

When i call getvelocity i am sure that "p0+noise" inside one of metaballs

So...theoretically i can get it by calling:

handle = metastart(fname, p0+noise);

metaimport(handle, aname, p0+noise, result)

However i got nothing :( result is always zero.

I am forced to use such function to get something

vector
getvelocity(string fname, aname; vector p)
{
  int	 handle;
  vector  result = 0;

  handle = metastart(fname, p);
  while (metanext(handle))
  {
	if (metaimport(handle, aname, p, result))
		break;
  }
  return ow_vspace(result);
}

Whats wrong??? Can anybody enlighten me?

DivX.zip

Link to comment
Share on other sites

  • 1 month later...

Hmm...

It would've been nice if fog context supported some surface context functions, like 'forpoints()' - so that one could access surrounding points and query their attributes. This way getting velcity attribute would be piece of cake.

Good luck in your perseverance.

Link to comment
Share on other sites

On the second thought...

I've just tried declaring pcopen(); function in VEX Fog context and didn't get any "function declared outside of context" messages - so I thought it was possible to use this functions to query nearby particles with which the metaball object wascreated with? Then you could assign V attribute of a given P in your Metmarch shader by copying it from nerby particles... It's just in theory - can this be done?

I would try it myself, but I am inexperienced with pointclouds. Still - if anybody who has more knowledge sais that it is possible - I'll try this as well. So, wat do you think, guys? Andrew?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...