View Issue Details

IDProjectCategoryView StatusLast Update
0004648The Dark ModCodingpublic21.08.2019 14:28
ReporterVanishedOne Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status newResolutionopen 
Product VersionTDM 2.05 
Summary0004648: Particle 'orbit' and 'drip' paths are supported internally, but have loading bugs
DescriptionThere are two particle paths that aren't supported by DR's particle editor but can be used via editParticles:

orbit - a rotating ring. Similar to a helix with radial speed, but the particles all move around the ring in the same direction.

drip - particles move downwards at regular intervals. I'm not sure what makes this distinctive. The first parameter seems to allow control of the height of the drip, and I haven't discovered what the second one is for.

Once saved, particles with these paths can't be loaded: the 'drip' and 'orbit' keywords saved by editParticles aren't recognised. In the case of orbit this can be fixed manually by editing the declaration to replace "orbit" with "spherical".

From a glance at DeclParticle.cpp I suspect that this code at line 307 explains this behaviour:

if ( !token.Icmp( "customPath" ) ) {
            src.ReadToken( &token );
            if ( !token.Icmp( "standard" ) ) {
                stage->customPathType = PPATH_STANDARD;
            } else if ( !token.Icmp( "helix" ) ) {
                stage->customPathType = PPATH_HELIX;
            } else if ( !token.Icmp( "flies" ) ) {
                stage->customPathType = PPATH_FLIES;
            } else if ( !token.Icmp( "spherical" ) ) {
                stage->customPathType = PPATH_ORBIT;
            } else {
                src.Error( "bad path type: %s\n", token.c_str() );
            }
Additional Informationconst ParticleParmDesc ParticleCustomDesc[] = {
    { "standard", 0, "Standard" },
    { "helix", 5, "sizeX Y Z radialSpeed axialSpeed" },
    { "flies", 3, "radialSpeed axialSpeed size" },
    { "orbit", 2, "radius speed"},
    { "drip", 2, "something something" }
};

'Spherical' is selectable in editParticles but broken; type in orbit instead.

I get the impression 'spherical' is something that used to exist, and the job of replacing it with 'orbit' was left unfinished.
TagsNo tags attached.

Activities

VanishedOne

VanishedOne

04.11.2017 21:23

developer  

orbit.jpg (320,249 bytes)
VanishedOne

VanishedOne

04.11.2017 21:23

developer  

drip.jpg (211,006 bytes)   
drip.jpg (211,006 bytes)   
VanishedOne

VanishedOne

21.08.2019 01:23

developer   ~0011823

Last edited: 21.08.2019 14:25

View 2 revisions

It looks as though the 'drip' path uses only one parameter, whatever the syntax might imply (the comment is the parameter list):

case PPATH_DRIP: { // ( speed )
                origin[0] = 0.0f;
                origin[1] = 0.0f;
                origin[2] = -( g->age * customPathParms[0] );
                break;
}

So I expect it got abandoned because you can do basic drips without a custom path. Maybe it was just intended to make them simpler to set up.

VanishedOne

VanishedOne

21.08.2019 14:23

developer   ~0011824

Conversely, according to the code comment 'orbit' was meant to take three parameters, not two, though I'm not sure the axis one is actually used here:

case PPATH_ORBIT: { // ( radius speed axis )
                angle1 = g->random.RandomFloat() * idMath::TWO_PI + customPathParms[1] * g->age;

                float s1, c1;
                idMath::SinCos16( angle1, s1, c1 );

                origin[0] = c1 * customPathParms[0];
                origin[1] = s1 * customPathParms[0];
                origin.ProjectSelfOntoSphere( customPathParms[0] );
                break;
}

Issue History

Date Modified Username Field Change
04.11.2017 21:23 VanishedOne New Issue
04.11.2017 21:23 VanishedOne File Added: orbit.jpg
04.11.2017 21:23 VanishedOne File Added: drip.jpg
21.08.2019 01:23 VanishedOne Note Added: 0011823
21.08.2019 14:23 VanishedOne Note Added: 0011824
21.08.2019 14:25 VanishedOne Note Edited: 0011823 View Revisions
21.08.2019 14:28 VanishedOne Additional Information Updated View Revisions