a nice cavern filled with lava

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!
Post Reply
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

a nice cavern filled with lava

Post by bongobeat »

all is in the title:

1°)place a mine chasm on the floor
2°)then the fire_emitter over the chasm.
note: to save ressources you can turn off the "castShadow = true" to false.

fire_emitter:
SpoilerShow

Code: Select all

-- fire on floor
defineObject{
name = "fire_emitter",
	components = {
		{
			class = "Model",
			model = "assets/models/effects/wall_fire.fbx",
			sortOffset = 1,
		},
		{
			class = "Light",
			offset = vec(0, 0.2, 0),
			range = 6,
			color = vec(2.8, 1.2, 0.7),
			brightness = 2,
			castShadow = true,
			shadowMapSize = 64,
			staticShadows = true,
			staticShadowDistance = 0,	-- use static shadows always
		},
		{
			class = "Particle",
			particleSystem = "dungeon_fire_pit_2",
			offset = vec(0, 0, 0),
		},
		{
			class = "Controller",
			onActivate = function(self)
				self.go.light:enable()
				self.go.pointlight:enable()
				self.go.particle:enable()
			end,
			onDeactivate = function(self)
				self.go.light:disable()
				self.go.pointlight:disable()
				self.go.particle:disable()
			end,
			onToggle = function(self)
				if self.go.light:isEnabled() then
					self.go.light:disable()
					self.go.pointlight:disable()
					self.go.particle:disable()
				else
					self.go.light:enable()
					self.go.pointlight:enable()
					self.go.particle:enable()
				end
			end,
		},
	},
	placement = "floor",
	editorIcon = 88,
}
the particle:
SpoilerShow

Code: Select all

defineParticleSystem{
	name = "dungeon_fire_pit_2",
	emitters = {
		
		-- fog 1
		{
			emissionRate = 50,
			emissionTime = 0,
			maxParticles = 500,
			boxMin = {-1.3, 0,-1.3},
			boxMax = { 1.3, 0.5, 1.3},
			sprayAngle = {0,360},
			velocity = {0.1,0.2},
			objectSpace = true,
			texture = "assets/textures/particles/fog.tga",
			lifetime = {3,3},
			color0 = {1.25,0.4,0.2},
			opacity = 0.5,
			fadeIn = 2.2,
			fadeOut = 2.2,
			size = {0.75, 1.5},
			gravity = {0,0.1,0},
			airResistance = 0.5,
			rotationSpeed = 0.3,
			blendMode = "Additive",
		},
		
		-- fog 2
		{
			emissionRate = 50,
			emissionTime = 0,
			maxParticles = 500,
			boxMin = {-1.3, 0,-1.3},
			boxMax = { 1.3, 0.5, 1.3},
			sprayAngle = {0,360},
			velocity = {0.1,0.2},
			objectSpace = true,
			texture = "assets/textures/particles/fog.tga",
			lifetime = {3,3},
			color0 = {1.25,0.4,0.2},
			opacity = 0.5,
			fadeIn = 2.2,
			fadeOut = 2.2,
			size = {0.75, 1.5},
			gravity = {0,0.1,0},
			airResistance = 0.5,
			rotationSpeed = -0.3,
			blendMode = "Additive",
		},

		-- stars
		{
			emissionRate = 400,
			emissionTime = 0,
			maxParticles = 3000,
			boxMin = {-1.3, 0.0,-1.3},
			boxMax = { 1.3, 0.5, 1.3},
			sprayAngle = {0,360},
			velocity = {0,0},
			objectSpace = true,
			texture = "assets/textures/particles/firefly_dif.tga",
			lifetime = {0.5,3},
			color0 = {4, 0.4, 0.2},
			opacity = 1,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {0.05, 0.1},
			gravity = {0,0.5,0},
			airResistance = 0.1,
			rotationSpeed = 5,
			blendMode = "Additive",
		},

		-- smoke
		{
			emissionRate = 5,
			emissionTime = 0,
			maxParticles = 50,
			boxMin = {-1.3, 0, -1.3},
			boxMax = { 1.3, 1.0, 1.3},
			sprayAngle = {0,20},
			velocity = {0.4, 0.8},
			texture = "assets/textures/particles/smoke_01.tga",
			lifetime = {1,3},
			color0 = {0.25, 0.20, 0.17},
			opacity = 0.5,
			fadeIn = 0.3,
			fadeOut = 0.9,
			size = {1.5, 2},
			gravity = {0,0.3,0},
			airResistance = 0.1,
			rotationSpeed = 0.5,
			blendMode = "Translucent",
		},
	}
}
what it looks like:
SpoilerShow
Image
Last edited by bongobeat on Mon Dec 26, 2022 10:59 am, edited 1 time in total.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: a nice cavern filled with lava

Post by THOM »

cool :o
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: a nice cavern filled with lava

Post by cameronC »

wow... That is beautiful.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: a nice cavern filled with lava

Post by JohnWordsworth »

Oh my! That looks awesome!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: a nice cavern filled with lava

Post by Drakkan »

awesome, I was just thinking how to make from fire_pit just lava "water" and here it is. cool, thanks !
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: a nice cavern filled with lava

Post by Dr.Disaster »

oooh now that's nice!

Hey where did my Ring on a String go :?: ;)
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: a nice cavern filled with lava

Post by MrChoke »

WOW, very nice!
User avatar
Soaponarope
Posts: 180
Joined: Thu Oct 04, 2012 3:21 am

Re: a nice cavern filled with lava

Post by Soaponarope »

Very nice. I was attempting a lava effect over a water surface but it completely destroyed framerate. I'm eager to see how this runs, it looks great.
User avatar
Mal85
Posts: 103
Joined: Fri Nov 16, 2012 10:56 am

Re: a nice cavern filled with lava

Post by Mal85 »

This looks really cool! I was just ganna try using fire_wave, but I can only imagine the frames getting butchered by that method. I will have to give this a shot and see how it works for me. Thanks!
Daveyx0
Posts: 11
Joined: Sat Nov 01, 2014 10:46 am
Location: Netherlands

Re: a nice cavern filled with lava

Post by Daveyx0 »

Really nice! I was wondering what would be the best way. Now just add an invisible platform and make the golem walk over it >:D
Post Reply