MotionTrailSceneNode

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.

Interpolation mode overview

Postby Foaly » Wed Jul 01, 2015 5:04 pm

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://dl.dropboxusercontent.com/u/57206382/LinkedOnWebsites/MotionTrailInterpolations.png


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.
Foaly
 
Posts: 141
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: MotionTrailSceneNode

Postby CuteAlien » Wed Jul 01, 2015 6:59 pm

Thanks again.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8291
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: MotionTrailSceneNode

Postby Mel » Tue Jul 07, 2015 10:41 am

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
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 2202
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: MotionTrailSceneNode

Postby Foaly » Tue Jul 07, 2015 3:40 pm

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.
Foaly
 
Posts: 141
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: MotionTrailSceneNode

Postby suliman » Wed Oct 14, 2015 6:04 pm

How do i use this? I throw the code into the top of one of the tutorials and get this:

Note: im a noob.

cpp 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
suliman
 
Posts: 379
Joined: Sat Sep 23, 2006 2:06 pm

Re: MotionTrailSceneNode

Postby Foaly » Thu Oct 15, 2015 11:26 am

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://dl.dropboxusercontent.com/u/572 ... Node.patch), 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.
Foaly
 
Posts: 141
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: MotionTrailSceneNode

Postby suliman » Thu Oct 15, 2015 11:48 am

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!
suliman
 
Posts: 379
Joined: Sat Sep 23, 2006 2:06 pm

Re: MotionTrailSceneNode

Postby Foaly » Thu Oct 15, 2015 12:03 pm

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.
Foaly
 
Posts: 141
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: MotionTrailSceneNode

Postby Foaly » Thu Apr 21, 2016 1:03 pm

I've made some small changes to this.
The link should still be the same: https://dl.dropboxusercontent.com/u/57206382/LinkedOnWebsites/MotionTrailSceneNode.patch
Foaly
 
Posts: 141
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: MotionTrailSceneNode

Postby chronologicaldot » Fri Apr 22, 2016 4:05 am

Thanks, Foaly!
User avatar
chronologicaldot
Competition winner
 
Posts: 519
Joined: Mon Sep 10, 2012 8:51 am

Previous

Return to Open Discussion and Dev Announcements

Who is online

Users browsing this forum: No registered users and 1 guest