River Of Flame

River Of Flame

All map release threads should be posted here

Moderator: Moderators

Post Reply
raaar
Metal Factions Developer
Posts: 808
Joined: 20 Feb 2010, 12:17

River Of Flame

Post by raaar » 06 Apr 2019, 21:14

River Of Flame!

(version v2)

In-game screenshot
Image


minimap
Image



A 14x12 map good for 1v1 to 4v4.

SPRINGFILES LINK

--- special rules

- units and features that fall to the lava are forced to float and burn for about 300 HP/s
(they can be rescued by air transports on various games)
- projectiles that fall to the lava are destroyed


--- credits

- uses ambient sound player made by Klon and The Yak (Audionautics, e__ - Lava SFX from freesound.org)
- uses map edge extension mask widget made by Pako
- rock meshes/skins based on the ones by LathanStanley from map "tangerine"
Attachments
minimap.png
minimap
(1.54 MiB) Not downloaded yet
screenshot_riverofflame-v2.png
in-game screenshot
(1.47 MiB) Not downloaded yet
Last edited by raaar on 18 Aug 2019, 18:19, edited 3 times in total.
3 x

raaar
Metal Factions Developer
Posts: 808
Joined: 20 Feb 2010, 12:17

Re: River Of Flame

Post by raaar » 07 Apr 2019, 16:14

2019/04/07 ------------------ NOTES v1.1 ----------------------

- fixed errors that show up when playing the burn sounds when units fall to lava
- made lava burn sounds quieter and fade with distance
- made the ambient lava sound quieter
0 x

raaar
Metal Factions Developer
Posts: 808
Joined: 20 Feb 2010, 12:17

Re: River Of Flame

Post by raaar » 14 Aug 2019, 16:22

2019/08/13 ------------------ NOTES v1.2 ----------------------

