irrRenderer 1.0

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Re: irrRenderer 1.0

Postby primem0ver » Tue Nov 03, 2015 8:47 am

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.
primem0ver
 
Posts: 53
Joined: Sat Oct 11, 2014 11:07 pm

Re: irrRenderer 1.0

Postby Locien » Mon May 09, 2016 9:26 pm

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
Locien
 
Posts: 25
Joined: Wed Jul 10, 2013 2:43 am

Re: irrRenderer 1.0

Postby devsh » Thu May 12, 2016 8:23 am

you need a logarithmic depth buffer, using the DEPTH32F format as storage
We chose to stream mesh data from Multiple OpenGL Contexts in many threads and do the other things, not because they are easy, but because they are hard! - JFK
User avatar
devsh
Competition winner
 
Posts: 1734
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: irrRenderer 1.0

Postby kinkreet » Mon Aug 08, 2016 6:22 am

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
cpp 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
cpp Code: Select all
 
        viewMat = Smgr->getActiveCamera()->getViewMatrix();
        viewMat.makeInverse();
        services->setPixelShaderConstant("inverseView", (irr::f32*)&viewMat, 16);
 
User avatar
kinkreet
 
Posts: 64
Joined: Thu Oct 31, 2013 7:53 pm
Location: Barcelona, Spain

Re: irrRenderer 1.0

Postby Mel » Thu Aug 11, 2016 11:43 am

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
User avatar
Mel
Competition winner
 
Posts: 2184
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: irrRenderer 1.0

Postby kinkreet » Thu Aug 11, 2016 6:02 pm

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
cpp 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"""""
User avatar
kinkreet
 
Posts: 64
Joined: Thu Oct 31, 2013 7:53 pm
Location: Barcelona, Spain

Previous

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest