Jump to content

Streaky Portal Effect [SOLVED]


IhabAli

Recommended Posts

Hello All,

I'm trying to achieve the same effect of  the attached portal reference video specifically the hair like edges shown in the below screenshot.  can achieve the general fluttery movement in a pyro but the core of the "stringy" edges appear to behave like a violent FLIP splash. The closes I got was advercing a POP sim with velocities from a fluttery smoke sim and applying POP fluid and converting the particles back into a fog volume with some velocity noise and velocity motion blur but it just doesn't look nor move right(see stringy.mp4). Any advice or recommendation would be highly appreciated!!!

image.png.cb74e79c8c4b500e0e40521774db5ed1.png

 

 

Video Reference for the Effect:

effect.mp4 

 

 

Edited by IhabAli
Link to comment
Share on other sites

Thanks @Librarian. Not sure how the spherical force applies to the stringy fluid like effect in the reference. Perhaps I missed something in the file? The spherical trailing pop sim is very cool looking btw, so thanks for sharing anyway! :)

 

 

 

Link to comment
Share on other sites

Getting closer to the reference using flip and attribute controlled viscosity. The tentacles in my setup seem a bit bloby, more like liquid than hair.  Do you guys think the insane amount of tiny strands like in the reference is a matter of increase the flip resolution? Do you think with the basic dynamics in place the rest of the fine details are shader based?

 

I've attached my setup in case someone is able to improve on it and provide some guidance on how to get more hair like details in the FLIP sim.

 

Appreciate the feedback!!

 

 

 

 

image.png.64545ce085dbfe76029add969cbd07a9.pngimage.png.86915e103f60c40093b16a747b9a7772.png 

Stringy2.mp4

lavabased.hiplc

Edited by IhabAli
Link to comment
Share on other sites

 @Librarian this looks like a simple pop simulation driven with some turbulence source point velocities. Not really related to the video reference I sent. I appreciate your help but I'm looking for a way to achieve the level of complex details while maintaining the fluid like movement of those hair like fluids. 

 

Anyone else?

 

 

Link to comment
Share on other sites

Sorry it seems that you know what you doing and has some basic skills so please do this combine advect particles by vdb (or volume ) take this example from CG wiki

Pyro divergence and sinks in Dops ..and it seems that effect its done with layering 3 different effects so have fun.

Edited by Librarian
Link to comment
Share on other sites

Thanks @Librarian. Yes 3 layers 2 of which are fairly simple to analyze and implement(the smoke like ring pushing outwards and the red firey "energy" pushing forward). The black streaky hair is what I've been asking about.

 

Advecting particles by VDB is essentially why I decided to go with FLIP just so I don't have to implement things like velocity field smoothing and viscosity from scratch. Basically the "hairs" are behaving like particles driven by a non-divergent velocity field because of the way they fold and swirl around(at least that's what I think). Pyro won't be sufficient on it's own because of natural diffusion that occurs from non-divergent projection in the velocity field and particles would be the way to maintain details. I understand all of that and my conclusion was just to use flip because it's basically a combination of POPs and Pyro. I've posted my simple implementation of a customized FLIP solver to show how I was approaching this effect but I'm struggling with the LOD.

I'm specifically looking for techniques or idea to achieve hairy streak like patterns in FLIP or otherwise a completely different concept of achieving dynamic abstract hair like patterns I guess.

 

Thank you once again @Librarian!

 

Edited by IhabAli
  • Like 1
Link to comment
Share on other sites

Adding more resolution does help.

Here is a thirty million voxel upres from an eight million voxel source that leveraged OpenCL. This took about 24gb of physical ram.

streaky_ring.gif

Edited by Atom
Link to comment
Share on other sites

Thanks @Atom, I know how to build it, I was just being lazy :) I'm still working on a customization in the vellum solver for wire breaking in an attempt to create even more fine details.

 

Nice tutorial BTW!

 

Edited by IhabAli
Link to comment
Share on other sites

With this @IhabAli I think no need for velum shmelum and other stuff. I like this setup I can build (sky its A limit ) ..Here you have 3 different samplers (point clouds) and setup for Vop for having control over source shape and point that attract and do other crazy sh...HAve fun (here its like 15000 points Only )

// from spherical coordinates to cartesian coordinates
 // from tangent-space vector to world-space sample vector
