Burning paper - Sketch (research)

Hello there. A few days ago I started to research hot to burn pages.
I saw some nice video from Houdini and wasn’t able to stay against this wish :smiley:
I think it’s too complex to place it to sketchbook with short time spended stuff, so I created the new one for it.
So main Idea is:
-Fell free to place burning point center to any point of paper
-Spawn particles onnly from burning edge of any form
-Make multiplies points
bp1

19 Likes

Fell free to:
That was the simpliest thing.
I just convert position and scale of burning point to UV. But later it will be base on hitPoint to start burning.

Spawn paricles from burning edge:
That took 2 days…because I never touched visual graph before. But it is nice stuff.
So I made render texture from camera that look at same geometry but with simplified page shader.
That way I making mask for using it in visual graph.
Later I will calculete render texture via script to evade additional camera and mesh (and maybe even material) using.
I didn’t manage how to spawn particles from map, so I choosed a less optimized way - I just multiply particles lifetime via map. So if you know how to do it better - please, tell me.

bp2


Multiply burning points - not done yet.

For now I still improove visuals of paper. I need add more soft black adges close to durning edge etc.

3 Likes

I just done with positions.
It forced me to rebuild (rewrite in fact. via custom shader expression in Amplify) almost whole shader.
But I like the results. Now i can set maximum collisions counts and set burning points via particles.

bp3
bp4

Nex step: raise it’s points radiuses over lifetime.

3 Likes

Aaaaand done.
After all that was not the hard one part.

g1
g2

Time for flames and ashes.

9 Likes

I think I am done with it for now.
I am not clearly understand “maps” in VXF grapgh, but it’s a still big progress for me.
Pretty much (for me) coding was need.
But…If I would not want to spawn particles from the Emission edge - it would be much easier.

b2
b1

15 Likes

Wow, this is so cool, what an awesome final result, especially the one with the dropped sparks.

1 Like

Thank you!
Glad to hear it :blush:
In fact - collision with candle still made via particles too x)

This is great, I want to try this too even though I don’t understand your process very much

1 Like

In fact it’s still unclear for me too. I mean - I made it a little bit not as I want.
But most important is:

  • Using arrays for burning points (I am using 64 points pool, but script have count for iterations started with 0 and set +1 when value in array changes with new spark incoming and set it to the shader. So active count in “for” loop in shader is equals to active burning points. But still not larger than array length )

For Amplify it possible only with custom expressions I think.

  • Particles spawns via Visual Graph. I still didn’t clearly understand how to make it for 3D objects, so here I have 3D mesh emitter. Position of this particles, pawned from mesh, used for making something like UV.

    And then this UV using for map based on render texture (can be made just via script, without additional camera).
    image
    I still don’t understand how to spawn only from white, so I just multiply size and lifetime on it :sweat_smile:
    So flames, sparks and ash spawns only from white part of this “mask” (if you make it without script, and with additional camera - just place it on hided for main camera layer)

Something like that.

1 Like

I used Float4[] array.
3 for position and 4th for current radius of burning hole.

Amazing result! <3 So tempted to do a similar thing!

1 Like

what you did is great :>, can you elaborate on how you custom Expression in amplify shader

1 Like

I just construct graphs for single dot and then write the same to the “for” cycle.

Here my bushcraft:

ClipMask = 1;
Emission = 0;
BlendMask = 1;
float MaskBase=0;
AshMask = 1;
for (int i = 0;i<Count;i++)
{	
	float BlendMaskStep = 0;
	float EmissionStep=0;
	Length = 0;
	float1 Radius = HitPoints[i].w;
	Position = (VertexPos - HitPoints[i]);
	Length = sqrt(dot(Position,Position));

	BlendMaskStep = smoothstep(BlendNoise*Radius,Radius*2,Length);
	BlendMaskStep = smoothstep(.1f,.5f,BlendMaskStep);
	BlendMask*=BlendMaskStep;

	MaskBase = smoothstep(MaskNoise*Radius,Radius,Length);
	float MaskBaseE = smoothstep(EmissionNoise*Radius,Radius*1.2,Length);
	EmissionStep = smoothstep(MaskBaseE,2,1);
	EmissionStep*=.2;
	EmissionStep += step(0.9f,MaskBase)-step(.91f,MaskBase);
	ClipMask *= step(0.7f,MaskBase);

  	AshMask*= step(.9,MaskBase);
	AshMask*=AshMask;
	
	
	
	Emission+=EmissionStep;
	ClipMask*=ClipMask;
}
Emission = clamp(0,1,Emission);
Emission*=AshMask;
return 1;

image

1 Like

oh thank my bro :>>>

1 Like

you’re welcome, bro
In fact most important is you can use “for” loop here.
And I am controlling count from script. Because I am using static array with maximum burning points (like 64), and don’t want to calculate all 64 if paper burns with only 3 sparks. So count changes only when array element…let’s call it “active”.