Page 1 of 1
Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 1:46 am
by SpacialKatana
1) Does anyone have experience with where a tile's lightsource origin is set vec(0,0,0)? Is it centre floor, centre ceiling etc
2) When attaching a particle effect to a lightsource, rotating it north/south/east/west facing in the editor( the green triangle tool), has no effect on where the particle is....how's it anchored? ie a burning flame on a corner of a floor tile won't rotate in 90 degree increments.
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 2:20 am
by Grimwold
SpacialKatana wrote:1) Does anyone have experience with where a tile's lightsource origin is set vec(0,0,0)? Is it centre floor, centre ceiling etc
0,0,0 is indeed the centre floor of the tile and as I understand it tiles are 3x3x3 in size.
As an example from the asset pack, "temple ceiling lamps" light source is at (0,3,0)
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 2:28 am
by SpacialKatana
Yeah that makes sense to me Grimwold, now I just need to be able to fix the particle effect so it rotates in increments (like statues/torches etc) tried last night to fiddle but nature beat me in the end...and I'm kinda losing interest atm while the games's broke
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 9:57 am
by Bucnasti
Actually I think that 0,0,0 is the very center of the cube horizontally and vertically. When working with particle effects to create a low mist near the floor I had to set the minimum and maximum Y values to negative numbers.
The temple ceiling lamps are recessed into the ceiling hence their Y value of 3 placing them 4.5m off the ground.
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 11:20 am
by Grimwold
Bucnasti wrote:Actually I think that 0,0,0 is the very center of the cube horizontally and vertically. When working with particle effects to create a low mist near the floor I had to set the minimum and maximum Y values to negative numbers.
The temple ceiling lamps are recessed into the ceiling hence their Y value of 3 placing them 4.5m off the ground.
Prison ceiling lamps are at 4.5, whereas Temple ones are at 3 according to the definitions in the asset pack.
Also, not sure if you already know this but, the vector co-ordinates system used is left handed with y pointing vertically..
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 12:06 pm
by Komag
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 7:04 pm
by SpacialKatana
I realised when adding a particle effect to a lightsource, that the coord vector of the particle effect translates from the position of the light object. All sorted now, thanks for your help Grimwold. I have sorted what I set out to do:)
Re: Lightsource Origin/Particle Anchoring questions
Posted: Mon Oct 01, 2012 9:44 pm
by Bucnasti
Perhaps the origin point is different for objects and particles then because particle effects are clearly centered vertically in the square.
Code: Select all
defineParticleSystem{
name = "poison_cloud",
emitters = {
-- blast
{
spawnBurst = true,
maxParticles = 15,
boxMin = {-0.5, -0.4,-0.5},
boxMax = { 0.5, 0.2, 0.5},
if the vertical origin was on the floor then gas particles would be spawning below it.
Re: Lightsource Origin/Particle Anchoring questions
Posted: Wed Dec 19, 2012 8:24 am
by Pandafox
I tried to make a special particle with no rotation at all but I can't find how to do.
When particle appears, it always apply some random rotation. Did I miss something ?
Re: Lightsource Origin/Particle Anchoring questions
Posted: Wed Dec 19, 2012 3:40 pm
by LordYig
Pandafox wrote:I tried to make a special particle with no rotation at all but I can't find how to do.
When particle appears, it always apply some random rotation. Did I miss something ?
I don't think you have done anything wrong.
As far as I have tested this, the behavior you observe is correct.
It seems that the particle always have a random rotation when spawned, even when you specifically indicate 0 for the rotation parameter.
With the fact that the particles are always facing the camera that two limits I know of for the current particle system. For example we can't apply animated particle texture to an horizontal plane since the particle will be drawn vertically.
I do not know if this can be upgraded or changed by the devs easily, but it could be nice to have a more advanced system where there is no rotation in the texture when you do not want it and where you can apply the particle effect on a surface not aligned with the camera facing.