Smoke Lighting and texture re-usability in Skull & Bones

Thanks to the author for the clear analysis. I have been struggling for a few days, but I did it!
I used URP 8.2.0, Shader Graph 8.3.1
To make it easier to refer to the light, I also used this plugin. In my case, it did not work on metal (ios, mac), you have to switch to OpenGL.

There may be bugs, but it seems to work correctly.

At first, I started with the easiest part - albedo, emission, and alpha.
Here I used different textures and the PBR master for the test, but further, I would use Unlit master.
Work in progress:

In the end, I got this consisting of two parts.
This is already an improved graph for ease of use in a particle system.

Whole graph:

First part (There is a mistake in note - custom1.xy( ):

Second part:

Custom Node ‘ComputeLightMap’:

Body of Custom Node:

float hMap = 0;
float vMap = 0;
float dMap = 0;
float lightMap = 0;

hMap = (LightDir.x > 0) ? (rawLightMap.x) : (rawLightMap.y);
vMap = (LightDir.y > 0) ? (rawLightMap.w) : (rawLightMap.z);
dMap = (LightDir.z > 0) ? (frontMap) : (backMap);

customlightMap = hMapLightDir.xLightDir.x + vMapLightDir.yLightDir.y + dMapLightDir.zLightDir.z;

This is how it works with custom data.


  1. Albedo can be set through texture, ‘Start color’, ‘Color over Lifetime’ or all together;
  2. EmissiveRamp.a can be set through texture or custom1.xy( or all together.

Now it remains to understand how to bake the same textures in other 3d programs. :sweat_smile:


Hey thank you a bunch for your shader graph… how could I integrate that to shuriken setup? Or better could you do a tutorial… I have the 6d lightmap in houdinin exported and my shader graph setup seems to work but how to integrate that to shuriken now ?

Thank you for your massive help!

You can integrate it in shuriken as usual)
Like in this tutorial
The main difference is using custom data. The purple color shows what must be necessarily and invariably. Highlighted in red what can be changed depending on what you want)
Custom Data 1 X is the same as Emission Power (property in shader graph).
Custom Data 1 Y (on my screenshot it’s Power) is an exponent.

More about custom data

I wish it was helpful. Feel free to question)

Hi, thanks a lot for the graph!
I guess it should work as well in HDRP?

I hope so! I just never worked for this pipeline :sweat_smile:

1 Like