Unity Community


Page 2 of 2 FirstFirst 12
Results 21 to 34 of 34

  1. Location
    Winchester, VA, USA
    Posts
    21
    Quote Originally Posted by Marble
    Is there a special way to prepare the transparent water material to use it with a different mesh? I'm getting this "smearing" effect when I apply it to an imported mesh, as if its uvs were weird.
    I'm not quite sure how the shader handles the texture, but it seems to be a planar projection. The problem you're having is that your 3D app loks at the axes differently than unity. In your 3D app (which one are you using by the way?) you may have to rotate the water mesh 90 degrees on one of the axes (most likely x), re-export it and correct the rotation in unity.

  2. Volunteer Moderator
    Posts
    23,719
    I'm not having any issues applying the water material to arbitrary objects here. Actually it's pretty darn cool-looking; I hadn't really thought of using anything other than a plane before. Wonder if I can find some use for that....

    --Eric


  3. Location
    Tucson, AZ
    Posts
    849
    Thanks. I was just plopping the material onto other meshes and thinking it would work. I suppose this is a classic case of using something without understanding how it runs!


  4. Location
    Massachusetts
    Posts
    1,796
    Sorry to super-gravedig, but I want to use this in Unity and I can't seem to get it transparent anymore. I've changed the Alpha channel on that image, but nothing happens. I have an Intel iMac now, so Graphics Card shouldn't be a problem. Shed some light Unity Community! Thanks!
    Try my new Android game Starling Fall (forum thread)!
    And check out my other Android apps


  5. Location
    Massachusetts
    Posts
    1,796
    Ah, got it transparent, but the waves are gone. Any reason why?
    Try my new Android game Starling Fall (forum thread)!
    And check out my other Android apps


  6. Location
    Tuscon, Arizona, United States
    Posts
    213
    Quote Originally Posted by Aras Pranckevicius
    You can just do something like
    Code:  
    1. col.a = 0.5;
    Or better yet, expose it as a color property that can be tweaked. Otherwise, the fresnel is read from the Color/fresnel texture; if you want alpha to be different from fresnel maybe it makes sense to expose a new texture that just controls alpha.


    Code:  
    1. cola water


    ROFLMAO!



    What does that part do anyway?

  7. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    Quote Originally Posted by Ghost
    Code:  
    1. cola water
    ROFLMAO!

    What does that part do anyway?
    What are you actually talking about?


  8. Location
    Tuscon, Arizona, United States
    Posts
    213
    Code:  
    1. col.a = 0.5;


    What Does That Do?


  9. Posts
    890
    lowers the alpha value (opacity, transparency, trnaslucency,) to .5 (the values range from 0.0 to 1.0, 0.0 being fully transparent).

    Think RGBA color values.


  10. Location
    Massachusetts
    Posts
    1,796
    It would seem that this shader doesn't work in Unity 2. I'm messing with the new Water Shader to see if I can gift it transparency, but I'm pretty bad at ShaderLab.
    Try my new Android game Starling Fall (forum thread)!
    And check out my other Android apps

  11. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    The water used in Island Demo that comes with Unity actually uses a transparent water. You might try just using that (it's in Water folder in the project IIRC).


  12. Location
    Massachusetts
    Posts
    1,796
    Yeah, I noticed and snagged it. :P It should really be in the Standard Assets.
    Try my new Android game Starling Fall (forum thread)!
    And check out my other Android apps

  13. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    The reason it is not is because water often tends to be a large object. And large transparent objects can cause all sorts of transparency sorting problems when there are multiple transparent objects in the scene.

    In island demo the water is about the only thing that is transparent, so there are no problems. But in general case it might not be that useable.

  14. RHD RHD is offline

    Location
    London, UK
    Posts
    608
    Hi,

    I'm a newbie I'm afraid and I'm having some trouble wuth this.
    I get a load of error messages and the waves don't move:

    Could you give me some more detailed instructions?

    Unity Indie 2.5

    Thanks a million!

    Quote Originally Posted by Aras
    Here's the modified Non-reflective water shader from Unity 1.5, made to be transparent based on fresnel. Just add this to project and select new shader in water material.

    The changes were: added
    Code:  
    1. Tags { "Queue" = "Transparent" }
    2. Blend SrcAlpha OneMinusSrcAlpha
    3. ColorMask RGB
    at start of each SubShader; this puts water into Transparent objects rendering queue, sets up standard blending and sets it to not modify alpha (just in case you'll want glow...).

    Then I set both fragment program and R9000 subshaders to output fresnel into alpha:
    Code:  
    1. col.a = water.a;
    at end of fragment program and
    Code:  
    1. MOV r0.a, r2.a;
    at end of R9000 fragment assembly shader
    Attached Images  

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •