MotionTrailSceneNode
Interpolation mode overview
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.
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.
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.
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.
Last edited by Foaly on Sun Feb 11, 2018 9:25 am, edited 1 time in total.
Re: MotionTrailSceneNode
Thanks again.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: MotionTrailSceneNode
Nice! 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
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: MotionTrailSceneNode
Thanks!Mel wrote:Nice! 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
If you know something that can be improved, please let me know.
Re: MotionTrailSceneNode
How do i use this? I throw the code into the top of one of the tutorials and get this:
Note: im a noob.
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
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.
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.
Last edited by Foaly on Sun Feb 11, 2018 9:26 am, edited 1 time in total.
Re: MotionTrailSceneNode
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!
In which files should i put it?
Thanks!
Re: MotionTrailSceneNode
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.
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
I've made some small changes to this.
The link should still be the same: https://www.dropbox.com/s/d9clvh71rnh64 ... patch?dl=0
The link should still be the same: https://www.dropbox.com/s/d9clvh71rnh64 ... patch?dl=0
Last edited by Foaly on Sun Feb 11, 2018 9:26 am, edited 1 time in total.
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: MotionTrailSceneNode
Thanks, Foaly!
Re: MotionTrailSceneNode
Links were broken, now fixed.