Page 3 of 3

Re: [Source] Flooded Dungeon

Posted: Mon Nov 26, 2012 11:20 pm
by SpiderFighter
That screen of the glistening bricks is money. Great work, as usual, Skuggas. I've already implemented your broken wall (not the hard version) in my mod in a few spots. :D

Thanks for sharing this.

Re: [Source] Flooded Dungeon

Posted: Mon Jan 13, 2014 8:21 am
by chaoscommencer
Great stuff Skuggas! This looks amazing, and would definitely be useful for the guys trying to recreate Stonekeep, as well as for other mods. I tested it out myself, but I got a little bit of a visual glitch, and I'm wondering if you have the same thing or maybe have found a solution for it... The particles from the sx_flooded (only the sx_flooded, not the ..._waterfall nor the ..._spray) bleed out through the walls and into other rooms, so it kind of looks like fairy dust floating through the rooms or something. I was able to narrow it down to that by first removing the instances of the waterfall and spray and testing, and then testing with only the waterfall and spray. It could just be unique to this laptop too, idk. If you get a chance to look into it that would be cool; otherwise it still looks great!

Edit: could also be engine-related and sadly unavoidable, I don't know...

Re: [Source] Flooded Dungeon

Posted: Tue Jan 14, 2014 5:36 pm
by Skuggasveinn
chaoscommencer wrote:.. but I got a little bit of a visual glitch, and I'm wondering if you have the same thing or maybe have found a solution for it... The particles from the sx_flooded (only the sx_flooded, not the ..._waterfall nor the ..._spray) bleed out through the walls and into other rooms,
You need to redefine the particles for your needs.
sx_flooded simple spawns a heap of particles and moves them along the water, if they are bleeding into other rooms reduce the lifetime in the lua script so that it gets killed before that happens.

Re: [Source] Flooded Dungeon

Posted: Wed Jan 15, 2014 4:16 am
by chaoscommencer
Your last post got me to look at the different particle settings being used (so much to tweak, just like in Qt's and most other particle systems I guess). There were quite a few things that needed to be changed I think. Ultimately I got my example boiled down pretty well. It will still bleed into the neighboring tile it is facing, but if you change the facing of all the tiles to the east for a more appropriate unidirectional flow the bleeding one tile into the far wall won't get noticed anyways. Also, I got multiple particle effects going with the same object; I know someone else was having difficulties with this earlier... It was actually pretty easy: the emitters property is a table and can therefore have many particle effects, each separated by a comma like the following: { {...}, {...}, {...},... }. Anyways, I touched up the effect parameters and added a couple others for splashing against the wall columns.

Code: Select all

defineParticleSystem {
    name = "waterflow",
    emitters = {
        { --river flow
            emissionRate = 400,
            emissionTime = 0,
            spawnBurst = false,
            maxParticles = 450,
            boxMin = {-1.3,0,-1.3},
            boxMax = {1.3,0.0975,1.3},
            objectSpace = true,
            sprayAngle = {-30,30},
            velocity = {0,0},
            texture = "assets/textures/particles/glitter_silver.tga",
            lifetime = {3, 10},
            colorAnimation = false,
            color0 = {0.70, 0.70, 0.85},
            opacity = 0.7,
            fadeIn = 0.4,
            fadeOut = 2.5,
            size = {0.0325, 0.075},
            gravity = {0,-0.2,2},
            airResistance = 1,
            rotationSpeed = 8,
            blendMode = "Additive",
        },
        { --wallspray to right of facing
            emissionRate = 200,
            emissionTime = 0,
            spawnBurst = false,
            maxParticles = 275,
            boxMin = {1.25, 0.0675, 1.08},
            boxMax = {1.35, 0.0975, 1.24},
            objectSpace = true,
            sprayAngle = {15, 90},
            velocity = {0.3,3},
            texture = "assets/textures/particles/glitter_silver.tga",
            lifetime = {0.13, 0.25},
            colorAnimation = false,
            color0 = {1, 1, 1},
            opacity = 1,
            fadeIn = 0,
            fadeOut = 0,
            size = {0.075, 0.125},
            gravity = {0, 0, 0},
            airResistance = 1,
            rotationSpeed = 8,
            blendMode = "Additive",
        },
        { --wallspray to left of facing
            emissionRate = 200,
            emissionTime = 0,
            spawnBurst = false,
            maxParticles = 275,
            boxMin = {-1.35, 0.0675, 1.08},
            boxMax = {-1.25, 0.0975, 1.24},
            objectSpace = true,
            sprayAngle = {15, 90},
            velocity = {0.3,3},
            texture = "assets/textures/particles/glitter_silver.tga",
            lifetime = {0.13, 0.25},
            colorAnimation = false,
            color0 = {1, 1, 1},
            opacity = 1,
            fadeIn = 0,
            fadeOut = 0,
            size = {0.075, 0.125},
            gravity = {0, 0, 0},
            airResistance = 1,
            rotationSpeed = 8,
            blendMode = "Additive",
        }
    }
}
Hopefully this helps someone :)

Edit: Actually, I found this particle system kind of limiting; I couldn't find a way to initialize the axis the particles are emitted from, and I couldn't find a way to change the theta angle (they only seem to have sprayAngle/phi). Do you perhaps know about how to alter those properties Skuggasveinn?

Thanks!