Follow spline editor

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
ikam
Posts: 46
Joined: Sun Jun 24, 2007 4:46 pm
Location: France

Follow spline editor

Post by ikam »

hello

I've build a little tool for edit in real time a spline on an .irr scene. It can export spline attributes in xml to use in extern irrlicht app for easy use of the FollowSpline Animator.

I've build it initially to easy create a follow path for my camera , but it can used for other like stuff.

This is a first version created very quickly with maybe some bugs and need improvements but if it can helps you...

http://dakila.free.fr/splineed.zip

features:

- load an irr scene
- edit position of every control points
- add new control point or delete
- render to simulate a camera follow spline
- render to simulate a cube follow spline
- export attributes (controls points, tightness, speed) of spline in xml


CONTROL KEYS


// move position of controls node
1 = -X
2 = +X
3 = -Y
4 = +Y
5 = -Z
6 = +Z

// select control node
+ = next index
- = previous index

// add or delete point control (add after the last, or delete the last)
Q = add
W = delete

// render test
C = Camera follow spline render
V = camera fps
B = cube follow spline render

// increase step of deplacement for node
PAGE UP key = increase step
PAGE DOWN key = decrease step

// files operations
O = OpenFile Dialog for select .irr scene
P = Write xml of spline animator attributes

// speed of deplacement on spline for camera or cube render, need to restart render (key C or B)
S = speed up
D = speed down

// degree of bend for spline
T = +
Y = -


screens

Image
Last edited by ikam on Wed Jun 27, 2007 8:24 am, edited 1 time in total.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

This is really nice and could be very useful to all of us. great tool. :D
MarcoTMP
Posts: 37
Joined: Mon Aug 29, 2005 8:14 pm
Location: Dominican Republic
Contact:

Post by MarcoTMP »

Yeah, this tool is really nice!.

@Niko, what about adding this feature to irredit? :wink:
liger13
Posts: 119
Joined: Tue Jul 18, 2006 4:17 am

Post by liger13 »

yah, that would be great. no more walking through and finding every point :P
Hirogen
Posts: 19
Joined: Tue May 29, 2007 5:55 am

Post by Hirogen »

What about the sources?
Is your tool Open Source?
I mean, the saved spline attributs can't be loaded without your software, or can they?
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

1st post and such a contribution. im impressed :)
ikam
Posts: 46
Joined: Sun Jun 24, 2007 4:46 pm
Location: France

Post by ikam »

thks, I'm happy if this little tool can help you.

The source will be available soon. I need to clean and reorganize it a little, cause i've made it quickly and it's a bit ugly.
Moreover the comment are in french :p so i need to translate them, I prefere to give you a clean source code.

The spline attributs can be loaded without this tool (this is the goal).

exemple to load spline.xml created by my tool :

Code: Select all

// create a cube to animate it with a spline animator 
	scene::ISceneNode * cubeNode = smgr->addCubeSceneNode(30);

	// read spline.xml
    io::IXMLReader* xmlReader = device->getFileSystem()->createXMLReader("spline.xml");	

	// if xml reader ok
    if (xmlReader)
    {
		// create attributs receiver
		io::IAttributes* attribs = device->getFileSystem()->createEmptyAttributes();

		// load attributs from xml
		attribs->read(xmlReader);	  

		// create an empty spline animator
		scene::ISceneNodeAnimator * sa = smgr->createFollowSplineAnimator(0,0);
		
		// load attributs into the spline animator	
		sa->deserializeAttributes(attribs);

		// add the spline animator to the cube
		cubeNode->addAnimator(sa);

		// clean resources
		sa->drop();
		attribs->drop();      
    } 

	// drop xml reader
	xmlReader->drop();

- there is a bug when writting spline.xml, the speed is not correctly reported and it's always set to 0.1, so you need to change it mannually in the xml. I will correct this soon
- i'd like also to add some gui elements to set this tool more efficient.
noreg
Posts: 158
Joined: Fri Jun 23, 2006 6:01 pm
Location: continental europe

Post by noreg »

The source will be available soon. I need to clean and reorganize it a little, cause i've made it quickly and it's a bit ugly.
Moreover the comment are in french :p so i need to translate them, I prefere to give you a clean source code.
Very nice tool. That will be useful for scripted architectural walkthroughs and game fmv´s. PLEASE leave the original (french) comments intact when you translate. More people program better than they translate :wink: Merci.
mikeyranks
Posts: 1
Joined: Sun Mar 21, 2010 2:41 am

Post by mikeyranks »

This is great though how did you calculate and draw the curves?
Linkin Puck
Posts: 36
Joined: Sat Feb 06, 2010 11:52 am

Post by Linkin Puck »

mikeyranks wrote:This is great though how did you calculate and draw the curves?
I second this.

Assuming Ikam is not around any more, how would others approach this?
ikam
Posts: 46
Joined: Sun Jun 24, 2007 4:46 pm
Location: France

Re: Follow spline editor

Post by ikam »

Hi guys

it's been a while I didn't post here, I was busy with another software, but I come back because I'm coding an new project with irrlicht.

so sorry I forgot to give sources... it's done now.

it's an old version (irrlicht 1.3.1), so maybe it need some fix...

sources
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Follow spline editor

Post by ACE247 »

I'm sure it can fixed up to the latest svn version :)
Thanks for uploading this anyways even if it was already so old.
Post Reply