Announcement

Collapse
No announcement yet.

A litle bit confused about Decals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    A litle bit confused about Decals

    Hi All,

    I started to play around with some decal materials and decal actors and for some reason I cant get it right.

    The following decal is "wrong" for the following reasons:
    - It is tilted by 45°. (see material screenshot below)
    - It is not fully opaque. It is not supposed to show any underlying brick texture/normal information.

    Click image for larger version

Name:	Viewport.jpg
Views:	2
Size:	209.2 KB
ID:	1137352

    The material graph looks like this:

    Click image for larger version

Name:	Material.jpg
Views:	2
Size:	302.6 KB
ID:	1137353

    And the material propertied are set like this:

    Click image for larger version

Name:	Properties.jpg
Views:	2
Size:	350.4 KB
ID:	1137354

    Note that the material is not showing as masked in the preview display.
    However, as you can see from the first screenshot, the masking appearently works somehow.

    Here are the actor details:

    Click image for larger version

Name:	Details.jpg
Views:	2
Size:	144.8 KB
ID:	1137355

    Again, the material is not showing as masked, the same way it appears in the content browser.


    Finally, a screenshot from the side view. As you can see, the decal actor is not tilted in any way, but the decal however is.
    Why is that?

    Click image for larger version

Name:	Wireframe.jpg
Views:	1
Size:	68.5 KB
ID:	1137356


    Can anyone shed a bit of light on thisone?

    Why is the decal tilted?
    Why is is not fully opaque?

    Cheers,
    Klaus

    #2
    Hi KVogler,

    I'm not sure about the rotated material like that. Can you possibly post the image asset here for me to test further as I've not been able to get that with a couple of the materials I've just tested.

    As for the Opaque value there is currently a limitation listed on our documentation for decals that are masked.

    Thanks!

    Tim
    Tim Hobson | Learning Resources | Epic Games
    UE4 Documentation

    Comment


      #3
      Hi Tim,

      Thank you for your swift reply.
      So I take it that there is nothing wrong with my decal opaqueness. Its rather (still) a not-so-strong part of UE4.
      I tried to upload the images but the forum keeps saying that they are no valid image files. They are plain TGA files.
      It seems that TGA is not allowed for attachments. I tried to be sneaky, renaming them to a benign BMP, but no luck.

      But here it is as a JPG:

      Click image for larger version

Name:	BiohazardDiffuse.jpg
Views:	1
Size:	168.7 KB
ID:	1053428

      And the Normal map:

      Click image for larger version

Name:	BiohazardNormal.jpg
Views:	1
Size:	120.4 KB
ID:	1053429

      Thanks for looking into this.

      Cheers,
      Klaus

      Comment


        #4
        Hi Klaus,

        First off, I had my leads add functionality to upload .tga files now so that shouldn't be a problem any longer.

        Secondly, I made the material based of your setup and applied it to a decal and a second copy that was setup the same except it was not a deferred decal for comparison.

        I, however, was not able to reproduce the result you got with it tilted as you can see in my image below.

        Click image for larger version

Name:	BioHazard.PNG
Views:	1
Size:	450.4 KB
ID:	1053430


        Is it only happening on this material? If you apply any other material to that particular decal render target does it tilt as well?

        Does placing a new deferred decal render target with your material produce the same results?
        Have you tried rebuilding your material to see if this replicates?

        I know this is a little bit to test but it could help narrow down the issues.

        Thank you!

        Tim
        Tim Hobson | Learning Resources | Epic Games
        UE4 Documentation

        Comment


          #5
          Hi Tim,

          Thanks for adding the TGA support. (Only the max filesize is set to 48 kByte, which might be a little short.. )

          I have made the following experiments:

          I created a new decal material with new textures (Unreal logo) :

          Click image for larger version

Name:	Material.jpg
Views:	1
Size:	192.5 KB
ID:	1053432

          With these properties:

          Click image for larger version

