hdrr(hdr) for irrliht

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
kompromis
Posts: 98
Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm

hdrr(hdr) for irrliht

Post by kompromis »

is there any way any of the next versions is going to have support for hdrr(hdr) http://en.wikipedia.org/wiki/High_dynam ... _rendering
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

Last edited by zenaku on Fri May 11, 2007 6:02 pm, edited 1 time in total.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
kompromis
Posts: 98
Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm

Post by kompromis »

well yes but thats a modified version of irrlicht i would like it to be official so you could have it in the latest version and so
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

its not modified

like in any other engine youve to write the shader yourself and add it to the engine although a post processor class would be nice :P

greetings,
halan
kompromis
Posts: 98
Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm

Post by kompromis »

all i have seen is a modified version of irrlicht witch only could render with hdr when running in opengl mode
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

There just isn't a prebuilt scene node for full screen post processing filters (but there are at least some code examples in the forum). It really depends on the complexity of the scene but as a "quick and dirty" solution I'd do the following (may look weird using huge objects etc. and may be slow depending on your blurring etc.):

Depending on your blur you may need more different nuances.

Let's define some distances/variables:
A: distance to the focused point
B: the range within you see everything sharp

Start ...
Render everything further away than A+B/2.
Blur the scene.
Render everything between A+B/2 and A-B/2.
Render everything nearer than A-B/2 to a texture.
Blur the texture.
Add the texture to the scene.
... finished

You could also blur everything using rescaled textures - should be quite fast then.
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

HDR is not simply blur.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
linkoraclehero
Posts: 81
Joined: Sat Sep 09, 2006 6:46 am

Post by linkoraclehero »

For the most part, yeah, HDR is taking the image, blurring it, increasing it's intensity, then blending it at 50% with the main scene. From that point, you'd average the pixels in the center, and 4 corners, and use that for your overall screen intensity. If you don't believe me, load up Half-Life 2. The next step below HDR is Bloom (Will give the SAME effect, without the realistic feel of light-in-the-eyes intensity). All HDR is, is adding the matter of light to affect it. This is actually explained with pictures in Half-Life 2: Lost Coast. :).

Oh, also, there is no shader that is OpenGL Only. If anything, it's an OpenGL Shader File which can (With some work) be converted to a HLSL file for DirectX. (Atleast, I believe).
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

Well, there are some nifty built-in variables in gl-shaders like the gl_NormalMatrix, which you have to pass manually in a dx-shader.
If you don't have anything nice to say, don't say anything at all.
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

btw before you touch those state variables rember one thing!!!!! Opengl has no world matrix, its model view so if your object is a child to the camera and the camera rotates gl_normalmatrix will not rotate your normals. i wasted 2 hours trying to find out this. so take care.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
linkoraclehero
Posts: 81
Joined: Sat Sep 09, 2006 6:46 am

Post by linkoraclehero »

Well it's possible to do everything without shaders, i'd just be slow because you'd be doing thousands of maths a second... But Irrlicht needs a way to shader the screen nontheless. It seems DirectX is capable of this because the display context is composed of triangles... I'll look into allowing this.
Post Reply