Lightsource Origin/Particle Anchoring questions

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Lightsource Origin/Particle Anchoring questions

Post 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.
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: Lightsource Origin/Particle Anchoring questions

Post 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)
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: Lightsource Origin/Particle Anchoring questions

Post 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 :(
Bucnasti
Posts: 22
Joined: Mon Sep 24, 2012 12:41 am

Re: Lightsource Origin/Particle Anchoring questions

Post 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.
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: Lightsource Origin/Particle Anchoring questions

Post 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..
Image
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Lightsource Origin/Particle Anchoring questions

Post by Komag »

that's a "handy" little picture explanation! :lol: :oops: :roll:
Finished Dungeons - complete mods to play
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: Lightsource Origin/Particle Anchoring questions

Post 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:)

Image
Bucnasti
Posts: 22
Joined: Mon Sep 24, 2012 12:41 am

Re: Lightsource Origin/Particle Anchoring questions

Post 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.
User avatar
Pandafox
Posts: 268
Joined: Wed Apr 11, 2012 11:25 pm
Location: France
Contact:

Re: Lightsource Origin/Particle Anchoring questions

Post 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 ?
User avatar
LordYig
Posts: 175
Joined: Wed Jul 04, 2012 5:45 pm

Re: Lightsource Origin/Particle Anchoring questions

Post 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.
Post Reply