Board index Roller Coaster Games NoLimits Coaster 2 Waterfall scenery

Waterfall scenery

All discussion relation to NoLimits Coaster 2 should be posted here. Purchase NoLimits Coaster from this page: nolimits-coaster-2-purchase-and-upgrade-links-t32524.html

Post May 22nd, 2016, 4:23 am

Posts: 102
Points on hand: 1,124.00 Points
Location: the netherlands

Is there an way to make real animated waterfalls in nolimits 2. How can i make that? Someone idea's?

Post May 23rd, 2016, 11:56 am
herman116 User avatar
Premium Member
Premium Member

Posts: 636
Points on hand: 7,471.00 Points
Location: The Netherlands
I think that there are 4 ways to create a waterfall:

  1. Create a cilinder object with a waterfall texture attached to it. Let the cilinder rotate so that it looks like the water fall is in motion. This isn't a very realistic waterfall but it's a pretty easy option.
  2. Create a square which has the size of the waterfall. Change the texture every few milliseconds so you actually have an animation of a waterfall on a big square. There is a standard method in the scripting language which can change the texture in the next texture: "setTextureAnimationIndex(int n)". With this, you could create a very realistic waterfall but the downside is that you'll have to make or find a lot of images for a continuous waterfall animation. I also don't know if there is a limitation to the amount of frames that you can use in the animation and how big the file size of the textures will be.
  3. Some coasters have a splash effect. Maybe it's possible to use this splash as a waterfall by creating an invisible coaster with a splash and a lot of trains (with a track that goes back and forth a lot of times). I have no idea if this will work and if it will look realistic.
  4. Try to look how you can recreate the splash with the standard particle script and then edit it to your preferences. I don't know how realistic the waterfall will be if you would be using this method but I think it would require a lot of programming knowledge.

Post May 23rd, 2016, 12:42 pm

