Decode Lightmap & GI Data?

Your feedback is very important to us. We are listening.

Decode Lightmap & GI Data?

Postby ZappForThat » Fri Dec 01, 2017 5:00 am

Does anyone know how to use the "Decode Lightmap" node?

More broadly, has anyone has success in using Unity's lightmap textures as resources in their shader?
ZappForThat
 
Posts: 6
Joined: Wed Nov 22, 2017 7:21 pm

Re: Decode Lightmap & GI Data?

Postby ZappForThat » Mon Dec 04, 2017 12:54 am

bump
ZappForThat
 
Posts: 6
Joined: Wed Nov 22, 2017 7:21 pm

Re: Decode Lightmap & GI Data?

Postby Amplify_RnD_Rick » Mon Dec 04, 2017 4:11 pm

Hi ZappForThat,

We depply apologize on only anwering now.

What this node does internally is call the DecodeLightmap built'in function which decodes color from Unity lightmap over the result set on its input port .

We added this node more to be used on a later stage with templates since lighmaps are automaticaly accessed/decoded under the hood by surface shaders.

Is it possible for you to give further information on how you want to use lighmaps so we can expand its usage inside ASE better help you out?
Amplify_RnD_Rick
 
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm

Re: Decode Lightmap & GI Data?

Postby ZappForThat » Wed Dec 06, 2017 2:12 am

Hey Rick,

Thanks for the reply & no apology needed!

Perhaps it's that I'm testing in 2017.3 b10 at the moment, but it seems like the node doesn't return any values, regardless of lighting mode (standard, custom, unlit, etc).

Broadly speaking, I'd like to be able to make use of the lightmap texture resource within my own custom lighting models or lighting models beyond "standard". That, or be able to have more control over how the lightmap is applied when using the standard lighting model.

I'm not well informed on how lightmaps are actually handled, so I may be asking for the impossible here, but these are some ideal use cases that I can imagine:
- Remapping lightmap data before applying it
- Drive a lerp with the lightmap values
- Expose the lightmap UVs so they can be warped with a flowmap or other math.

Basically, I'm looking for a 'lightmap' node that I can use in conjunction with any of the other ASE nodes. Maybe a simpler option would be a node that returns only shadowmap information, but ignores Unity's Global Illumination pipeline?

Anyway, thanks for the response and I'm curious about what your thoughts are on all this!
Cheers!
ZappForThat
 
Posts: 6
Joined: Wed Nov 22, 2017 7:21 pm

Re: Decode Lightmap & GI Data?

Postby ZappForThat » Wed Dec 06, 2017 5:44 pm

Having thought a little more about it, it seems that the the most likely reason for the issue has to do with the Unity version i'm testing with and the large changes to the light baking pipeline that Unity has made in it.

I'll test this out, both on a supported version of Unity, and with the various different GI/baked lighting methods available in 2017.3 b10.

I'll post more info when I have it.
ZappForThat
 
Posts: 6
Joined: Wed Nov 22, 2017 7:21 pm

Re: Decode Lightmap & GI Data?

Postby Amplify_RnD_Rick » Fri Dec 15, 2017 5:14 pm

Hey ZappForThat,

Unfortunately I think that you'll want to do wont be be able to be easily achieved.

We can give you access to the unity_Lightmap texture and its texture coordinates, but you wont be able to modify it, or change the way it is applied using only a shader. Remapping lightmap data may be possible but would require more work than only shader work

Also, I think we don't have native access to shadow map information from the shader.

You are indeed trying to do some tricky stuff eheh.

Nevertheless we would really like for you to keep us informed on your findings so we can new functionalities into ASE that could help you out.
Amplify_RnD_Rick
 
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron