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.


Topics - korindian77

Pages: [1]
1
Unity 2020.1.1f1 latest
Substance in Unity 2.5.2
HDRP 9.0.0-preview 33

Hi,

In a newly created empty project with the latest version of Unity and HDRP, if you duplicate a material with the following code, the duplicated material's inspector will display properly.

Code: [Select]
public Material originalMaterial;    // assigned a material from the project. Can use any shader.

public Material clonedMaterial;     // not assigned anything. Should be null in the inspector.


void Awake()
{
    clonedMaterial = new Material(originalMaterial);   // This duplicates the original material at runtime.
}

Once I import Substance 2.5.2, and run the above scenario, if you double click on the clonedMaterial in the inspector, it says "No Shader Selected", and there are no properties visible in the inspector.

Tests show that the material is cloned properly, but the duplicated material's inspector is broken. This makes it impossible to tweak the duplicated material's properties via the inspector because nothing is visible.

The Substance Plugin is breaking the material inspector for runtime duplicated materials.

2
Hi,

After some extensive testing, I'm finding that normals in the substance graph in Unity are flipped in comparison to an exported texture from Substance Designer.

The attached "SubstanceGraph" image shows the settings of the graph in Substance Designer. Notice that the viewport is set to OpenGL, the  Normal node is set to OpenGL, and output node is set to NormalXYZRight (OpenGL according to Substance Painter docs). Also based on the reflections, you can note that the light source in the viewport is illuminating from above and towards the camera.

The "NormalsFromGraph" image shows how the normals look when mapped to a quad in Unity HDRP with lighting coming from the same direction as the Substance Designer viewport. Note how the normals' Y is flipped to be like DirectX Normals. This is not the same as in Substance Designer. In Unity, the SBSAR has purple at the top, whereas SD shows it as cyan at the top.

If in Substance Designer, I don't export a SBSAR but instead export a texture straight from the 2D view of the output node, import that into Unity and apply Normal Map import settings, notice in the "NormalsFromTexture" image how the normals appear correctly in the OpenGL format. In Unity it is also correctly cyan at top.

The normals are somehow getting flipped from OpenGL to DirectX in the SBSAR, but not when exporting as a texture. This is with Unity 2019.3.4, HDRP 7.2.1, and Substance 2.4.4.

This problem is the same for all "usages" set in the output - NormalXYZLeft, NormalXYZRight, SNorm, sRGB, etc. exported from SD and imported into Unity.

However, if NO usage is set for the output, then when importing that substance into Unity, the texture appears correctly with cyan at top, BUT it doesn't function correctly with lighting as a normal map because it is not detected as a normal map by the substance engine. We also can't set the import settings for the texture to be a normal map because THERE ARE NO such settings in the inspector for that texture, only "Wrap Mode", "Filter Mode", and "Aniso Level". Please look into this bug.

As an aside, it would be nice to have all of Unity's texture import settings available rather than having the Navigation section in the inspector, if there has to be a choice between the two.

3
Hi,

I have a question about exporting a normal map with the normal channel being added by default in SP2 in combination with the normal baked map slot.

Let's say I have a texture set where I have 2 layers:

Normal Details
Height Details

In the "Normal Details" layer, I've only painted on the normal channel using the hardsurface normal textures included in SP2.

In the "Height Details" channel, I've only painted on the height channel using the line tool provided by Wes on the forums.

I've baked out a new normal map with these details (by removing the model from the High Poly slot in the baker dialog) following the instructions shown in the following video:

https://www.youtube.com/watch?v=0M6PDzxJtWY&index=26&list=PLB0wXHrWAmCx994Cb7iRFSmupYHFw5DTx

I add this new normal map to the texture set baked map normal slot. Using the Viewer Settings and Additional Maps, I can confirm that the new normal map has both layers' information baked in.

However, notice at 3:00 in the video where Wes disables the height layer group so that the information isn't "doubled". If I disable either of my layers, that information is not displayed anymore on the model. It seems like in SP1, if you don't have a normal channel, the map that you add to the baked normal map slot is automatically displayed on the model, which is why you need to disable those layers once you've baked out the new normal map. In SP2, this doesn't seem to be the case.

This is fine, I can keep those layers enabled in order to view them on the model. However, when it comes to exporting the normal map when I'm finished, do I need to disable those layers? When exporting, if I use the converted DirectX Normal map, will it include the baked normal map slot along with both layers' information, meaning the normal and height information will be doubled?
Not sure how to proceed here.

Thanks.

4
Hi, I have the latest Substance Designer as well as Substance Database 2.1. Some of the thumbnail previews in the Library for the PBR Database substances are just black. Others from the same folder are just fine.

I've tried rebuilding the thumbnails several times, but that doesn't change anything. It doesn't show these materials as computing the thumbnails, they're just black.

All bitmap-based substances display their previews with no problems.

Any ideas?

Pages: [1]