Graphic text

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Graphic text

Post by minmay »

I'll spade out all of the shaders one day. For now I think I've found all the useful params for sky and water, crystal, wall_fire, and additive.

"additive" is very simple, but it's a bit of a misnomer as it works with non-additive blend modes (though its usefulness with them varies). All it does is multiply the colours in the material by the "intensity" param. It's used for the "beacon_furnace_text" material in the standard assets, which is the glowing text that fades in (shader changes intensity) when you make an essence with power gems. If you place two beacon_furnaces beside each other and put four power gems on one, you'll find that the text fades in on both furnaces, because they use the same material and the game just internally changes the intensity param for beacon_furnace_text when an essence is being made. You can easily change the intensity param for your custom materials yourself with an onUpdate hook, of course.

"crystal" has shadeTex, crystalIntensity (multiplier for the light values), and shadeTexAngle (rotation of normals). Generally you want to vary shadeTexAngle with time like the standard materials do. It doesn't play nice with the "Translucent" blend mode but works well with the rest.

"wall_fire" gives the material a wavy effect based on the "time" parameter. It needs a displacementMap. You want to vary this parameter with an onUpdate hook like in the standard wall_fire material. If you want further examples of how it can be used, I used it for the fountain and puddle water materials in my Dungeon Master Resource conversion.

I still don't understand "edge_extrude", can't help you with that one.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Graphic text

Post by AdrTru »

Thank you for describtion, its very hepfully.

There ase some of my experience with shaders on texts.
SpoilerShow
Image
Image
Image
For correct using crystal shader is nessesery use 3d model ( smoothing, bumpmap or shape ).
If is used flat model, shader is near to without moving - but for all text is the same picture ( top of green sign )
if is used smooth cube model shader work good - rotate by center of each char. ( bottom of green sign )
if is used bump map, situation are very different, viz. gold and frozen rune.
All this shader effects are glowing in dark.

Another shaders arent suitible for me.

New version of this mod will be soon.

BTW: Is problem for system to have very much definitions for materials?
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Graphic text

Post by minmay »

It's not a problem to have a lot of material definitions. Only a single copy of a texture is loaded into RAM and video RAM, even if many materials use that texture.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Graphic text

Post by AdrTru »

My tests with shadered materials are bad, becouse this materials isnt transparent in low resolution. Emmision dont work in low resolution too.

New version of script-fu for generation grid of chars is in nexus.

todo ( if somebody want to ):
Call symbol by id in table by string eg. #21 for 21st char in picture.( for symbols out of ascii, or grafic symbols )
showing standard icons from icon atlas
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
Post Reply