Basic material effects for rendering

Basic material and techniques for rendering effects, which might be useful for individuals new to Urho3D.


recently added:

Let me know if I missed any files in my check-in. Thx.


screenshot with fire

1 Like

added lava

1 Like

That is great! Thank you very much for sharing this.

Glad you like it.

I’m learning as I go, as I never really delved into graphics or shaders. Most likely, I’ll consolidate some of the functionalities currently on the CPU to shaders.

Looks like MaterialEffects/Textures/checkers-lightmap.png is missing, which is used in MaterialEffects/Materials/sphLightMapMat.xml. There are checkers-lightmap001.png and checkers-lightmap002.png though.
And in MaterialEffects/Level1.xml, the material is redMat.xml, but the actual file name is RedMat.xml.

And some paths are hard coded, e.g., loading the Level1.xml.

I build and run it and the effects look amazing. :grin:

ok, thx fixed those isses - repo updated.
The absolute path is required when passing a File, thought. At least for me on Windows.

And lastly, fixed the UnlistAlphaMask shader to remove black edges.


These are awesome! Thanks for the share!

You’re welcome.

Added waterfall and waterdiff shader, you can add a diff material to it.


Looks like is missing

That’s part of Urho3D distribution and should be in the Data/Textures folder.

Can you give me some feedback on my new water shader? Thx.


These have all saved me a good chunk of time, thanks. The water shader is good. I think with ripples, waves, and foam I’d personally be set :grin:.

Edit: considering the style, even just foam would be enough to make it “polished” enough to use.

Thank you so much! This is what I missed. I wonder if it is possible to include these with Urho…

@suncaller good to hear.
@slapin you’re welcome, I doubt I’ll write scripts for the things that I do - it’s too much work but perhaps someone else can.
@yushli1 ok, changed the absolute path.

Update: completed the glsl/hlsl water shaders. There are two versions: 1) WaterDiff - reflective/refractive w/ bump and diff texture, 2) WaterDiffAlpha - same as 1 but w/ alpha.

Also added watersplash(ripple) when char is in run anim - edit:fixed.

Latest image of of the wave after groundwatermat updated.

Ok, last one. added a water mat waterGroundSandMat.xml with a new normal text. pic:

Nice! If you use sprite-sheets it might improve the performance a bit.

Great minds think alike :slight_smile:, as I was just looking into doing that. I haven’t used the packer tool yet, but just from looking at the code I might have to extend the options to make it easier load ~100 input files.

I took some time to rewrite the packer tool and was able to pack the explosion sequence images into a single file w/o any problems, see below. However, eventhough it’s just a straight copy, closer look of the result images show pixelation, see img 2.

This is not going to work.

Img 1

Img 2

Edit: discovered that saving the image as JPG w/ quality = 100 preserved the quality and results in no pixelation.

You can also using image magic for packing

Request: Is it possible to add example of leaving vehicle traces on road (when braking or sliding)?