Page 2 of 2

Interpolation mode overview

Posted: Wed Jul 01, 2015 5:04 pm
by Foaly
I've created a graphic which could be included in the documentation to give a quick overview over the preset interpolation modes of the motion trail scene node.

The interpolation modes essentially set the shape of your trail (if shrinking is enabled).
Note that quadraticFlipped( f(x) = - (x-1)*(x-1) + 1) is not in the current source, because it is (too?) similar to the root interpolation (but slightly faster, root is already a really bad approximation). It can also be added or replace root.
Image
Full rez:https://www.dropbox.com/s/h8kg9c2r3vz1o ... s.png?dl=0


Once this scene node is included in Irrlicht, I will start on doing the rest of the work (extra features like bone attachment, etc), so it is not too much at one time.

Re: MotionTrailSceneNode

Posted: Wed Jul 01, 2015 6:59 pm
by CuteAlien
Thanks again.

Re: MotionTrailSceneNode

Posted: Tue Jul 07, 2015 10:41 am
by Mel
Nice! :D i had my own custom motion trail scene node (i think i even called it the same XD) ... too bad i can't find screens :p

Re: MotionTrailSceneNode

Posted: Tue Jul 07, 2015 3:40 pm
by Foaly
Mel wrote:Nice! :D i had my own custom motion trail scene node (i think i even called it the same XD) ... too bad i can't find screens :p
Thanks!
If you know something that can be improved, please let me know.

Re: MotionTrailSceneNode

Posted: Wed Oct 14, 2015 6:04 pm
by suliman
How do i use this? I throw the code into the top of one of the tutorials and get this:

Note: im a noob.

Code: Select all

1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(216) : error C2143: syntax error : missing ';' before '*'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(216) : error C2433: 'IMotionTrailSceneNode' : 'virtual' not permitted on data declarations
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(216) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(217) : error C2065: 'ISceneNode' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(217) : error C2065: 'parent' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(217) : error C2065: 's32' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(217) : error C2146: syntax error : missing ')' before identifier 'id'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(217) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(217) : error C2078: too many initializers
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(218) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(218) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(220) : error C2059: syntax error : ')'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(230) : error C2143: syntax error : missing ';' before '*'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(230) : error C2433: 'IMotionTrailSceneNode' : 'virtual' not permitted on data declarations
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(230) : error C2086: 'int IMotionTrailSceneNode' : redefinition
1>        c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(216) : see declaration of 'IMotionTrailSceneNode'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(231) : error C2065: 'ISceneNode' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(231) : error C2065: 'attach' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(231) : error C2065: 'u32' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(231) : error C2146: syntax error : missing ')' before identifier 'segmentCount'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(231) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(231) : error C2078: too many initializers
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(232) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(232) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(232) : error C2059: syntax error : ')'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(242) : error C2143: syntax error : missing ';' before '*'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(242) : error C2433: 'IMotionTrailSceneNode' : 'virtual' not permitted on data declarations
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(242) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(242) : error C2086: 'int IMotionTrailSceneNode' : redefinition
1>        c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(216) : see declaration of 'IMotionTrailSceneNode'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(243) : error C2065: 'ISceneNode' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(243) : error C2065: 'attach' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(243) : error C2065: 'u32' : undeclared identifier
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(243) : error C2146: syntax error : missing ')' before identifier 'segmentCount'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(243) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(243) : error C2078: too many initializers
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(244) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(244) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(244) : error C2059: syntax error : ')'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(253) : error C2143: syntax error : missing ';' before '*'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(253) : error C2433: 'IMotionTrailSceneNode' : 'virtual' not permitted on data declarations
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(253) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(253) : error C2086: 'int IMotionTrailSceneNode' : redefinition
1>        c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(216) : see declaration of 'IMotionTrailSceneNode'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(254) : error C2653: 'core' : is not a class or namespace name
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(254) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(254) : error C2143: syntax error : missing ',' before '&'
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(255) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(255) : error C2072: 'addLightning' : initialization of a function
1>c:\dropbox\project\code\irrlicht-1.8\examples\04.movement\main.cpp(255) : error C2440: 'initializing' : cannot convert from 'int' to 'int *(const int)'
1>        There are no conversions to function types, although there are conversions to references or pointers to functions

Re: MotionTrailSceneNode

Posted: Thu Oct 15, 2015 11:26 am
by Foaly
Did you recompile Irrlicht? You have to, because the motion trail scene node is not included in the official release yet. (I think the developers didn't have time to add it yet.)
In the first post of this topic, there's a link to a patch (https://www.dropbox.com/s/d9clvh71rnh64 ... patch?dl=0), which contains the source of the motion trail scene node.

If you've never compiled Irrlicht before, don't give up! It took me a whole weekend when I tried it the first time, because I had no C++ experience at that time (I had not written a single line of code, I just wanted to update it for the C# wrapper).
Good luck.

Maybe it's also possible to add the MotionTrailSceneNode without recompiling the engine, but you have to change it's source code a bit. Currently, it modifies the SceneManager, so you have methods to add it.


If you already had done that, you have to show the source code, I can't help you without.

Re: MotionTrailSceneNode

Posted: Thu Oct 15, 2015 11:48 am
by suliman
If i recompile i need to add that code to some existing irrlicht files and then recompile, right?
In which files should i put it?

Thanks!

Re: MotionTrailSceneNode

Posted: Thu Oct 15, 2015 12:03 pm
by Foaly
Yes.
You see, there's that link to a .patch file. That file contains all the code changes.
You need a program to apply the file (for example TortoiseSVN can do that) to the Irrlicht source code. It will automatically apply it to the right files.

Re: MotionTrailSceneNode

Posted: Thu Apr 21, 2016 1:03 pm
by Foaly
I've made some small changes to this.
The link should still be the same: https://www.dropbox.com/s/d9clvh71rnh64 ... patch?dl=0

Re: MotionTrailSceneNode

Posted: Fri Apr 22, 2016 4:05 am
by chronologicaldot
Thanks, Foaly!

Re: MotionTrailSceneNode

Posted: Sun Feb 11, 2018 9:39 am
by Foaly
Links were broken, now fixed.