Cube Map support

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Cube Map support

Post by elvman »

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.
Last edited by elvman on Mon Apr 18, 2011 1:12 am, edited 1 time in total.
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

I don't see the point in using environment mapping for large surfaces as water?
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

I can't think of any other method for making sky reflections (whole sky, not only sun) like this without cube maps:
Image
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

I thought of the name for method and concluded, that the name should be addTextureCube, which takes 1 or 6 strings. If 1 string is given, then it is cubemap dds file.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

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.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Mel wrote:"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.

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.
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

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?
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Cube Map support

Post by robmar »

How´s the patch going? Would be a nice feature.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Cube Map support

Post by hybrid »

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.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Cube Map support

Post by Nadro »

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
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Cube Map support

Post by elvman »

Nadro wrote:Texture interface improvements will be my next task after I finished OGLES2 driver. Be patient :)
I am really glad to hear that.
Ouzel – 2D game engine
Realistic water node
Post Reply