[fixed]CSceneLoaderIrr::readSceneNode

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

[fixed]CSceneLoaderIrr::readSceneNode

Post by ent1ty »

https://github.com/3ntity/irrlicht-git/ ... rr.cpp#L84

Seems like if you specify a parent to add the new nodes into, the parent node gets somehow mangled during the data serialization bit and is not usable anymore. This results in the newly loaded child nodes not getting rendered, among other things. I tried to fix it myself, but it's a scary recursive function :(
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
CuteAlien
Admin
Posts: 9651
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: CSceneLoaderIrr::readSceneNode

Post by CuteAlien »

Sorry, I don't have much time to reproduce (especially without files and code). But on a quick view this might happen when you set a parent for a file which has not an IRR_XML_FORMAT_NODE node as root node. Which .irr format probably should have (I guess ... didn't write this stuff and never used the format myself). So... maybe a problem with your .irr file?
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
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: CSceneLoaderIrr::readSceneNode

Post by ent1ty »

Well, I used irrEdit to export my scene.. Then again, that uses quite an outdated version of Irrlicht. Here is my scene: http://pastie.org/9168405 Not exactly sure what the format node is supposed to be. I can test more when I get home in a few hours.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: CSceneLoaderIrr::readSceneNode

Post by ent1ty »

Okay, the problem was in the root scene node attributes, my irr file was missing stuff such as visibility and transformation. I copied these over from irrlicht's media/example.irr and all is working fine.

Guess I will use CopperCube for my scene editing from now on :)
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
CuteAlien
Admin
Posts: 9651
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: CSceneLoaderIrr::readSceneNode

Post by CuteAlien »

So... no bug or still something we should do in Irrlicht (like setting other defaults or so)?
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
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: CSceneLoaderIrr::readSceneNode

Post by ent1ty »

Well... I guess that depends purely on the Irrlicht scene format specification... :D If it states that these root node attributes must be present in each .irr file, then everything is all right. If, on the other hand, it doesn't say so, then yes, some defaults should probably be used. I'm guessing the problem here was that it couldn't find those attributes in the scene file but tried to deserialize them onto my empty scene node anyway.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: CSceneLoaderIrr::readSceneNode

Post by ent1ty »

In case anyone's wondering, this was fixed in commit 4872.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
CuteAlien
Admin
Posts: 9651
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: CSceneLoaderIrr::readSceneNode

Post by CuteAlien »

Yeah, I hope fix works (not really tested much, but nothing that could go wrrogn there)
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
Post Reply