How to add irr-scene to node?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

How to add irr-scene to node?

Post by alko »

I need disable filtering, lighting, make a transform, copy / remove and more with irr-scene.
how can i do that?
Maybe need to add irr-scene to node?
But how ?
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to add irr-scene to node?

Post by CuteAlien »

You can create a new node and then go over children of root recursively and add scenepointers there. If you need real copies you can use ISceneNode::clone() for each node.
You can also create a new SceneManager with ISceneManager::createNewSceneManager
In many situations it also makes sense working without SceneManager - but rendering Noder or even Meshes directly - as you can then influence settings easier per node.
In Irrlicht trunk there now an IVideoDriver:: getOverrideMaterial which also allows you to change some material settings for a drawAll() without having to change the nodes/materials themself.

Hope this gives you a few ideas.
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
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

I'm trying this, but nothing changed

Code: Select all

driver->getOverrideMaterial().Material.setFlag(EMF_LIGHTING, false );
driver->getOverrideMaterial().Material.setFlag(EMF_BILINEAR_FILTER , false );
Also, in my interest to run my project on old hardware (Voodoo 2 + pentium MMX), however there are such troubles:
Image

If I switch to videocard Ati Rage2 - textures are normal. But FPS is low
Image

Any ideas on this?
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

Voodoo2 did not work in 8 bits per channel internally, and could only accept RGB 565 textures
hmmm....
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

is it possible to change in render texture format to ARGB1555?
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to add irr-scene to node?

Post by CuteAlien »

Yeah, sorry, have to improve documentation for override material. You have to set EnablePasses to the passes in which you want it to be active. Otherwise scenemanager will never enable it.

Do you mean render target texture? Those have a color-format parameter when you create them.
For all other textures you can try IVideoDriver::setTextureCreationFlag(irr::video::ETCF_ALWAYS_16_BIT, true);
And maybe setTextureCreationFlag(irr::video::ETCF_ALWAYS_32_BIT, false);
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
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

Nice!
But billboards from irrScene still under filtering.
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to add irr-scene to node?

Post by CuteAlien »

Which driver are you working with?
Also check if there are any log-messages which look suspicious.
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
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

I'm trying OpenGL and DX.
in both cases billboard are filtering

log:
Image
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to add irr-scene to node?

Post by CuteAlien »

Any chance you can create me some code with which I can reproduce this? Or is that likely a thing only on your system? Maybe if I got some code I can try doing stuff like setting my destkop to 16-bit or so (if that's still possible nowadays). But without any code - not really sure how to start. This need some debugging to see what kind of formats the textures are internally chosing and why.
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
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to add irr-scene to node?

Post by CuteAlien »

Found maybe something. Ensure ETCF_OPTIMIZED_FOR_QUALITY is also disabled or it may override ETCF_ALWAYS_16_BIT.
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
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to add irr-scene to node?

Post by CuteAlien »

Did you try disabling ETCF_OPTIMIZED_FOR_QUALITY already?
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
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

CuteAlien wrote:Did you try disabling ETCF_OPTIMIZED_FOR_QUALITY already?
Yes, Im try to add this line

Code: Select all

   driver->setTextureCreationFlag(video::ETCF_OPTIMIZED_FOR_QUALITY, true );
and try to set this flag to false - no changes have occurred
alko
Posts: 26
Joined: Wed Aug 29, 2018 10:14 am

Re: How to add irr-scene to node?

Post by alko »

CuteAlien wrote: Or is that likely a thing only on your system?


I testing this on intel core i5+gtx960 under win7 64bit
and on Pentium mmx + voodoo2 under win98SE
Post Reply