Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - leitecunha

Pages: [1]
1
[Max] Tutorials & Guides / Re: Corona Tips & Tricks
« on: 2021-01-14, 12:27:44 »
Hi there, a little tip for game developers. In case anyone tries to use Corona to bake a lightmap, it is possible.
You have to render both these 2 render elements:

Diffuse
Diffuse Color.

The lightmap is just one divided by the other. What you gotta do is put both renders in photoshop, the one with just the Diffuse Color on top of the other. Then, on that top layer (Diffuse Color), change the blending mode to Divide. And that's it. Just merge both, and you have the lightmap, black and white, and even the color spills from other objects.

Note that in any lightmap rendering, you can render them as an HDR or a PNG (or other 8bit format). When rendering in HDR, you can set the intensity of light super high and everything will be correct, no clipping etc. But of course, on the game engine side, rendering HDR maps in realtime is overhead, specially for mobile or VR standalone (Quest).
So it's best to render the elements and save them as PNG, but in this case, first check if the light is not clipping the white values... or the final lightmix in the game engine won't be exactly correct.
One way to check if you're not clipping is to just temporarily remove the diffuse texture and render it with the white color (or lower the white to ~235, because no physical material is capable of reflecting 255, the full white).

And that's it!

2
Of course! I'll do it. Thanks.

3
Hi there, I know this is an old thread, but in case anyone tries to use Corona to bake a lightmap, it is possible.
You have to render both these 2 render elements:

Diffuse
Diffuse Color.

The lightmap is just one divided by the other. What you gotta do is put both renders in photoshop, the one with just the Diffuse Color on top of the other. Then, on that top layer (Diffuse Color), change the blending mode to Divide. And that's it. Just merge both, and you have the lightmap, black and white, and even the color spills from other objects.

Note that in any lightmap rendering, you can render them as an HDR or a PNG (or other 8bit format). When rendering in HDR, you can set the intensity of light super high and everything will be correct, no clipping etc. But of course, on the game engine side, rendering HDR maps in realtime is overhead, specially for mobile or VR standalone (Quest).
So it's best to render the elements and save them as PNG, but in this case, first check if the light is not clipping the white values... or the final lightmix in the game engine won't be exactly correct.
One way to check if you're not clipping is to just temporarily remove the diffuse texture and render it with the white color (or lower the white to ~235, because no physical material is capable of reflecting 255, the full white).

And that's it!

4
[Max] I need help! / Re: Baking Shadows and Lights
« on: 2016-09-20, 18:07:12 »
I second that! It will be amazing if we could extract only the lighting.
As of now, when you render the CoronaDiffuse you get the texture with it, so you can't composite only the light with another diffuse texture in Unity, for instance.

Pages: [1]