[UPBGE]Lightmap in nodes + parallax

Hello!
Since UPBGE fixed the major issue where you was able to use only one UV in node editor, there is now chance to use lightmaps in nodes. That means that people who aren’t skilled in writing GLSL shader can use nodes to gain nice effects and use lightmap at once. I made this demo showing how to use lightmap in nodes and why would you use it(in my example it is parallax mapping, but you may consider it for reflections, overlays(kinda decals) etc. that you could do in nodes, but internal material editor wouldn’t allow).
This .blend doesn’t work in standart Blender. It looks good in viewport, but once you press ‘P’ it gets corrupted. However, it works well in UPBGE.
Download .blend







I don’t think parallax mapping looks good on anything with hard corners, but that may just be me,

is there any way to have the geometry at the corners match the paralax? like displace and decimate a mesh or something? and preserve the corners mostly?

Yes. It is called shiulette clipping. Very complex and advanced method. I can’t tell you how to exactly make it. However, it costs a bit of performance. It works by reducing alpha channel at corners. Thos, however, has issues at some points. It depends on situation wether to use it or not.
In modern rendering systems we use tesselation which acually adds polygons when you get closer to object. However, it seams to be possible to be done only in GLSL shaders and not in nodes.

I wonder if a tessellation node is possible? using HG1’s compute shader hack?

that would be exciting :smiley:

Hm… I doubt that we could modify vertices in nodes with current BGE. Maybe I should put a lot of effort in improving nodes once I get into C++ deeper than now? Yeah… One of things that I should work on inside of UPBGE project is nodes…

I really need a good shader like this, that is easier implemented on various walls and floors.

Chaos, you need 1 huge atlas, that you reuse over and over for EVERYTHING,

static render call batching is on it’s way in UPBGE, think 8X more faces :smiley:

(think 1 material everywhere)

it is hard but well worth it, also

UV layer 1 = main layer

UV layer 2 = decals

if we can have 3

UV layer 3 = light maps

however light maps are only required if your not using dynamic lighting,
if you are using dynamic lamps+a Lamp manager /shuffler you can use about 8 high quality spots in a small area or more on my PC (and 12 point lamps) (middle of the road low end gaming) Nvida alienware alpha.

Agreed. I am trying to basicly do the same. It is a huge optimisation. In most case I don’t have kinda decals, but if I had them, I’d use 3rd layer(my opinion is that lightmaps are a bit more important as they give awesome ambience. Even if they’re just baked AO and constant frequency GI.

Download this one. Hm… You may need UPBGE. Sad… Maybe UPBGE features will be in master soon? I am really hoping so, but nobody tells if they will. If they won’t I will keep using UPBGE.

Over here -> https://github.com/UPBGE/blender/issues/9

Hm… I think that somebody has taken that already. Implementing it wouldn’t be hard(I just write shadercode and than follow the way how SSS was implemented, but instead of testing for material’s value I should check for texture’s value. One more problem is depth of parallax(or the parallax sample count), because some people want to not have artifact stripes or high performance, but others want to have very strong depth. It would require a specific value slider.

like scientists love to solve problems. :slight_smile:

I noticed that SSAO was not needed in this blend and made it too dark. I have also reuploaded with SSAO disabled.

Hi, can u reload blend file?? Its unavilable