---------------------------------------------------------------------------------
float VanDerCorpus(int n; int base)
{
    float invBase = 1.0f / float(base);
    float denom   = 1.0f;
    float result  = 0.0f;

    for(int i = 0; i < 32; ++i)
    {
        if(n > 0)
        {
            denom   = float(n) % 2.0f;
            result += denom * invBase;
            invBase = invBase / 2.0f;
            n       = int(float(n) / 2.0f);
        }
    }

    return result;
}
// ----------------------------------------------------------------------------

// ----------------------------------------------------------------------------
vector2 HammersleyNoBitOps(int i; int N)
{
    return set(float(i)/float(N), VanDerCorpus(i, 1));
}




vector ImportanceSampleGGX(vector2 Xi;vector N;float roughness)
{
    float a = roughness*roughness;

    float phi = 2.0 * PI * Xi.x;
    float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a*a - 1.0) * Xi.y));
    float sinTheta = sqrt(1.0 - cosTheta*cosTheta);

    // from spherical coordinates to cartesian coordinates
    vector H;
    H.x = cos(phi) * sinTheta;
    H.y = sin(phi) * sinTheta;
    H.z = cosTheta;

    // from tangent-space vector to world-space sample vector
    vector up        = abs(N.z) < 0.999 ? set(0.0, 0.0, 1.0) : set(1.0, 0.0, 0.0);
    vector tangent   = normalize(cross(up, N));
    vector bitangent = cross(N, tangent);

    vector sampleVec = tangent * H.x + bitangent * H.y + N * H.z;
    return normalize(sampleVec);
}





int n = 596;
for(int i=0;i<n;i++){
    int test = i;
    vector2 xy = HammersleyNoBitOps(test,n);
    vector testNormal = chv("normal");
    vector newpos = ImportanceSampleGGX(xy,testNormal, chf("roughtness"));
    addpoint(geoself(),newpos);
}
------------------------------------------------------------------------------------------
2 
float r = chf("radius");
float u = chf("u");
float v = chf("v");

//float phi_max = rand(@ptnum*4) * 1.0f * PI;
float phi_max = @ptnum*0.2 * 2.0f * PI;

float theta_min = rand(@ptnum*1000);
float theta_max = rand(@ptnum*500) * PI;


float phi =  u * phi_max;
float theta = theta_min + v*( theta_max - theta_min);

float x = r * sin(theta) * cos(phi);
float y = r * sin(theta) * sin(phi);
float z = r * cos(theta);


@P.x = x;
@P.y = y;
@P.z = z;
-------------------------------------------------------------------------------------------------
3
-------------------------------------------------------------------------------------------
float llerp(float a;float b;float f)
{
    return a + f * (b - a);
}

int nsamples = 1604;
for (int i = 0; i < nsamples; ++i)
{
    
        vector sample = set( rand(i)* 2.0 - 1.0,
        rand(i*51400) * 2.0 - 1.0, 
        rand(i*5024713));
    
    sample = normalize(sample);
    sample *= rand(i*50723);
    float scale = float(i) / float(nsamples); 
    scale = lerp(0.1f, 1.0f, scale * scale);
    sample *= scale;
    addpoint(geoself(),sample);
    
    
}




 

wave88.gif

FLowAdvect.jpg

Link to comment
Share on other sites

I'm putting this out here since this thread keeps going off topic :)

I managed to recreate the fine hair like tentacle details by dividing the simulation into much smaller segments, using much smaller noise scales in the pattern driving the attribute based emission of the flip fluid. With a bit of tweaking on the viscosity and the simple custom cooling wrangle(see my original file in this post), the smaller segments are able to consistently hold hair like details as the flip fluid breaks under the turbulent forces added to the solver. Next I implemented a simple looper for the simulated segment  by just cross fading the particles' alpha(or any arbitrary attribute that would eventually drive opacity in the shader). Replicate these around any shape(example below using a for loop, copy transform, and some iteration based instance randomization for time offset). The results below are rendered in Renderman. Obvisouly this is based on a single simulation run but much better results can be achieved by running and looping multiple independent simulation seeded differently. This is a perfect application for PDGs.

 

image.thumb.png.53b832c301cc347d4acab292841e04c0.pngI

'

ClusteredSim.mp4

Edited by IhabAli
  • Like 3
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...