Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[RELEASED] Marvelous Techniques

Discussion in 'Assets and Asset Store' started by Kirnu-Interactive, Aug 22, 2015.

  1. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
    Hi there, I'm looking for a way to have a simple 2-color linear gradient for my game's background. Sometimes during the game, one or both colors will change dynamically. I was wondering if this asset would work for this.
     
  2. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    Yes, Marvelous Techniques has a dedicated shader for this.

    -Arto
     
  3. Muhamad_Faizol

    Muhamad_Faizol

    Joined:
    Jan 21, 2017
    Posts:
    47
    Hi all,

    Can anyone point me in the right direction on how to combine the shader with baked ambient occlusion? I've emailed Arto but haven't got a reply so I thought I might be able to get some information on how to do it here.

    Thanks.

    Cheers,
     
  4. kobyle

    kobyle

    Joined:
    Feb 23, 2015
    Posts:
    92
    @Kirnu-Interactive, I am getting some artifacts while using the CustomLightingMaster.
    It doesnt happen if I switch to Standard Shader.

    Any clue?

     
  5. kobyle

    kobyle

    Joined:
    Feb 23, 2015
    Posts:
    92
    Is there a changelog for the package updates, in case I want to take a look?
     
  6. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    @Kirnu-Interactive I am using your plugin for about a year now, and thoroughly enjoying it. Thank you for creating it!

    I have a question about adding a texture in a specific way. My level is a simple arcade level consisting of few meshes (cubes only). Imagine a simple platform, made of 3 cubes for example.
    If I use color only, it will look like 1 solid object. If I add Main texture to it, you will see where 1 cube starts, and another one ends (especially since cube is scaled, so texture is scaled on that cube).
    My question is - would it be possible to add texture as projection onto surface only. I don't need fancy parameters, just for example 40% of texture projected onto all surfaces with certain shader/material. Maybe I can set scale in the material - but it would certainly ignore the scale of objects. And also, ideally, projection would be onto only 1 side (front).

    I hope this makes sense, and you can help me in some way.

    Kind regards,
    Kreso
     
  7. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    Hi,
    You can try to use UVLayoutGenerator to generate texture UVs for all cubes.
    You can see an example how to use it in the building scene.
    Look at the UVGenerator object under the _ROOT_ object.
     
    kreso likes this.
  8. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    This is quite neat! Almost completely what I need. Great!
    Unfortunately it doesn't work with the cubes that are built inside Unity Editor.
    If you have any ideas or clues how to make it work, please let me know.
     
  9. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    You didn't say how it didn't work.
    You can try to combine the meshes first using Tools->Marvelous->Combine Meshes script to combine the cubes
     
  10. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    Hello, I am terribly sorry for not saying more about the problem.
    I have tried combining meshes but had no success. The results are different if I use a mesh created by ProBuilder for example (UV Layout script works), but when I use Unity's cube (Game Objects->3D->Cube), the texture is scaled funny.
    I attached a screenshot here, that might help understand what I see on my end.
    So the 3 triangles (prisms) work exactly as I would expect, but the 4 squares (left, right, top, bottom) show like they are scaled.
    Does this help?

    Kind regards,
    Kreso
     

    Attached Files:

  11. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    The script is meant to be used in situations where the texture is more subtle like seamless rock texture.
    I think the answer to your problem is to model the level with blender or some Unity modeling asset. This way you can make the level look as you like and map the UVs the way they are supposed to be.
     
  12. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    I hear what you are saying. It would solve my problem if I used models from outside modeling tools or ProBuilder etc - as long as it's not Unity Editor's plain cube.

    The thing is I have hundreds of levels and this method does work. For example, if I swap meshes (in the MeshFilter component, via Inspector); from UnityEditor's cubes to meshes created by modeling tools, this will work. But I have a lot of cubes.

    I was just curious if you know why that UVLayout script handles Unity Editor's cube differently from modeling tool's cubes. And ideally a way around it.
    I really appreciate your time. I understand if my questions are outside the scope of support for this plugin.

    Kind regards,
    Kreso
     
  13. Member123456

    Member123456

    Joined:
    Oct 17, 2012
    Posts:
    237
    @Kirnu-Interactive Has this been tested on any of the 2018 betas yet? I tried it and I am getting really terrible results. Switched to 2017.4 and it works great.

    Capture.PNG
     
  14. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    I haven't tested it with 2018 versions yet.

    -Arto
     
  15. Member123456

    Member123456

    Joined:
    Oct 17, 2012
    Posts:
    237
    Turned out this issue was related to the fact that 2018 HQ render profile automatically sets the colorspace to linear. Setting back to gamma fixed it. However, on the lightweight render profile, this does not work at all. Its all black no matter what settings I change.
     
  16. rubble1

    rubble1

    Joined:
    Apr 25, 2010
    Posts:
    84
    Hi,

    I'm trying to use the bloom shader for the windows/details on a model using the custom lighting master shader. The problem is that the lit objects are visible from behind the faces.
    Is there something I can turn off to get it to stop doing this? ShaderProblemRender.jpg

    Thanks
     
  17. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    The bloom shader is meant to be used as image effect not as ordinary material shader. You can take look at example scenes about how the bloom shader is used.

    -Arto
     
  18. AndresSepulveda

    AndresSepulveda

    Joined:
    Mar 12, 2014
    Posts:
    52
    How can i use the Unity fog with this?
     
  19. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    You can't because custom lighting shader doesn't use Unity's fog.
     
  20. muhammad_ali_safdar

    muhammad_ali_safdar

    Joined:
    Jan 7, 2015
    Posts:
    15
    hi, what is new in update, version 1.3.2 ?
     
  21. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    The main change was to fix ocean shader so it works also in Direct X.
    There might have been some minor fixes which I don't remember.

    -Arto
     
    muhammad_ali_safdar likes this.
  22. davitsedrakian

    davitsedrakian

    Joined:
    Jun 23, 2018
    Posts:
    30
    Hey Guys, I have such question, I'm taking color from image, and using RGB, but marvellous is addind tint to any material, so my color is changing with tint effect, how to turn off tint effect ?
     
  23. rubble1

    rubble1

    Joined:
    Apr 25, 2010
    Posts:
    84
    Are these deferred shaders? Will this work with amplify impostors?
     
  24. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    The shaders are forward rendering shaders.
    I don't know how amplify impostors work so I can't say if the shaders work with it
     
    rubble1 likes this.
  25. painkiller2007

    painkiller2007

    Joined:
    May 25, 2013
    Posts:
    44
    Getting this error in 2018.3.2f1 :
    Shader error in 'Kirnu/Marvelous/CustomLightingMasterInstanced': not enough actual parameters for macro 'UNITY_ACCESS_INSTANCED_PROP' undeclared identifier 'UNITY_ACCESS_INSTANCED_PROP' at line 247 (on d3d11)

    Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH USE_FOG
    Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING

    @Kirnu-Interactive
     
  26. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    Hi,
    Can you contact me via email upload_2019-1-23_16-53-45.png so I can give you a new version for testing.

    -Arto
     

    Attached Files:

  27. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Hello, a new user here.
    May I ask if there is a shader which allows making world space gradient similar to screenshot?
    All those cubes are separate meshes.
    I have found a fog shader (CustomLightingSoftFog), but the result is not exactly what I am looking for.
    Thank you.
    Screen Shot 2019-02-08 at 10.21.42 PM.png
     
  28. chipity

    chipity

    Joined:
    Dec 21, 2016
    Posts:
    7
    Sent you an email regarding unity 2019
     
  29. Colibri

    Colibri

    Joined:
    Jul 2, 2012
    Posts:
    12
    Hi, I've just bought it, but I have issues with 2018 versions. Have these versions been tested and is this asset 'alive', for me to estimate the effort to continue with ? Regards
     
  30. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Hi, I've got a patch from the developer over the email. And seems no issues in the latest Unity. Try to write an email to them. I don't know why they didn't post an updated version to the store.


    @Kirnu-Interactive is there any way to change the direction of directional light in your shader?
    Also, localUV for whatever reason is creating not a vertical gradient on my model but based on depth.
     
  31. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    As @Almakos said I have new unreleased version available. You can get it by sending me an email.
     
    rubble1 likes this.
  32. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    There is a directional light test in the Test folder. There's a setup you can use to change the direction.
    There is also gradient test in the test folder where you can see you have to generate Height UVs with the UVHeightGenerator script.

    -Arto
     
    Almakos likes this.
  33. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Hey @Kirnu-Interactive, does this asset support distance shadow masking for light baking? I was trying out a similar asset which claimed it supports light mapping, but I would consider it partial support as distance shadow masking doesn't work i.e.) the model will pop back to full lighting outside the shadow render distance.
     
  34. boongea

    boongea

    Joined:
    Mar 2, 2015
    Posts:
    3
    Hello @Kirnu-Interactive, Is any way to change "Real time shadow color" ?
    If it can be, it would be great!
     
  35. Nijamyang

    Nijamyang

    Joined:
    Aug 8, 2012
    Posts:
    32
    Hello @Kirnu-Interactive, made an app with marvelous shaders, it's really great. On Android version the game looks perfect but on iOS on some devices it has black/white parts:





    i checked the mesh but it looks ok, do you have any idea why this happens? Regarding the blinking in the video the bug depends on the angle?
     
  36. Carrmichaelll

    Carrmichaelll

    Joined:
    Nov 30, 2016
    Posts:
    68
    Hi, i'm contemplating purchasing this tool but i need to know if it makes use of the lightweight render pipeline
     
  37. ibrahimpenekli

    ibrahimpenekli

    Joined:
    Mar 10, 2015
    Posts:
    29
    I changed my project to URP (Universal RP a.k.a. Lightweight RP) and Marvelous shader does not seem to work unfortunately.
     
  38. Carrmichaelll

    Carrmichaelll

    Joined:
    Nov 30, 2016
    Posts:
    68
    oh, thanks for the info!
     
  39. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    I have new version available for test which includes LWRP main lighting shader. Please contact me via email with your purchase info and I'll send the new version for you.
     
    ibrahimpenekli likes this.
  40. sier_ua

    sier_ua

    Joined:
    Jan 19, 2017
    Posts:
    6
    Hi Guliz,
    I'm experiencing the same issue, also on some iOs devices only (all fine on other platforms). Have you figured out what is the problem?
     
  41. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    @Kirnu-Interactive hi,

    I've been using this asset for few years now (same game).
    Redoing another polish pass I wanted to add some elements to my background. Some mountaintops. I'd like these mountain tops to have each it's own gradient (fog like) so they look scattered around (different scale even perhaps).
    I like to hide the mountain's base, and discover toward the top of the mountain. Since there is quite a few mountain tops I'd like to use the same material. I tried using it as Gradient (with local UV), or with Fog (setting the Y).

    example:


    I am curious - is there currently a way to use game objects local position to calc the colors?
    All this in the interest of saving some draw calls.
    I hope this makes sense :)

    Thanks!

    P.S. I noticed a new option using the Master shader, under Distance light ('Multi'). Once 'Multi' is ticked - it can't be unticked. Unticking it will remove the 'use local' under 'gradient' option instead of itself).
     
  42. plufz

    plufz

    Joined:
    May 26, 2020
    Posts:
    11
    Hi!

    I'm having some trouble trying out the shaders (probably me doing something wrong). I'm opening your scenes in my standard "3D" project and many of the scenes look weird. Some looks better after a minute or so, others dont. The lighthouse also seems to totally kill my macbook pro performance wise. See attached images.

    https://www.dropbox.com/s/5b0rteny8yovzsg/Screenshot 2020-06-22 23.38.16.png?dl=0
    https://www.dropbox.com/s/qgnorfq0uukd7z1/Screenshot 2020-06-22 23.43.02.png?dl=0

    Also, are there no example scenes for URP included?

    All the best!

    Emil
     
  43. BIMLAB

    BIMLAB

    Joined:
    Sep 4, 2014
    Posts:
    1
  44. zhulaober

    zhulaober

    Joined:
    Jan 19, 2016
    Posts:
    21
    I use the plugin in my VR project. I used the CustomLightingMaster shader for mountains and stones in my scene. I found there are always some cracks and flickers on the models here and there, and I change the shader to unity standard shader, the cracks and flickers go away. Is this because of the rendering process of the plugin? How can I fix this problem.

    ps: Even not in VR, in the scene view I can see the cracks from some angle as it shows in the pic.
    I have tried to modify models, but not get any result.
     

    Attached Files:

    • 01.png
      01.png
      File size:
      10 KB
      Views:
      296
    • 02.png
      02.png
      File size:
      6.7 KB
      Views:
      339
  45. neptoonism

    neptoonism

    Joined:
    Aug 19, 2019
    Posts:
    18
    @Carrmichaelll @ibrahimpenekli
    I ported each shader so it is URP compatible, not sure if other people might get excited about that - I tried to jam some info about what gets changed in each shader into a review, but after realizing that you can keep the shaders as-is and just add the "LightMode" = "LightweightForward" tag to them and see them work without additional changes, I just put that in the review. I tend to assume that everybody wants to use URP if they can since I tend to think that way.

    That alone will get the shaders working, however if you actually go through the trouble of replacing 'UnityCG.cginc' with these
    #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    #include "MarvelousLWRP.cginc"
    and make the edits listed below, you're using the newer shader library and lighting.
    1. add "LightMode" = "LightweightForward" tag inside of the 'Pass' block as previously mentioned.
    2. replace CGPROGRAM and ENDCG with HLSLPROGRAM and ENDHLSL
    3. replace #include "Marvelous.cginc" or 'UnityCG.cginc' with the two includes mentioned above
    4. replace any use of UnityObjectToClipPos with TransformObjectToHClip
    5. replace any use of flixed4 with float4
    6. for the Ocean shaders, replace the line in the getColorDepth function where sceneZ variable is set to this
    float sceneZ = LinearEyeDepth(tex2Dproj(_CameraDepthTexture, i.projPos).r, _ZBufferParams);

    That's it for the most part, and like I said, just following step 1 is really all that's needed to see the shader work on URP. It's still not clear to me exactly what advantages you get in using Core.hlsl and Lighting.hlsl instead of UnityCG.cinc are, but I thought some other people might be trying to do this and running into errors.
     
    kreso likes this.
  46. zhulaober

    zhulaober

    Joined:
    Jan 19, 2016
    Posts:
    21
    How to modify the CustomLightingMaster shader to expose the tiling ?
     
  47. zhulaober

    zhulaober

    Joined:
    Jan 19, 2016
    Posts:
    21
    Did you solve the white line problem? I met too, lots of in many scenes.
     
  48. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    This might happen because of a precision problem in the shader. Please contact me and I'll provide you the modified shader for testing
     
    zhulaober likes this.
  49. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,145
    Hey,

    i just imported the latest version in a URP project and i got plenty of errors... can't find info on how to import it for URP projects, also the errors seems related to the Post Processing which seems to be required but as far as i know it does not work with URP projects which come with it's own post processing.

    How to properly import the latest version in a URP project !?

    upload_2021-7-15_15-59-2.png
     
  50. Kirnu-Interactive

    Kirnu-Interactive

    Joined:
    May 5, 2014
    Posts:
    157
    Did you forget to add Universal RP package to the project?