irrRenderer 1.0

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: irrRenderer 1.0

Post by ent1ty »

You should be able to, but I have a feeling the final render to texture feature of irrRenderer isn't working right now. That should be easy to fix, but I have hit a problem with the transparent materials, can anyone else confirm that they are being incorrectly rendered when they should be hidden behind by walls?

edit: confirmed
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Hi mate
calling createDefaultPipeline() after resize cause an error in the irrlicht addTexture function.

*deleted
Regards,
thanh
Last edited by thanhle on Tue Apr 07, 2015 9:01 am, edited 1 time in total.
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Request feature
------------------------
1) Can we have a flag or function call to turn off defer rendering.
2) Can we ignore light for scenenode without light enable?


I'll begin to study shader and will look at adding shadow.

regards
thanh
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Hi,
I have managed to enable deferred without texture.
But I have to use Param2 as a flag.
I heard that use if statement inside shader reduces the render performance.
Is there any way to remove if statement?

Code: Select all

 
 
solid.vert
uniform mat4 WorldViewProjMat;
uniform mat4 WorldViewMat;
uniform float CamFar;
 
varying vec3 Normal;
varying float Depth;
varying vec4 VertexColor;
 
void main()
{
    vec4 vertex = WorldViewProjMat * gl_Vertex;
    VertexColor = gl_Color;
    /*if(Lighting == 0.0)
    {
        Normal= vec3(0.0);
        Depth= 1.0; //automatically Z-reject these areas
    }
    else
    {*/
        Normal= normalize((gl_NormalMatrix * gl_Normal)).xyz;
 
        vec4 vVertex= WorldViewMat * gl_Vertex;
        Depth= vVertex.z/CamFar;
    //}
 
    gl_Position= vertex;
    gl_TexCoord[0]= gl_MultiTexCoord0;
}
 
solid.frag
varying vec3 Normal;
varying float Depth;
 
uniform float Lighting;
uniform float Param2;
uniform sampler2D Tex0;
varying vec4 VertexColor;
 
void main()
{
    vec3 vNormal= normalize(Normal);
    vNormal*= 0.5;
    vNormal+= 0.5;
    
    vec4 col = texture2D(Tex0, vec2(gl_TexCoord[0]));
    
    if(Param2 == 1.0)
    {
        col.xyz = VertexColor.xyz;
    }
    else
    {
        col.xyz *=  VertexColor.xyz;
    }
    
    float vDepth= Depth;
 
    /*if(Lighting == 0.0)
    {
        vNormal= vec3(0.0, 0.0, 0.0);
        vDepth= 1.0;
    }*/
 
    gl_FragData[0] = col; //texture2D(Tex0, gl_TexCoord[0].xy);
    // set normal to 0 for objects that should not receive lighting
    gl_FragData[1] = vec4(vNormal * Lighting, 0.0);
    gl_FragData[2] = vec4(vDepth, 0.0, 0.0, 0.0);
}
 
 
 
Another question:
With Nadro new update in the trunk, irrRenderer break in a few places. Have you update irrRender to the new changes?

Thanks,
thanh
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: irrRenderer 1.0

Post by CuteAlien »

@thanhle: Please update again, we've added one wrapper for old functions back in. Not sure if it's enough for irrRender. If not can you please post the error you get?
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
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Hi CuteAlien

1) IRenderTarget missing the argument or the interface have changed.

e.g. irr::video::IRenderTarget(Device->getVideoDriver()->addRenderTargetTexture(dimension, name, format)) //Will trigger error.

2) IRenderTarget no longer has a public variable RenderTexture .

Regards
thanh
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: irrRenderer 1.0

Post by CuteAlien »

Uhm ok.. have to leave those to Nadro due to lack of time :-(
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
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

I think Entity is revamping the irrRenderer interface or something. There's a topic about that in the advanced help forum.
I'm going to hunt him for that hehe :)

Hopefully he's still alive then.

regards
thanh
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: irrRenderer 1.0

Post by Nadro »

Older IRenderTarget structure was broken. There is new RT interface for support things like MRT. I can update irrRenderer in upcoming days ;)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Cool! thanks.
Keep up the great work Nadro.

regards,
thanh
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Directional light bug.
When directional light X angle is 270 degree.
If we rotate the camera near horizontal, at some angles the light switch off on the surface.
I'm not sure it is Irrlicht's light problem or deferred render problem.

Regards
thanh
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: irrRenderer 1.0

Post by ent1ty »

I am indeed updating irrRenderer for the latest trunk version (the branch "update" in the git repo). Currently transparent material are still broken, I'm hoping to get some time to work on that next week (currently on Easter holidays :P ).
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: irrRenderer 1.0

Post by CuteAlien »

Note that Nadro and me have been heavily discussing some changes related to transparent materials last few days. There might be another change - or maybe not - that's kinda what the discussion is about :-) But I'll keep you informed, just maybe wait a few days until we have decided that (hopefully done next week).
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
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: irrRenderer 1.0

Post by thanhle »

Cool, can't wait for high detail distance sorting for transparent objects.
Regards,
Thanh
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: irrRenderer 1.0

Post by CuteAlien »

Ehm, sorry to disappoint you, but the discussion is just about a recent patch that causes some troubles and how we can fix that again.
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
Post Reply