Useful particle effects!

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: Useful particle effects!

Post by HaunterV »

J. Trudel wrote:Here is one very usefull for when you want to spawn a cave_in and hide it a bit : (sorry I don,t have an image yet)

material
SpoilerShow
defineParticleSystem{
name = "dust",
emitters = {


-- dust
{
emissionRate = 55,
emissionTime = 5,
maxParticles = 100,
boxMin = {-2, 0.1, -2},
boxMax = { 2, 1.4, 2},
sprayAngle = {0,45},
velocity = {0,0},
texture = "assets/textures/particles/fog.tga",
lifetime = {10,20},
color0 = {0.25, 0.2, 0.13},
opacity = 0.6,
fadeIn = 0.5,
fadeOut = 7,
size = {1, 5},
gravity = {0,-0.1,0},
airResistance = 0.1,
rotationSpeed = 0.3,
blendMode = "Translucent",
objectSpace = false,
},
{
emissionRate = 45,
emissionTime = 10,
maxParticles = 100,
boxMin = {-2, 0,1,-2},
boxMax = { 2, 3, 2},
sprayAngle = {30,30},
velocity = {0,0},
texture = "assets/textures/particles/fog.tga",
lifetime = {10,20},
color0 = {0.25, 0.2, 0.13},
opacity = 0.6,
fadeIn = 0.3,
fadeOut = 2,
size = {0.1, 0.2},
gravity = {0,-0.75,0},
airResistance = 0.1,
rotationSpeed = 0.3,
blendMode = "Translucent",
}
}
}
object
SpoilerShow
defineObject{
name = "dust_emitter",
class = "LightSource",
lightPosition = vec(1.2, 0.2, 0),
lightRange = 6,
lightColor = vec(1, 1, 1),
brightness = 0,
castShadow = true,
particleSystem = "dust",
placement = "floor",
editorIcon = 88,
}

so I am using that with my stone ogre statue becomes a living stone ogre and i gotta say it's friggn PERFECT
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
User avatar
J. Trudel
Posts: 117
Joined: Tue Aug 28, 2012 3:05 pm
Location: Montreal, Canada

Re: Useful particle effects!

Post by J. Trudel »

HaunterV wrote:
J. Trudel wrote:Here is one very usefull for when you want to spawn a cave_in and hide it a bit : (sorry I don,t have an image yet)

material
SpoilerShow
defineParticleSystem{
name = "dust",
emitters = {


-- dust
{
emissionRate = 55,
emissionTime = 5,
maxParticles = 100,
boxMin = {-2, 0.1, -2},
boxMax = { 2, 1.4, 2},
sprayAngle = {0,45},
velocity = {0,0},
texture = "assets/textures/particles/fog.tga",
lifetime = {10,20},
color0 = {0.25, 0.2, 0.13},
opacity = 0.6,
fadeIn = 0.5,
fadeOut = 7,
size = {1, 5},
gravity = {0,-0.1,0},
airResistance = 0.1,
rotationSpeed = 0.3,
blendMode = "Translucent",
objectSpace = false,
},
{
emissionRate = 45,
emissionTime = 10,
maxParticles = 100,
boxMin = {-2, 0,1,-2},
boxMax = { 2, 3, 2},
sprayAngle = {30,30},
velocity = {0,0},
texture = "assets/textures/particles/fog.tga",
lifetime = {10,20},
color0 = {0.25, 0.2, 0.13},
opacity = 0.6,
fadeIn = 0.3,
fadeOut = 2,
size = {0.1, 0.2},
gravity = {0,-0.75,0},
airResistance = 0.1,
rotationSpeed = 0.3,
blendMode = "Translucent",
}
}
}
object
SpoilerShow
defineObject{
name = "dust_emitter",
class = "LightSource",
lightPosition = vec(1.2, 0.2, 0),
lightRange = 6,
lightColor = vec(1, 1, 1),
brightness = 0,
castShadow = true,
particleSystem = "dust",
placement = "floor",
editorIcon = 88,
}

so I am using that with my stone ogre statue becomes a living stone ogre and i gotta say it's friggn PERFECT
I am glad someone actually used it :) I am trying to see what can be done with this particle system apparently it's a lot flexible yet a bit hard to understand... at least for me.
The Lurker
User avatar
J. Trudel
Posts: 117
Joined: Tue Aug 28, 2012 3:05 pm
Location: Montreal, Canada

Re: Useful particle effects!

Post by J. Trudel »

Fire ! It fit in a square.

