Environment Mapping with Irrlicht
Environment Mapping with Irrlicht
Long time i didn't release an irrlicht demo!....
These are the results of my experiments with the spherical mapping. Actually, the advantages of using a single texture to generate environment maps are many, compared to the potential drawbacks (even if they are as little or ignoreable as this technique has) They can be stored on texture atlases and a single texture could be used to store many at the same time, without the need of texture arrays, for instance.
This demo also features IImage manipulation. An aspect that i think is overlooked on the main examples, as it is somehow left as a secondary tool, and a helper, as Irrlicht mainly focuses on the hardware drivers, leaving the software manipulation abandoned. For instance, a filtered 2D reading from the software images could be a nice feature to add. And many other things i sure forget to mention.
Also, there is code for both OpenGL and DirectX, so, in theory, the demo should be able to compile and run under any environment, i haven't provided any projects, only a windows executable, a compiled, unmodified, version of Irrlicht, the data directory, which just uses some of the media files from the Irrlicht distribution, and the source code in the source directory. Any part of it is freely useable.
http://omegasection.g0dsoft.com/backup/ ... rlicht.zip
Anyway! i hope you find them interesting!
These are the results of my experiments with the spherical mapping. Actually, the advantages of using a single texture to generate environment maps are many, compared to the potential drawbacks (even if they are as little or ignoreable as this technique has) They can be stored on texture atlases and a single texture could be used to store many at the same time, without the need of texture arrays, for instance.
This demo also features IImage manipulation. An aspect that i think is overlooked on the main examples, as it is somehow left as a secondary tool, and a helper, as Irrlicht mainly focuses on the hardware drivers, leaving the software manipulation abandoned. For instance, a filtered 2D reading from the software images could be a nice feature to add. And many other things i sure forget to mention.
Also, there is code for both OpenGL and DirectX, so, in theory, the demo should be able to compile and run under any environment, i haven't provided any projects, only a windows executable, a compiled, unmodified, version of Irrlicht, the data directory, which just uses some of the media files from the Irrlicht distribution, and the source code in the source directory. Any part of it is freely useable.
http://omegasection.g0dsoft.com/backup/ ... rlicht.zip
Anyway! i hope you find them interesting!
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Environment Mapping with Irrlicht
Hi Nice stuff,
This at the moment seems to work only on OpenGL NVidia graphic card. DirectX doesn't work, it said could not load D3DXAssemleShader from dll.
Intell card doesn't work in openGL nor DirectX. My graphic card is GTX 860M 4Gb.
Regards
This at the moment seems to work only on OpenGL NVidia graphic card. DirectX doesn't work, it said could not load D3DXAssemleShader from dll.
Intell card doesn't work in openGL nor DirectX. My graphic card is GTX 860M 4Gb.
Regards
Re: Environment Mapping with Irrlicht
The source is there for you to compile your own version. If Irrlicht on DirectX works properly on your system you can try that Create a project on your preferred work environment (code::blocks, DevC++, Visual Studio Express...) add that source code, link the irrlicht library and you should be done with ease.
Anyway, i also would recomend you to install a DirectX9C redistributable because that DLL error seems to be more like a missing D3D9 lib.
Anyway, i also would recomend you to install a DirectX9C redistributable because that DLL error seems to be more like a missing D3D9 lib.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Environment Mapping with Irrlicht
Looks good works on my d3d9 driver. I'll look into this if it takes nadro along time to add cubemap support.
Re: Environment Mapping with Irrlicht
I hope you find my code useful. The cubemap support shouldn't be too hard to implement on DX either. The interfaces are ready, the only thing left is to write the proper cubemap generation.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Environment Mapping with Irrlicht
I tried running the app, but my system says no go..(no permission).
I have Windows XP and Nvidia card. What is the problem?
I have Windows XP and Nvidia card. What is the problem?
Re: Environment Mapping with Irrlicht
Hi Mel,
I see a following issue in OpenGL:
Anyway this demo looks really nice, thanks for share it!
Cheers,
I see a following issue in OpenGL:
Do you have a NV card? NV drivers are problematic for develop OpenGL...(atan2 isn't available in GLSL, this is the same situation like with a float4 etc, IIRC you can avoid those problems by adding '#version 110' or higher - NV drivers works better if you provide '#version').GLSL shader failed to compile
Fragment shader failed to compile with the following errors:
ERROR: 0:16: error(#143) Undeclared identifier: atan2
ERROR: 0:16: error(#202) No matching overloaded function found: atan2
ERROR: error(#273) 2 compilation errors. No code generated
Anyway this demo looks really nice, thanks for share it!
Cheers,
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Environment Mapping with Irrlicht
using trigonometric functions in rendering code is a grave sin
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: Environment Mapping with Irrlicht
I guess that makes me the devil. lol. jkdevsh wrote:using trigonometric functions in rendering code is a grave sin
Re: Environment Mapping with Irrlicht
Trigonometrics are there for some reason, and so far i've never found a justification to the ATAN2 operation in shader language other than the spherical mapping.
In fact, it is perfectly posible to create another environment mapping solution which won't use the trigonometrics at all, and will look the same, the only diference would be the distribution of the pixels in the final skysphere, but the final result would be almost the same looking.
In fact, it is perfectly posible to create another environment mapping solution which won't use the trigonometrics at all, and will look the same, the only diference would be the distribution of the pixels in the final skysphere, but the final result would be almost the same looking.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Environment Mapping with Irrlicht
Maybe this will be helpful for someone here, so the latest trunk rev has support for cubemaps in both OGL and D3D9
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Environment Mapping with Irrlicht
Nice! I think it would be an important addition as well to create materials that used the cubemaps directly with the engine, so people at least knew there is support for them, but it is a great job, none the less
This, the support for flexible vertex formats, and the instancing would definitely cover some of the gaps that Irrlicht needs to fill.
EDIT:
By the way, this is USING CUBEMAPS, no extra stuff, no extra nothing. REAL cubemaps
So, good work, NADRO!
I will release another demo as soon as I implement the other shaders
This, the support for flexible vertex formats, and the instancing would definitely cover some of the gaps that Irrlicht needs to fill.
EDIT:
By the way, this is USING CUBEMAPS, no extra stuff, no extra nothing. REAL cubemaps
So, good work, NADRO!
I will release another demo as soon as I implement the other shaders
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Environment Mapping with Irrlicht
Thanks, good to see that it works fine At now shader-pipeline is slightly behind of trunk with features, however after v1.9 will be released (I hope that we'll be able to push this version soon) I immadiately merge changes from trunk to shader-pipeline or even maybe merge shader-pipeline into trunk.
BTW. In upcoming days I'll add support for load cubemaps directly from PVR files (IVideoDriver::getTexture).
BTW. In upcoming days I'll add support for load cubemaps directly from PVR files (IVideoDriver::getTexture).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Environment Mapping with Irrlicht
Okay great looking forward to latest changes.
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: Environment Mapping with Irrlicht
Yay! Thanks Nadro!