Irrlicht with cubemap support

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Irrlicht with cubemap support

Post by elvman »

Added more realistic reflections to the demo and created a screenshot of the demo.
Ouzel – 2D game engine
Realistic water node
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Irrlicht with cubemap support

Post by ACE247 »

Tested on Geforce 7300GS(+-330fps) and Geforce gts250(VERY HIGH) and works. However by me the reflection on the sphere is upside down.
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Irrlicht with cubemap support

Post by elvman »

ACE247 wrote:Tested on Geforce 7300GS(+-330fps) and Geforce gts250(VERY HIGH) and works. However by me the reflection on the sphere is upside down.
Can you share some screenshots?
Ouzel – 2D game engine
Realistic water node
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Irrlicht with cubemap support

Post by ACE247 »

Here's what I mean.
Image
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Irrlicht with cubemap support

Post by elvman »

What driver are you using (Direct3D9 or OpenGL)? Try with both and check if results are the same.
Ouzel – 2D game engine
Realistic water node
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Irrlicht with cubemap support

Post by elvman »

Added an interface for 2D textures (ITexture2D) which extends ITexture, so all 2D textures now implements it. getTexture now returns ITexture2D.
Created patch and source for the latest SVN version of Irrlicht.

PS. What should I do to get this integrated in core?
Ouzel – 2D game engine
Realistic water node
RdR
Competition winner
Posts: 273
Joined: Tue Mar 29, 2011 2:58 pm
Contact:

Re: Irrlicht with cubemap support

Post by RdR »

elvman wrote: PS. What should I do to get this integrated in core?
I was wondering the same, really like to see this added to the irrlicht trunk.

Elvman are you updating your water scene node with cubemap?
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Irrlicht with cubemap support

Post by elvman »

RdR wrote:Elvman are you updating your water scene node with cubemap?
I will do it when Cubemaps get integrated in Irrlicht core, because I cant create a water node, that does not work with original version of Irrlicht.
Ouzel – 2D game engine
Realistic water node
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Irrlicht with cubemap support

Post by ACE247 »

Any update on this? As for earlier, about the inverted reflection, it does it with both drivers.
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht with cubemap support

Post by CuteAlien »

Ok, not so much my area yet, but I just spend a few minutes browsing quickly over the patch. Looks interesting in general and it's something we could also need here.

But I also noticed a few things:

First - are the all the interface changes for textures really needed? It seems only ITexture::getTextureType get's added while the new interfaces ITexture2D and ITextureCube don't have a single additional member. Why not just set that type in the texture-implementations? I realized this might be a cleaner looking solution - but it's changing rather a lot which is generally not a good idea unless you have to (as it messes up wrappers, user-code etc) and it seems we could avoid all that for now (could still be done if it's really needed for something later on).

Next that code:

Code: Select all

 
#ifndef _IRR_COMPILE_WITH_DIRECT3D_8_
// The D3DXFilterTexture function seems to get linked wrong when
// compiling with both D3D8 and 9, causing it not to work in the D3D9 device.
// So mipmapgeneration is replaced with my own bad generation in d3d 8 when
// compiling with both D3D 8 and 9.
// #define _IRR_USE_D3DXFilterTexture_
#endif // _IRR_COMPILE_WITH_DIRECT3D_8_
 
#ifdef _IRR_USE_D3DXFilterTexture_
#pragma comment(lib, "d3dx9.lib")
#endif
 
Really needed? I'm a little confused especially as I don't see a custom d3d8 mipmapgeneration.

Another mipmap thing in COpenGLTextureCube::uploadTexture() - there is outcommented code ( the if( hasMipMaps ) )in the patch. Why is it commented out?

Can't tell yet about implementation, I will need more time for that. But that it comes with Demo already is definitely a good sign :-)
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
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Irrlicht with cubemap support

Post by ACE247 »

Great to hear that someones still watching this.
I was quite aware of the many odd code bits present in the patch, I think they're still left from Elvman trying to add new Texture formats, 1D,3D...
Best to probably remove those and add them in a completely separate patch later, plus a separate patch for then extending the Cubemap after the new texture formats,IF the texture form'ts ever are added.
Probably better wait for elvman to comment on that.
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: Irrlicht with cubemap support

Post by REDDemon »

it uses normals as UVT coords?
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Re: Irrlicht with cubemap support

Post by elvman »

Is there any progress on integrating my cubemaps into engine?
Ouzel – 2D game engine
Realistic water node
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Irrlicht with cubemap support

Post by Mel »

I'd say you should wait for Irrlicht 1.9 at least....
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Re: Irrlicht with cubemap support

Post by d3jake »

Could someone clue me in as to why this is so useful? I looked up "cubemap" on the tome of wikipedia, and it has something to do with reflections, but what would the application be for a game?
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
Post Reply