Material
SpoilerShow
defineParticleSystem{
name = "fire",
emitters = {
-- smoke
{
emissionRate = 60,
emissionTime = 0,
maxParticles = 500,
boxMin = {-3, 0.1, -1.5},
boxMax = {0, 2, 1.5},
sprayAngle = {0,30},
velocity = {0.1,0.5},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {1,1.75},
color0 = {0.15, 0.15, 0.15},
opacity = 0.6,
fadeIn = 0.5,
fadeOut = 0.5,
size = {1, 1.5},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.6,
blendMode = "Translucent",
},

-- flames
{
emissionRate = 600,
emissionTime = 0,
maxParticles = 3000,
boxMin = {-3, -.2, -1.5},
boxMax = {0, 0, 1.5},
sprayAngle = {0,10},
velocity = {0.2, 1},
texture = "assets/textures/particles/torch_flame.tga",
frameRate = 35,
frameSize = 64,
frameCount = 16,
lifetime = {0.25, 0.85},
colorAnimation = true,
color0 = {2, 2, 2},
color1 = {1.0, 1.0, 1.0},
color2 = {1.0, 0.5, 0.25},
color3 = {1.0, 0.3, 0.1},
opacity = 1,
fadeIn = 0.15,
fadeOut = 0.3,
size = {0.15, 1},
gravity = {0,-0.1,0},
airResistance = 1.0,
rotationSpeed = 0.6,
blendMode = "Additive",
depthBias = -0.002,
},

}
}

Objet
SpoilerShow
defineObject{
name = "fire_emitter",
class = "LightSource",
lightPosition = vec(1.2, 0.2, 0),
lightRange = 6,
lightColor = vec(1, 1, 1),
brightness = 0,
castShadow = true,
particleSystem = "fire",
placement = "floor",
editorIcon = 88,
}
The Lurker
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Useful particle effects!

Post by Neikun »

You should add brightness so it produces light as well.
Like this: (Also changes the light to a more orangey one.

Code: Select all

defineObject{
name = "fire_emitter",
class = "LightSource",
lightPosition = vec(1.2, 0.2, 0),
lightRange = 6,
lightColor = vec(2.8, 1.4, 1),
brightness = 20,
castShadow = true,
particleSystem = "fire",
placement = "floor",
editorIcon = 88,
}
It's also missing sound.
...Not sure how to handle that one.
Also it should probably be noted that you shouldn't place several of these effects near one another. They have quite the performance draw.
Hell, even having too many lamps on a level causes lag.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: Useful particle effects!

Post by HaunterV »

Neikun wrote:You should add brightness so it produces light as well.
Like this: (Also changes the light to a more orangey one.

Code: Select all

defineObject{
name = "fire_emitter",
class = "LightSource",
lightPosition = vec(1.2, 0.2, 0),
lightRange = 6,
lightColor = vec(2.8, 1.4, 1),
brightness = 20,
castShadow = true,
particleSystem = "fire",
placement = "floor",
editorIcon = 88,
}
It's also missing sound.
...Not sure how to handle that one.
Also it should probably be noted that you shouldn't place several of these effects near one another. They have quite the performance draw.
Hell, even having too many lamps on a level causes lag.
I would say 3-5 torch burning effects that start at offset intervals.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
remilafo
Posts: 23
Joined: Wed Mar 20, 2013 3:36 am

Re: Useful particle effects!

Post by remilafo »

Hello guys..

First post here..

Im playing the particle system but it got too big... it's bleeding into other rooms..

In my Materials.lua or whatever.. where do i define the size of the particle effect?

in a 2D x, y co-ordinate system?

Remilafo
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: Useful particle effects!

Post by Diarmuid »

It's boxMin and boxMan parameters, they are in grimrock units (meters). 1 tile is 3 meters wide/tall. Order of parameters is: width, height, depth. So a particle system with boxMin (-1.5, 0, -1.5) and boxMax (1.5, 3, 1.5) will be exactly a cube of one square wide and tall, from the center of the tile on the floor.
remilafo
Posts: 23
Joined: Wed Mar 20, 2013 3:36 am

Re: Useful particle effects!

Post by remilafo »

Diarmuid wrote:It's boxMin and boxMan parameters, they are in grimrock units (meters). 1 tile is 3 meters wide/tall. Order of parameters is: width, height, depth. So a particle system with boxMin (-1.5, 0, -1.5) and boxMax (1.5, 3, 1.5) will be exactly a cube of one square wide and tall, from the center of the tile on the floor.
Ahh i see... thanks.. this makes sense... the whole min and max thing confused me.

lol.. my min and max are like +/-12 values..

so... just to summarize..checking my understanding..

boxmin (-4.5, 0, -4.5) and boxMax (4.5, 3, 4.5) = 3 x 3 Grid with a height of 1.
boxmin (-7.5, 0, -7.5) and boxMax (7.5, 3, 7.5) = 5 x 5 grid...
boxmin (-1.5, 0, -4.5) and boxMax (1.5, 3, 4.5) = 1 x 3 vertical grid..

yeah?
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: Useful particle effects!

Post by Diarmuid »

Exactly.
Gradunk
Posts: 54
Joined: Tue Oct 22, 2013 2:26 am
Location: Calgary, Canada

Re: Useful particle effects!

Post by Gradunk »

To start off, here's the fog particle effect I stole from Rotten Place (...speaking of effort...) and then edited to be the thick thing it is right now:

materials.lua
Wolfrug you say this but does that mean i post that piece of script IN the materials thing? cause i can't open it so i'm not sure what to do.
Post Reply