custom node in editor(solved)

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

custom node in editor(solved)

Post by 3DModelerMan »

Hi I was wondering if any one knows how to use irredit with custom scene nodes?. Like loading custom scene nodes into it so they can be placed in the editor?. And if irredit dose'nt do that could someone tell me about one that does?.
Thanks :D .
Last edited by 3DModelerMan on Sun Jun 29, 2008 3:05 pm, edited 1 time in total.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
tonic
Posts: 69
Joined: Mon Dec 10, 2007 6:18 pm
Contact:

Post by tonic »

Check out the plugin examples which come with irrEdit and make your own custom node by modifying the example one. Then register the same custom node class factory to Irrlicht in your own project, after that the custom nodes loaded from .irr files work fine.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yep, basically it just requires writing a scene node factory for your custom scene node, which requires very little actual effort on your part, you just need to copy the way the plugin does it and make some small changes to fit your custom scene node.

You have to make sure that you register the factory in your application BEFORE you call loadScene as the factory tells the smgr how to deal with your custom scene node so it obviously needs to know how to do that before it's asked to load them ;)
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Thanks

Post by 3DModelerMan »

WHEW!...After posting this thread I was starting to lose hope that it was possible. Do you think you guys could maybe point me to an example of how to use this?

http://irrlicht.sourceforge.net/phpBB2/ ... stic+water

Thanks for the help so far :D .
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

as tonic said look at the plugin examples that come with irredit.

are you trying to use elvman's water scene node in irredit?
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

yeah

Post by 3DModelerMan »

Yeah, whats wrong with Elvmans water scene node? it looks cool!! 8) .
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I'm going to assume that you thought i was disapproving of Elvman's water node? I'm certainly not, it really does look pretty incredible.

Incidentally if you did have trouble turning it into a plugin for irredit then you could always just place a dummy node in irredit where you want the water to be, maybe just a cube scene node stretched out to fill the space you want the water to fill. Then you could give that cube a specific name such as water_node and then after you've loaded the scene into irrlicht you find that node, remove it and replace it with the node as you would usually in irrlicht. Obviously it would be nice to have the water node in irredit but you obviously don't have to see everything in irredit as it would appear in-game.
Image Image Image
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

thanks

Post by 3DModelerMan »

Thanks I'll mark it as solved.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Post Reply