Open ikay70 opened 7 years ago
I haven't - any chance you can send me a small repro project so I can take a look? The shaders themselves are surface shaders, so should support any lighting mode which the unity shaders do. That said, for certain types of baking (static lightmaps/batching) you actually need to burn the Vertex Instance Stream data into the mesh using the Utility panel's baking tools, so this is one thing worth trying. (I'm also wondering if your using Flow mapping, because I think those shaders might use UV2 for flow, which Unity might try to store some GI baking information in? Been a while since i've looked at those shaders since I'm mostly focused on MegaSplat now).
I'm not sure if this is related to that, but I'm having some issues regarding real time GI with static meshes.
Whenever I try using both real time and static lightmaps at the same time, any static mesh with the vertex instance stream gets artifacts while baking. this doesn't happen if I only use static lights or use realtime lights with realtime lightmaps turned off.
For the sake of clarity, since this can be a little bit confusing to understand, here's a scene using realtime lights on a dynamic/non-static mesh using realtime lightmaps only.
On static meshes using only static lights with the new progressive lightmapper (results are very similar with Enlighten):
Problems start to appear when I start adding static meshes with the realtime lightmapper, though.
I believe this is not a UV issue since the lightmap bakes fine if all lights are static as well.
Do you have any idea what could be causing this? I don't think I'm painting anything related to the flow map issue mentioned above.
You might try baking out the mesh so you don't need the VertexInstanceStream. I haven't played with the new lightmapper yet, but it may require the mesh to be static/readonly.
Sent from my iPhone
On May 20, 2017, at 5:12 PM, dorodo95 notifications@github.com wrote:
I'm not sure if this is related to that, but I'm having some issues regarding real time GI with static meshes.
Whenever I try using both real time and static lightmaps at the same time, any static mesh with the vertex instance stream gets artifacts while baking. this doesn't happen if I only use static lights or use realtime lights with realtime lightmaps turned off.
For the sake of clarity, since this can be a little bit confusing to understand, here's a scene using realtime lights on a dynamic/non-static mesh using realtime lightmaps only.
On static meshes using only static lights with the new progressive lightmapper (results are very similar with Enlighten):
Problems start to appear when I start adding static meshes with the realtime lightmapper, though.
I believe this is not a UV issue since the lightmap bakes fine if all lights are static as well.
Do you have any idea what could be causing this? I don't think I'm painting anything related to the flow map issue mentioned above.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I think I figured out what is going on with the artifacts; the precomputed realtime GI system uses the same additionVertexStream api, putting data into the uv3 channel. The VertexInstanceStream code from this tool assumes there's no data in there to begin with so wipes it all out, removing the GI lightmaps and causing the artifacts.
I have the same problem as well. How do we solve this? Can we make the tool to use UV4 if possible?
@slipster216 Amazing tool, thank you very much.
Rebaking meshes using Standard Shader material without VertexInstanceStream.cs gives expected results without artifacts.
Have you ever encounter this kind of behavior?