Posts: 8144
Points on hand: 13,491.00 Points
^ I think that he will be pleased with those multiple choices! :D
-- I was happy to be with NL1 - [:')] --

Post June 13th, 2016, 6:01 pm

Posts: 242
Points on hand: 493.00 Points
Bank: 2,138.00 Points
Location: France
Theres a easier way to do it with the particle effect, you just have to use the Fog Machine as sample
you can see it in my video at 0:43:


this is how particle system looks:
package particleengine;

import nlvm.lang.*;
import nlvm.math3d.*;

public class ParticleEmitter extends PhysicalObject
{
    private ParticleList _ParticlePool;
    private ParticleList _ParticleList;
    private ParticleManager _Manager;
    private float _sumTimeSteps;

    public Vector3f EmitterDirection;
    public Vector3f ParticleGravity = new Vector3f();
    public float ParticleAirResistance = 0;
    public float ParticlesPerSecond = 1;
    public float ParticleInitialVelocity;
    public float ParticleTimeToLive = 2;
    public float ParticleMass = 1;
    public float ParticleRotationSpeed = 0;
    public bool  ParticleRotationRandomStartAngle = false;
    public bool  ParticleRotationRandomDirection = false;
    public float ParticleStartScale = 1;
    public float ParticleEndScale = 1;
    public float ParticlePositionJitterX = 0;
    public float ParticlePositionJitterY = 0;
    public float ParticlePositionJitterZ = 0;
   
    // Alpha Controls
    public float FadeInDuration = 0;
    public float FadeOutDuration = 0;
    public float Opacity = 1;

    public bool Enabled = false;
   
    // Create a new particle emitter.
    public ParticleEmitter(ParticleManager manager, ParticleList pool)
    {
        _Manager = manager;
        _ParticlePool = pool;
        _ParticleList = new ParticleList();
       
        EmitterDirection = new Vector3f();
    }
   
    public void SetEmitterDirection(float x, float y, float z)
    {
        EmitterDirection.x = x;
        EmitterDirection.y = y;
        EmitterDirection.z = z;
    }

    // Take a free particle from the pool and fire it out the emitter.
    public void GenerateParticle()
    {
        if (_ParticlePool.IsEmpty())
        {
            return;
        }

        // get the first particle from the pool and attach it to the emitter's list
        Particle particle = _ParticlePool.First();
        _ParticleList.InsertFront(particle);
       
        // make sure emitter direction vector is normalized, or else initial velocity will be wrong
        float L = (float)Math.sqrt(EmitterDirection.x*EmitterDirection.x + EmitterDirection.y*EmitterDirection.y + EmitterDirection.z*EmitterDirection.z);
        EmitterDirection.x /= L;
        EmitterDirection.y /= L;
        EmitterDirection.z /= L;
       
        // set particle parameters
        particle.EffectTime = 0;       
        particle.Gravity = ParticleGravity;
        particle.AirResistance = ParticleAirResistance;
        particle.TimeToLive = ParticleTimeToLive;
        particle.Mass = ParticleMass;
        particle.Velocity.x = EmitterDirection.x * ParticleInitialVelocity;
        particle.Velocity.y = EmitterDirection.y * ParticleInitialVelocity;
        particle.Velocity.z = EmitterDirection.z * ParticleInitialVelocity;
        particle.Position.x = Position.x;
        particle.Position.y = Position.y;
        particle.Position.z = Position.z;
        particle.FadeInDuration = FadeInDuration;
        particle.FadeOutDuration = FadeOutDuration;
        particle.Opacity = Opacity;
        particle.StartScale = ParticleStartScale;
        particle.EndScale = ParticleEndScale;
        particle.PositionJitterX = (float)Math.random() * ParticlePositionJitterX;
        particle.PositionJitterY = (float)Math.random() * ParticlePositionJitterY;
        particle.PositionJitterZ = (float)Math.random() * ParticlePositionJitterZ;
       
        if (ParticleRotationRandomStartAngle)
        {
          particle.RandomStartAngle = (float)(2 * Math.PI * Math.random());
        }
        else
        {
          particle.RandomStartAngle = 0;
        }
       
        if (ParticleRotationRandomDirection)
        {
          particle.RotationSpeed = Math.random() > 0.5 ? ParticleRotationSpeed : -ParticleRotationSpeed;
        }
        else
        {
          particle.RotationSpeed = ParticleRotationSpeed;
        }
       
        particle.SetVisible(true);
    }
   
    public void Update(float timeStep)
    {
        super.Update(timeStep);

        if (Enabled)
        {
            if (ParticlesPerSecond > 0)
            {
                _sumTimeSteps += timeStep;
                float timeBetweenParticles = (ParticlesPerSecond > 1000) ? 0.001f : (1.0f / ParticlesPerSecond);
                while (_sumTimeSteps > timeBetweenParticles)
                {
                    GenerateParticle();
                    _sumTimeSteps -= timeBetweenParticles;
                }
            }
        }

        // update all particles owned by the emitter
        Particle particle = _ParticleList.First();
        while(particle != null)
        {
            Particle nextParticle = particle.Next;
            particle.Update(timeStep);
            particle = nextParticle;
        }
    }
}



Here are the mains option you can edit to change the effect:
public Vector3f EmitterDirection;
    public Vector3f ParticleGravity = new Vector3f();
    public float ParticleAirResistance = 0;
    public float ParticlesPerSecond = 1;
    public float ParticleInitialVelocity;
    public float ParticleTimeToLive = 2;
    public float ParticleMass = 1;
    public float ParticleRotationSpeed = 0;
    public bool  ParticleRotationRandomStartAngle = false;
    public bool  ParticleRotationRandomDirection = false;
    public float ParticleStartScale = 1;
    public float ParticleEndScale = 1;
    public float ParticlePositionJitterX = 0;
    public float ParticlePositionJitterY = 0;
    public float ParticlePositionJitterZ = 0;


Return to NoLimits Coaster 2

 


  • Related topics
    Replies
    Views
    Last post