Name:	Properties.jpg
Views:	1
Size:	261.8 KB
ID:	1053433

          Note that thisone indeed shows the correct opacity in the preview window.

          The details look like this:

          Click image for larger version

Name:	Details.jpg
Views:	1
Size:	128.0 KB
ID:	1053434

          In the content browser, the file material is shows as:

          Click image for larger version

Name:	Browser.jpg
Views:	1
Size:	67.8 KB
ID:	1053435

          Then I added a new decal actor with this material:

          Click image for larger version

Name:	Viewport.jpg
Views:	1
Size:	194.6 KB
ID:	1053436

          As it can be seen, the logo is rotated 90°.

          Then I replaced the Biohazard material with the unreal logo for the first (left) decal actor.

          Click image for larger version

Name:	UnrealOnBiohazard.jpg
Views:	1
Size:	158.0 KB
ID:	1053437

          The rotation seems to come with the material, as here the image is also rotated by 90°.


          The same happened when I put the Biohazard material on the new actor:

          Click image for larger version

Name:	BiohazardOnNew.jpg
Views:	1
Size:	155.8 KB
ID:	1053440



          Then I recreated the Biohazard material from scratch.

          Now it looks correctly in the preview display and content browser.

          Click image for larger version

Name:	Browser2.jpg
Views:	1
Size:	76.3 KB
ID:	1053438

          However, when I create a new decal actor with that redone material, I still get the same tilt as before.

          Click image for larger version

Name:	Redone.jpg
Views:	1
Size:	167.4 KB
ID:	1053439

          The same happens when I recreate the Unreal logo material: 90° counter clockwise rotation.

          So, it might be that the rotation comes with the images themselves...
          Once the forum can handle the filesiye, I will upload them .

          Cheers,
          Klaus
          Last edited by KVogler; 08-12-2014, 01:47 PM.

          Comment


            #6
            Um....

            The following decal is "wrong" for the following reasons:
            - It is tilted by 45°. (see material screenshot below)
            If you tilt a biohazard symbol by 90 degrees CCW, it appears to only have turned 45 degrees, given its three-sided structure.


            Comment


              #7
              Did you by any chance rotate the mesh you are applying the decal to by 90 degrees before applying the decal? it might have something to do with it, maybe try un-rotating the mesh and try again.
              EDIT: Also this may be caused by exporting the mesh with Y-UP coordinates instead of Z-UP, maybe check that too.

              Just thought I would add that as well as the other suggestions.

              EDIT: as mentioned below, I just tested out what I wrote as well, and it had no effect on the decal, so nevermind that... Glad you got it figured out!
              Last edited by DotCam; 08-12-2014, 02:21 PM.
              Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

              Comment


                #8
                Hi All,


                @Crow
                Thanks for pointing this out.
                You are of course absolutely right on thisone.
                So it seems to be a "90° CCW off".


                @DotCam.
                The mesh is a solid brush that was placed before any decal actors and has never moved since.


                PS: When I rotate the actor by 90°, the decal rotates along and then displays correctly... It works, but has the look and feel of a quirk....

                Cheers,
                Klaus

                Cheers,
                Klaus
                Last edited by KVogler; 08-12-2014, 02:16 PM.

                Comment


                  #9
                  .TGA file size has been upped now. We turned it on but didn't quite set it right. Oops! It should be around 5mb now.
                  Tim Hobson | Learning Resources | Epic Games
                  UE4 Documentation

                  Comment


                    #10
                    Hi,

                    Can happen. I think you also need to set valid size constraints:

                    Click image for larger version

Name:	Dialog.JPG
Views:	1
Size:	58.0 KB
ID:	1053453

                    As an attempt to upload encounters the following error:

                    Click image for larger version

Name:	Error.JPG
Views:	1
Size:	50.9 KB
ID:	1053454

                    It can be any other cause of course, but the missing max cionstraints are likely candidates.

                    Cheers,
                    Klaus
                    Attached Files

                    Comment

                    Working...
                    X