irrRenderer 1.0

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
primem0ver
Posts: 57
Joined: Sat Oct 11, 2014 11:07 pm

Re: irrRenderer 1.0

Post by primem0ver »

I was pointed to this project by someone answering a question I posted in the Advanced forum. My project needs to be able to dynamically use (or simulate using) an object as a light source. The discussion where I pose my "problem" is here. My current need for this is to create a sun that lights planets and other objects that circle it but since the project is a platform that uses plugins, I will eventually need be able to support other objects of various shapes and sizes as well. Would your irrRenderer make this possible? From the picture on the first page, your large lights on the wall appear to do something similar to what I have in mind. The light radiating from the source must also have the option to project light a very large distance (in the case of a solar system for example). I do not however want to use a collection of point lights. I have tried that in the past and it was completely unsuccessful in creating a realistic effect.
Locien
Posts: 25
Joined: Wed Jul 10, 2013 2:43 am

Re: irrRenderer 1.0

Post by Locien »

Been making use of this super cool project because I'm making a block type game and want the ability to place many lights. So far I've had little problems and it's running great, actually I haven't noticed any drop in performance at all. There was one problem I had which was that some pixels would bleed through geometry apparently caused by floating point inaccuracy in static planes or "thin walls" as mentioned earlier in the thread. It can be fixed by increasing the near value though, changing the far value didn't change it at all for me.

Here's what it looks like with near value 0.01, completely broken if you zoom out more:
Image

And with near value 0.3, much better:
Image

Is there any way to fix this in the shader without having to change the near value or is this just one of the downsides of the implementation? Anyways, really cool stuff. I haven't checked out if the transparent materials work yet, but I will do so soon.

Oh and the reason why the depth looks funny in the screens is because I haven't cast any diffuse lights on the terrain. But I tested it and it works great :D
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: irrRenderer 1.0

Post by devsh »

you need a logarithmic depth buffer, using the DEPTH32F format as storage
kinkreet
Posts: 64
Joined: Thu Oct 31, 2013 7:53 pm
Location: Barcelona, Spain

Re: irrRenderer 1.0

Post by kinkreet »

how can i transform the vPixelPos in to world space? I tryed to multiply by inverse view matrix, but when the camera rotates the worldpos "rotates" too.
GLSL

Code: Select all

 
         float vDepth = texture2D(DepthTex, ScreenPos.xy).r;
 
        //reconstruct view pixel position
        vec3 vProjPos = vec3(mix(FarLeftUp.x, FarRightUpX, ScreenPos.x),
                     mix(FarLeftDownY, FarLeftUp.y, ScreenPos.y),
                     FarLeftUp.z);
        vec3 vPixelPos = vec3(vProjPos * vDepth);
 
        vec4 worldpos = inverseView * vec4(vPixelPos, 1.0) ;
 
 
callback

Code: Select all

 
        viewMat = Smgr->getActiveCamera()->getViewMatrix();
        viewMat.makeInverse();
        services->setPixelShaderConstant("inverseView", (irr::f32*)&viewMat, 16);
 
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: irrRenderer 1.0

Post by Mel »

Unless you know what you're doing, avoid using a Z near value under 1.0
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
kinkreet
Posts: 64
Joined: Thu Oct 31, 2013 7:53 pm
Location: Barcelona, Spain

Re: irrRenderer 1.0

Post by kinkreet »

It seems to work, but is not solved yet. I'm using the world position for shadow mapping and paint the water.

EDIT:It's like if the camera position was displaced

Code: Select all

 
//its simple
if( world.y < waterlevel) gl_FragColor = vec4(gl_FragColor.rgb * watercolor, 1.0);
http://i65.tinypic.com/110hhu9.png
http://i64.tinypic.com/2ik312t.jpg

EDIT2: OK, solved. I was doing wrong the depthmap..... u.u"""""
noretsar
Posts: 11
Joined: Fri May 11, 2018 2:04 am

Re: irrRenderer 1.0

Post by noretsar »

Thanks for this.. irrRenderer works ok, at least with poinlights from the demo, anyone tried with Directional Lighting?

With Directional Light, Normal map does not work (flicker on some angles) and Parallax mapping seems to be ok, but I'm getting some artifacts like this..

Image

any ideas or is this a bug?
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: irrRenderer 1.0

Post by devsh »

Install RenderDoc and show me the shader for the parallax and the deferred.

Or give me the entire capture from RenderDoc (I just need 1 frame).
noretsar
Posts: 11
Joined: Fri May 11, 2018 2:04 am

Re: irrRenderer 1.0

Post by noretsar »

devsh wrote:Install RenderDoc and show me the shader for the parallax and the deferred.

Or give me the entire capture from RenderDoc (I just need 1 frame).
Thanks devsh. I'm not that familiar with RenderDoc, but this is what I'm getting..

Image

Running Irrlicht 1.8 with this one.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: irrRenderer 1.0

Post by devsh »

ooops, only works in OpenGL core profile (irrlicht too old)... :(


Try codexl, nvidia graphics debugger, or similar (but not APItrace).
noretsar
Posts: 11
Joined: Fri May 11, 2018 2:04 am

Re: irrRenderer 1.0

Post by noretsar »

I see. I'm now actually thinking twice about using this anyway since it messes up with Irrlicht's AA, which I'm more in favor of.. still a good option when this is fixed, perhaps I'm using an outdated version? :oops:
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: irrRenderer 1.0

Post by devsh »

As far as I'm aware irrRenderer is not under active (or any kind of) development.
Post Reply