Cube Map support
Cube Map support
I am planning to create patch for Irrlicht to add cube map support (I guess I will call it ITextureCube, similarly as in IrrSpintz). I do it to improve my Realistic Water Scene Node (more realistic reflections).
To start working on it I should hear your suggestions (and maybe code snippets to do it faster) on how to add them.
Should I add getTexture method to IVideoDriver that takes 6 string parameters (one filename for each face) and returns ITextureCube*? Maybe you have other suggestions?
Later, when the cube map support is complete, I am planning to add CubeMap RTTs. I would like this thread to be a place for your ideas and suggestions about cube maps.
To start working on it I should hear your suggestions (and maybe code snippets to do it faster) on how to add them.
Should I add getTexture method to IVideoDriver that takes 6 string parameters (one filename for each face) and returns ITextureCube*? Maybe you have other suggestions?
Later, when the cube map support is complete, I am planning to add CubeMap RTTs. I would like this thread to be a place for your ideas and suggestions about cube maps.
Last edited by elvman on Mon Apr 18, 2011 1:12 am, edited 1 time in total.
http://irrlicht.sourceforge.net/phpBB2/ ... t=cube+map
That is a valid way to have cubemaps in your renders. While it is not the best, because it consumes more shader time than the regular tex3D op, it is a good alternative.
I only warn one thing if you plan on using it. Disable the mipmapping on the texture which acts as cubemap, or else you will have black seams on the borders.
I never could point to the reason because it happens, clamping the texture coordinates or shifting them to safe places didn't work. The only way to get rid of them is to disable the mip mapping.
Or else, have you ever thought of doing the reflective effects using dual paraboloid maps? more people here can tell you about them.
Although, having true cubemap support in irrlicht would be mostly welcome.
That is a valid way to have cubemaps in your renders. While it is not the best, because it consumes more shader time than the regular tex3D op, it is a good alternative.
I only warn one thing if you plan on using it. Disable the mipmapping on the texture which acts as cubemap, or else you will have black seams on the borders.
I never could point to the reason because it happens, clamping the texture coordinates or shifting them to safe places didn't work. The only way to get rid of them is to disable the mip mapping.
Or else, have you ever thought of doing the reflective effects using dual paraboloid maps? more people here can tell you about them.
Although, having true cubemap support in irrlicht would be mostly welcome.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Off-topic and I don't know if you realise it, but that's actually not a quote at all, it's a joke, which you have misstated.Mel wrote:"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
The real version which you're more than welcome to change to if you like, not that hold the keys to begin with.
Carlson's Consolation: Nothing is ever a complete failure; it can
always serve as a bad example.
I'm pretty sure I saw it on a Murphy's Law poster once. That is all, good day coders.
edit: I take it back I also wanted to mention that I believe his name is Arthur J. Schmitt rather than Arthur A. Schmitt. And there inlay the irony which provoked me.
I've never done water shading but I thought using an environment mapping would give bad results as it's supposed to be physically correct for 1 position only (so acceptable for relativly small objects) but maybe I'm wrong because I'm seeing it from a dual paraboloid point of view instead of a cube map one. What's the matter with the camera flip to render the reflexions?
Re: Cube Map support
How´s the patch going? Would be a nice feature.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Cube Map support
The patch was already almost in the engine, but since we changed too much in the texture interface, it failed to catch up with the development. So we need to update some things with textures first, and then re-apply it here. So still some concepts missing, but the base is quite good.
Re: Cube Map support
Texture interface improvements will be my next task after I finished OGLES2 driver. Be patient
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Cube Map support
I am really glad to hear that.Nadro wrote:Texture interface improvements will be my next task after I finished OGLES2 driver. Be patient