- added tall hills covering the geothermal spots on NW and SW
- improved textures, namely added dirt/ash layer over the bridges
- override the LOS brightness levels to make fog-of-war less dark
- don't run redundant map edge extension widget on Metal Factions or ZK
- modified the lava flow and reduced how much it extends beyond the playable map area (it wasn't visible anyway)
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10211
Joined: 24 Jan 2006, 21:12

Re: River Of Flame

Post by PicassoCT » 14 Aug 2019, 21:42

In layva_layer.lua replace this lines

Code: Select all

function gadget:DrawWorldPreUnit ()  
	-- lava planes

	drawPlane(":a:LuaRules\\Images\\lavacolor6.png",15,7,30,0.001,{1.0,1.0,1.0,1.0},"alpha") 
	drawPlane(":a:LuaRules\\Images\\lavacolor6.png",20,10.8,28,0.0021,{1.0,1.0,1.0,0.6},"alpha") 
	
	-- fog planes
	drawPlane(":a:LuaRules\\Images\\lavafog.png",23,1.9,13.9,0.0043,{1.0,1.0,1.0,0.30},"alpha_add" ) 
	drawPlane(":a:LuaRules\\Images\\lavafog.png",26,1.3,9.2,0.003,{1.0,1.0,0.1,0.25}, "add") 
end


function drawPlane (texture,y,scaleFactor,periodS,growFactor,rgba, mode)
	local t = spGetGameSeconds()
	
	gl.PushAttrib(GL.ALL_ATTRIB_BITS)
	gl.Blending( mode )--alpha_add
	gl.DepthTest(true)
	gl.DepthMask(true)	
	
	periodFactor = sin(2*pi*t/periodS)
	glowPeriodFactor = sin(2*pi*t/(periodS*1.3))
	scaleFactor = scaleFactor * (1+ periodFactor * growFactor)
	gl.Texture(0,texture)-- Texture file	
	gl.Texture(1,texture)-- Texture file	
	gl.Color(rgba[1]*(0.9+0.1*glowPeriodFactor),rgba[2]*(0.8+0.2*glowPeriodFactor),rgba[3]*(0.7+0.3*glowPeriodFactor),rgba[4]*(0.9+0.1*glowPeriodFactor))
	
	gl.BeginEnd(GL.QUADS,drawPlaneVertexes,y,scaleFactor,periodFactor)
	gl.Texture(false)
	gl.DepthMask(false)
	gl.DepthTest(false)	
	gl.PopAttrib()
	gl.Blending(false)
end
to get this:

Image

PS: You need a more lit lava texture for full effect
Attachments
screen00024.jpg
(361.04 KiB) Not downloaded yet
2 x

raaar
Metal Factions Developer
Posts: 808
Joined: 20 Feb 2010, 12:17

Re: River Of Flame

Post by raaar » 15 Aug 2019, 19:02

Thanks for the feedback. The lava is a bit dark indeed, although your example makes it too bright.

I could just increase the brightness of the textures involved, though.

I have an issue with textured translucent planes : they obscure the units and at least some CEG below instead of letting them show through (but not other planes or the ground itself), do you know of a way around that?

That would let me draw a set of faint texture planes to "fake" glow, fog etc. above the heights where units and projectiles interact.
0 x

raaar
Metal Factions Developer
Posts: 808
Joined: 20 Feb 2010, 12:17

Re: River Of Flame

Post by raaar » 18 Aug 2019, 18:17

2019/08/18 ------------------ NOTES v2 ----------------------

- made the lava much brighter and more intense
- modified the lava sound to be less cracky and bubbly and more rocky and fade out with distance



(Thanks to Picasso for the suggestion)
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10211
Joined: 24 Jan 2006, 21:12

Re: River Of Flame

Post by PicassoCT » 20 Aug 2019, 08:11

Im not done yet.. i have a diffrent problem entirely.

I applied the melty shadder to the map crucible using the map shadding framework.

http://goo.gl/WzQdeE

and this

Code: Select all

   fNormal = normalize(normalMatrix * normal);
produces totally diffrent result from this:

Code: Select all

fNormal = normalize(gl_NormalMatrix * gl_Normal.xyz);
in Spring. Any reason for your glsl-standard treason spring?
0 x

User avatar
ivand
Posts: 132
Joined: 27 Jun 2007, 17:05

Re: River Of Flame

Post by ivand » 20 Aug 2019, 19:43

You can post your widget/gadget and shader code, so it's easier to understand what you are trying to do
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10211
Joined: 24 Jan 2006, 21:12

Re: River Of Flame

Post by PicassoCT » 20 Aug 2019, 23:50

So the idea is basically to port the code in the shader snippet to spring for a map.
vertexsource:

Code: Select all


        uniform ivec2 texSquare;
        varying vec2 texCoors;

        varying vec4 colorChange;
		varying vec3 fNormal;
		
        uniform float time;
        uniform float points[30];
        uniform int pointSize;
		
		float totalTime= 1.0;
		float PI_HALF= 3.14159/2.0;
		float PI =3.14159;
		float changeRate = 0.0;


        void main(void) {		
				fNormal = normalize(gl_NormalMatrix  * gl_Normal.xyz);
						
				float sigNum = 1.0;
				float relTime = abs(mod(time/totalTime,totalTime));
			//	melting process - a inverse cosinus rising 
				float meltSpeed=abs(cos(relTime/(PI*2.0)));
				float molten = abs(1.0-cos((time/totalTime)*PI_HALF));
				
			//	percentage we scale the vector out or inwards
				float percentage= (sqrt(abs(gl_Normal.y)/(abs(gl_Normal.x)+abs(gl_Normal.z) +0.01)))/50.0; // /50
				
				
				sigNum=(fNormal.y <= 0.0)  ? -1.41  : 1.0;
			  
			 // computate the total melting and end it at max where the molten metall gets hadr
			 // keep Constant Change
			  //changeRate= relTime < 0.5*totalTime? mix(0.0,percentage*sigNum*molten,relTime/0.5*(totalTime)):percentage*sigNum*molten;
			  
				
				//move the position along the gl_Normal and transform it
				vec3 newPosition = gl_Vertex.xyz + fNormal * changeRate;
				gl_Position = gl_ModelViewProjectionMatrix * vec4( newPosition, 1.0  );
        }
		


fragmentsource:

Code: Select all

uniform float time;
varying vec3 fNormal;


vec3 hit= vec3(1.0,0.8,0.3 );
vec3 glowing= vec3(0.9,0.3,0.1);
vec3 cooldown= vec3(0.4,0.1,0.05);
vec3 wreck=vec3(0.185,0.155,0.155);


vec3 currColor;
float averageShadow;

float PI=3.14159;
float totalTime=6.0;
float percenTage=0.0;
vec3 emptyVec = vec3(0.0,0.0,0.0);

vec3 clampAfter(vec3 x, float Time, float TimeLimit)
{
    return (Time < TimeLimit ? x :emptyVec);
}

vec3 openEnded(vec3 x, float Time, float TimeLimit, vec3 deFault)
{
  return Time < TimeLimit ? x :deFault;
}


            void main(void) {
				 
					percenTage= (mod((time),totalTime))/totalTime*PI;


					averageShadow=(fNormal.x * fNormal.x + fNormal.y * fNormal.y + fNormal.z + fNormal.z)/3.25;

					currColor=(

					 (percenTage < 0.5 * PI ?  hit * cos(percenTage) * 2.0 :emptyVec)
					+ (percenTage < PI ? glowing * sin(percenTage) * 2.5 :emptyVec)
					+ (percenTage < PI * 2.0 ? cooldown*sin(PI + percenTage)*2.0 :emptyVec)
					+openEnded(wreck * abs(sin(PI+percenTage)),PI + percenTage,PI*2.0,abs(wreck*0.3))
					);

					  gl_FragColor = vec4(currColor*(1.0 - averageShadow), 1);

            }
            
What i want is for the whole map, to turn orange hot and then slowly cool back down- and repeat that in pulses..

Please click the link to see the shader snippet to get a idea where im headed..
http://goo.gl/WzQdeE
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10211
Joined: 24 Jan 2006, 21:12

Re: River Of Flame

Post by PicassoCT » 23 Aug 2019, 21:37

Image
Attachments
screen00026.jpg
(269.51 KiB) Not downloaded yet
1 x

raaar
Metal Factions Developer
Posts: 808
Joined: 20 Feb 2010, 12:17

Re: River Of Flame

Post by raaar » 23 Aug 2019, 22:54

looks nice!

- what's the impact on fps (how many you get with and without that effect enabled)
- what's the aspect of it over the normal map textures (not dark)
- is it hard to make it so the gadget can update the effect parameters (intensity, colors, altitude, etc.) dinamically
0 x

Post Reply

Return to “Map Releases”

cron