Page 1 of 7

a nice cavern filled with lava

Posted: Wed Dec 31, 2014 5:51 pm
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

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 6:21 pm
by THOM
cool :o

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 6:46 pm
by cameronC
wow... That is beautiful.

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 6:47 pm
by JohnWordsworth
Oh my! That looks awesome!

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 7:05 pm
by Drakkan
awesome, I was just thinking how to make from fire_pit just lava "water" and here it is. cool, thanks !

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 7:10 pm
by Dr.Disaster
oooh now that's nice!

Hey where did my Ring on a String go :?: ;)

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 7:22 pm
by MrChoke
WOW, very nice!

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 7:49 pm
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.

Re: a nice cavern filled with lava

Posted: Wed Dec 31, 2014 8:55 pm
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!

Re: a nice cavern filled with lava

Posted: Thu Jan 01, 2015 2:17 am
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