Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shader Forge - A visual, node-based shader editor

Discussion in 'Assets and Asset Store' started by Acegikmo, Jan 11, 2014.

  1. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
  2. Deleted User

    Deleted User

    Guest

  3. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115
    Acegikmo likes this.
  4. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    so for those of us who aren't familiar with shaders... is this full unity 5 support, preliminary unity 5 support, etc? what works, what doesn't, etc.

    thx mate.
     
  5. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
  6. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    231
  7. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    It depends on how you define "preliminary"! It will support the new dynamic GI/lightmapping system, light probes, new ambient sky, Unity's PBR BRDF, and such. Was there anything in particular you had in mind?
     
  8. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    I'm currently in need of adding a warning system to SF, to intuitively fix bugs like the one where you can't connect alpha without having alpha blending on.

    Apart from lightmapping warnings - what type of warnings would you like to see, for some common mistakes you can create in SF?
     
  9. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    269
    If I remember correctly, SF already shows the total number of instructions used somewhere.
    Is it possible to extend it so we see a warning when shader gets computationally heavy by a user set limit.

    I'm not sure if its an easy task to understand if a shaders is heavy or not but I always find my self adding more properties to a shader and later thinking about quality vs. speed.

    It would be useful to see a "shader tachometer" if its a feasible thing.
     
  10. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    can you share you shader forge node screenshot?
     
  11. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    Is there any easy way to use the forward direction relative to the camera (not view direction) in Shader Forge? I tried using a Vector3 set to 0,0,1 but any attempts at using the transform node gave me unreliable results.
     
  12. ChaosWWW

    ChaosWWW

    Joined:
    Nov 25, 2009
    Posts:
    470
    Hey, I have some questions in regard to this tool and Unity 5 if you don't mind!

    The main thing I'm curious about is what kind of PBR workflow can we expect to see in the future from Shader Forge? Will there be main node inputs for roughness and metalness, and alt nodes for specular and gloss? Will just one or the other method be supported or will there be both?

    My other question is when can we expect to see support for Unity 5's PBS stuff with shader forge? I'm developing something within the next month that I plan to use Unity 5 and physically based shading for, and being able to use shader forge will be incredibly valuable, which is why I'm asking.

    Thanks, and excellent work! I've got to say that shader forge has been hands down the most useful tool I have bought from the asset store.
     
  13. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    The instruction counter in SF is broken when used in Unity 4.5 or later, I believe. It might make it back in some version, but it's not prioritized at the moment.

    You should be able to simply transform 0,0,1 from view to world

    The idea is to support both the metalness and the spec-gloss workflow, when Unity has somewhat built-in support for it in their PBR shader. I've already made SF use the current Unity 5 PBR code, but I'm not quite finished. I have yet to make lightmaps work.

    This week, I'm going to meet up with Renaldas, who is working on the Unity 5 PBR code, and work together to implement it properly into SF :)

    And yes, the spec/gloss & metalness/roughness will be main node inputs, which will change name depending on which mode you're using.

    When? Shortly after some point during next week, probably.

    Thanks for the kind words! Glad you find SF useful :)
     
    ChaosWWW likes this.
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    ...Well I feel foolish. I kept doing it the other way around.
     
  15. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
  16. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    You need a heightmap to do that properly, the normals don't have any height information at all
     
  17. Deleted User

    Deleted User

    Guest

    Glow system (made by me with unity free) :D :D :D

    Now i must only find a way to combine the submeshes and reduce the drawcalls

     
    Last edited by a moderator: Dec 15, 2014
  18. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Hey.

    I'm trying to get SF to remap the shading based on a texture map. Top left is the defult diffuse shading, top right is the remap map. Now I can lerp the remapped shadings with a texture map mask like bottom left but it's not what i'm looking for. I want to create something like bottom right which remaps the shading based on the texture map values rather than just masking it.

    I looked at the remap, (not the simple one) but couldn't figure it out. How would I go about doing this ?

     
  19. Deleted User

    Deleted User

    Guest

    Ok i have solved the problem with combine :D

    Now glow take only 5 drawcalls :D

    P.S = A point light is included for reflection ;)

     
    Last edited by a moderator: Dec 15, 2014
    Deon-Cadme, Gekigengar and red2blue like this.
  20. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    Hi guys, quick question:
    I want to detect edges of the mesh and blend them out (fade them to transparent).
    I am already using a "Depth Blend" node with great success, but it only works when geometry is intersecting the drawn mesh. (I'm just multiplying the depth blend into the diffuse map)

    Now I also want to blend hard edges in the geometry I'm rendering.
    I need something like edge-detect => some small blur effect => also multiply with the diffuse map.

    I think I can get the last two steps to work by myself, but how would I detect edges in shaderforge?
    Not intersections with other geometry, just the edges on the mesh I'm rendering
     
  21. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    Shader only works after ShaderForge Window has been opened.

    I created an unlit shader that worked great. The problem is that when I quit and reopen Unity, the shader renders black. It doesn't start working again until I open the ShaderForge Window.

    I have sent you pm with a link to a video showing the problem and the shader.

    Thanks in advance.
     
  22. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    It appears this is caused if you have more than 8 textures. I have a whole a number of alpha masks used to color different parts of the model. I recreated this with by creating a new shader. Please advise.
     
  23. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    I am moving the alpha masks to the RGB channels for a workaround. It will be more efficient anyway. Still curious if there is a technical limit.
     
  24. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Thank you very much for your answer! For a heightmap I can use a simple greyscale image, right? So if I used a bumpmap for generating the normal map in Unity, I could also use the original greyscale-bumpmap for accessing the height?
     
  25. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Nope, it's not possible, sadly. Your best bet is to bake a texture that is white along the hard edges, and try to modify it with that.

    There is a texture limit, which I believe is around 10 or 12. Unity uses textures for its own internal lighting effects, which is why you're hitting the limit earlier.

    Yep! Commonly, you put it in the alpha channel of your normal map. In Unity, you have to mark it as a regular texture rather than a normal map though, to access the alpha channel. In which case you also have to unpack it manually. (Remap from 0, 1 to -1, 1)
     
  26. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Remapping based on the texture map values sounds exactly like what you're doing, with Lerp, no?
    Not sure what you're trying to do. Remap what? The NdotL falloff? Blend between two shading methods?
     
  27. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Ah, nevermind. Apparently not clamping and lerping between the values with a texture map mask solves the problem.
     
  28. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Thank you very much for your answer! So if I understand this correctly, I will just have two copies of the bumpmap.
    One of the bumpmaps is marked as normal map and the other one isn't. Then, I use the remap node on the bumpmap that isn't marked as a normalmap and use the result for blending, right?

    EDIT:
    Now that I've searched for heightmaps again, I guess
    "
    Advance blending using height maps
    "
    ( http://acegikmo.com/shaderforge/wiki/index.php?title=Advanced_Texture_Splatting )
    talks about exactly what I'm looking for!
    I will give this a try.

    EDIT2:
    Okay, I just did it. Somewhat.
    I uploaded the results and its pretty much what I wanted except that at some point the inner color (blue) should not be speckled with the other color (green) any more. Could I do this easily somehow?
    Also, it would be nice to have a control about how far the blue reaches into the green.

    EDIT3:
    Just for further information:
    The last images show a scenario where I repeat all of the textures 50 times over a plane except for the splatmap which is only applied once.

    Also, if someone has an idea on how to solve this: It may take me some time to respond.
     

    Attached Files:

    Last edited: Dec 16, 2014
  29. Vladnes

    Vladnes

    Joined:
    Jul 5, 2014
    Posts:
    51
    How to make a shader blood? I mean how to make a fake reflection. I tried to do with cubic shader card, but it does not work on the particles.
    The problem is how to make a reflection of the particles
     
  30. Vladnes

    Vladnes

    Joined:
    Jul 5, 2014
    Posts:
    51

    Left- shader on the plane, right on the particle. Why shader does not work on the particles and how to make that work?
    My shader setup

    Works only on mesh particles, but I have stretched billboard
     
    Last edited: Dec 17, 2014
  31. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    another quick question:
    how would I make a projector shader in shaderforge?
    how do I re-create the unity's default "Projector/Multiply" shader in shaderforge?
     
  32. bizilux1

    bizilux1

    Joined:
    Jun 6, 2013
    Posts:
    151
    hey all... i have a problem.

    i've been trying to learn shaderforge, but there cant seem to be any documentation? :S just very vague one on your website about nodes?

    anyways... i have problem with cubemap. it is fuzzy. not clear, its not blurred either, its just fuzzy. check picture
    and i also attached picture of shaderforge, i tried putting cubemap into transmission, emission, no luck, its fuzzy all the time.
    PS: just focus on windows. other stuff dont have proper specular map, im just trying to get it to work on windows first.
    PSS: here is a picture from which cubemap was made: https://acuteconsulting.files.wordpress.com/2014/09/nyc.jpg
     

    Attached Files:

    • x107.JPG
      x107.JPG
      File size:
      115.3 KB
      Views:
      1,087
    • x108.JPG
      x108.JPG
      File size:
      120.2 KB
      Views:
      1,537
  33. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115
    @bizilux1 it looks like the normalmap is creating the fuzzyness.
     
  34. neroziros

    neroziros

    Joined:
    Aug 25, 2012
    Posts:
    129
    Of course no problem,

    sf_matte_gradient_color_12182014.png

    Bear in mind that this is the base shader without the full black shadows. To get that effect you must change the spotlights pass' blending mode from "Blend one one" to "Blend DstAlpha one" manually (I didn't see a way to do this through Shaderforge).

    Cheers

    P.S:
    Code (CSharp):
    1. // Shader created with Shader Forge Beta 0.34
    2. // Shader Forge (c) Joachim Holmer - http://www.acegikmo.com/shaderforge/
    3. // Note: Manually altering this data may prevent you from opening it in Shader Forge
    4. /*SF_DATA;ver:0.34;sub:START;pass:START;ps:flbk:,lico:1,lgpr:1,nrmq:1,limd:0,uamb:True,mssp:True,lmpd:False,lprd:True,enco:False,frtr:True,vitr:True,dbil:False,rmgx:True,rpth:0,hqsc:True,hqlp:False,blpr:0,bsrc:0,bdst:1,culm:0,dpts:2,wrdp:True,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,ofsf:0,ofsu:0,f2p0:False;n:type:ShaderForge.SFN_Final,id:0,x:32136,y:31953|normal-83-RGB,custl-64-OUT,olwid-288-OUT;n:type:ShaderForge.SFN_Dot,id:40,x:32977,y:32541,dt:1|A-42-OUT,B-41-OUT;n:type:ShaderForge.SFN_NormalVector,id:41,x:33336,y:32604,pt:True;n:type:ShaderForge.SFN_LightVector,id:42,x:33336,y:32490;n:type:ShaderForge.SFN_Add,id:55,x:32903,y:32230|A-84-OUT,B-187-RGB;n:type:ShaderForge.SFN_LightColor,id:63,x:32728,y:32073;n:type:ShaderForge.SFN_Multiply,id:64,x:32480,y:32125|A-63-RGB,B-310-OUT,C-393-OUT;n:type:ShaderForge.SFN_Color,id:80,x:33256,y:32248,ptlb:Color,ptin:_Color,glob:False,c1:0.9338235,c2:0.9544226,c3:0.9544226,c4:1;n:type:ShaderForge.SFN_Tex2d,id:82,x:33256,y:32072,ptlb:Diffuse,ptin:_Diffuse,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Tex2d,id:83,x:32419,y:31841,ptlb:Normals,ptin:_Normals,tex:c6dfb00dbee6bc044a8a3bb22e56e064,ntxv:3,isnm:True;n:type:ShaderForge.SFN_Multiply,id:84,x:33051,y:32145,cmnt:Diffuse Light|A-82-RGB,B-80-RGB;n:type:ShaderForge.SFN_AmbientLight,id:187,x:33102,y:32373;n:type:ShaderForge.SFN_ValueProperty,id:288,x:32399,y:32431,ptlb:Outiline,ptin:_Outiline,glob:False,v1:0.01;n:type:ShaderForge.SFN_Min,id:310,x:32728,y:32259|A-55-OUT,B-40-OUT;n:type:ShaderForge.SFN_LightAttenuation,id:393,x:32680,y:32407;proporder:80-82-83-288;pass:END;sub:END;*/
    5.  
    6. Shader "Redline/Matte Gradient Color" {
    7.     Properties {
    8.         _Color ("Color", Color) = (0.9338235,0.9544226,0.9544226,1)
    9.         _Diffuse ("Diffuse", 2D) = "white" {}
    10.         _Normals ("Normals", 2D) = "bump" {}
    11.         _Outiline ("Outiline", Float ) = 0.01
    12.     }
    13.     SubShader {
    14.         Tags {
    15.             "RenderType"="Opaque"
    16.         }
    17.         Pass {
    18.             Name "Outline"
    19.             Tags {
    20.             }
    21.             Cull Front
    22.          
    23.             Fog {Mode Off}
    24.             CGPROGRAM
    25.             #pragma vertex vert
    26.             #pragma fragment frag
    27.             #include "UnityCG.cginc"
    28.             #pragma fragmentoption ARB_precision_hint_fastest
    29.             #pragma multi_compile_shadowcaster
    30.             #pragma exclude_renderers gles xbox360 ps3 flash
    31.             #pragma target 3.0
    32.             uniform float _Outiline;
    33.             struct VertexInput {
    34.                 float4 vertex : POSITION;
    35.                 float3 normal : NORMAL;
    36.             };
    37.             struct VertexOutput {
    38.                 float4 pos : SV_POSITION;
    39.             };
    40.             VertexOutput vert (VertexInput v) {
    41.                 VertexOutput o;
    42.                 o.pos = mul(UNITY_MATRIX_MVP, float4(v.vertex.xyz + v.normal*_Outiline,1));
    43.                 return o;
    44.             }
    45.             fixed4 frag(VertexOutput i) : COLOR {
    46.                 return fixed4(float3(0,0,0),0);
    47.             }
    48.             ENDCG
    49.         }
    50.         Pass {
    51.             Name "ForwardBase"
    52.             Tags {
    53.                 "LightMode"="ForwardBase"
    54.             }
    55.          
    56.          
    57.             Fog {Mode Off}
    58.             CGPROGRAM
    59.             #pragma vertex vert
    60.             #pragma fragment frag
    61.             #define UNITY_PASS_FORWARDBASE
    62.             #include "UnityCG.cginc"
    63.             #include "AutoLight.cginc"
    64.             #pragma multi_compile_fwdbase_fullshadows
    65.             #pragma exclude_renderers gles xbox360 ps3 flash
    66.             #pragma target 3.0
    67.             uniform float4 _LightColor0;
    68.             uniform float4 _Color;
    69.             uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST;
    70.             uniform sampler2D _Normals; uniform float4 _Normals_ST;
    71.             struct VertexInput {
    72.                 float4 vertex : POSITION;
    73.                 float3 normal : NORMAL;
    74.                 float4 tangent : TANGENT;
    75.                 float2 texcoord0 : TEXCOORD0;
    76.             };
    77.             struct VertexOutput {
    78.                 float4 pos : SV_POSITION;
    79.                 float2 uv0 : TEXCOORD0;
    80.                 float4 posWorld : TEXCOORD1;
    81.                 float3 normalDir : TEXCOORD2;
    82.                 float3 tangentDir : TEXCOORD3;
    83.                 float3 binormalDir : TEXCOORD4;
    84.                 LIGHTING_COORDS(5,6)
    85.                 float3 shLight : TEXCOORD7;
    86.             };
    87.             VertexOutput vert (VertexInput v) {
    88.                 VertexOutput o;
    89.                 o.uv0 = v.texcoord0;
    90.                 o.shLight = ShadeSH9(float4(mul(_Object2World, float4(v.normal,0)).xyz * unity_Scale.w,1)) * 0.5;
    91.                 o.normalDir = mul(float4(v.normal,0), _World2Object).xyz;
    92.                 o.tangentDir = normalize( mul( _Object2World, float4( v.tangent.xyz, 0.0 ) ).xyz );
    93.                 o.binormalDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w);
    94.                 o.posWorld = mul(_Object2World, v.vertex);
    95.                 o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    96.                 TRANSFER_VERTEX_TO_FRAGMENT(o)
    97.                 return o;
    98.             }
    99.             fixed4 frag(VertexOutput i) : COLOR {
    100.                 i.normalDir = normalize(i.normalDir);
    101.                 float3x3 tangentTransform = float3x3( i.tangentDir, i.binormalDir, i.normalDir);
    102. /////// Normals:
    103.                 float2 node_414 = i.uv0;
    104.                 float3 normalLocal = UnpackNormal(tex2D(_Normals,TRANSFORM_TEX(node_414.rg, _Normals))).rgb;
    105.                 float3 normalDirection =  normalize(mul( normalLocal, tangentTransform )); // Perturbed normals
    106.                 float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz);
    107. ////// Lighting:
    108.                 float attenuation = LIGHT_ATTENUATION(i);
    109.                 float3 finalColor = (_LightColor0.rgb*min(((tex2D(_Diffuse,TRANSFORM_TEX(node_414.rg, _Diffuse)).rgb*_Color.rgb)+UNITY_LIGHTMODEL_AMBIENT.rgb),max(0,dot(lightDirection,normalDirection)))*attenuation);
    110. /// Final Color:
    111.                 return fixed4(finalColor,attenuation);
    112.             }
    113.             ENDCG
    114.         }
    115.         Pass {
    116.             Name "ForwardAdd"
    117.             Tags {
    118.                 "LightMode"="ForwardAdd"
    119.             }
    120.             Blend DstAlpha one
    121.          
    122.          
    123.             Fog { Color (0,0,0,0) }
    124.             CGPROGRAM
    125.             #pragma vertex vert
    126.             #pragma fragment frag
    127.             #define UNITY_PASS_FORWARDADD
    128.             #include "UnityCG.cginc"
    129.             #include "AutoLight.cginc"
    130.             #pragma multi_compile_fwdadd_fullshadows
    131.             #pragma exclude_renderers gles xbox360 ps3 flash
    132.             #pragma target 3.0
    133.             uniform float4 _LightColor0;
    134.             uniform float4 _Color;
    135.             uniform sampler2D _Diffuse; uniform float4 _Diffuse_ST;
    136.             uniform sampler2D _Normals; uniform float4 _Normals_ST;
    137.             struct VertexInput {
    138.                 float4 vertex : POSITION;
    139.                 float3 normal : NORMAL;
    140.                 float4 tangent : TANGENT;
    141.                 float2 texcoord0 : TEXCOORD0;
    142.             };
    143.             struct VertexOutput {
    144.                 float4 pos : SV_POSITION;
    145.                 float2 uv0 : TEXCOORD0;
    146.                 float4 posWorld : TEXCOORD1;
    147.                 float3 normalDir : TEXCOORD2;
    148.                 float3 tangentDir : TEXCOORD3;
    149.                 float3 binormalDir : TEXCOORD4;
    150.                 LIGHTING_COORDS(5,6)
    151.             };
    152.             VertexOutput vert (VertexInput v) {
    153.                 VertexOutput o;
    154.                 o.uv0 = v.texcoord0;
    155.                 o.normalDir = mul(float4(v.normal,0), _World2Object).xyz;
    156.                 o.tangentDir = normalize( mul( _Object2World, float4( v.tangent.xyz, 0.0 ) ).xyz );
    157.                 o.binormalDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w);
    158.                 o.posWorld = mul(_Object2World, v.vertex);
    159.                 o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    160.                 TRANSFER_VERTEX_TO_FRAGMENT(o)
    161.                 return o;
    162.             }
    163.             fixed4 frag(VertexOutput i) : COLOR {
    164.                 i.normalDir = normalize(i.normalDir);
    165.                 float3x3 tangentTransform = float3x3( i.tangentDir, i.binormalDir, i.normalDir);
    166. /////// Normals:
    167.                 float2 node_415 = i.uv0;
    168.                 float3 normalLocal = UnpackNormal(tex2D(_Normals,TRANSFORM_TEX(node_415.rg, _Normals))).rgb;
    169.                 float3 normalDirection =  normalize(mul( normalLocal, tangentTransform )); // Perturbed normals
    170.                 float3 lightDirection = normalize(lerp(_WorldSpaceLightPos0.xyz, _WorldSpaceLightPos0.xyz - i.posWorld.xyz,_WorldSpaceLightPos0.w));
    171. ////// Lighting:
    172.                 float attenuation = LIGHT_ATTENUATION(i);
    173.                 float3 finalColor = (_LightColor0.rgb*min(((tex2D(_Diffuse,TRANSFORM_TEX(node_415.rg, _Diffuse)).rgb*_Color.rgb)+UNITY_LIGHTMODEL_AMBIENT.rgb),max(0,dot(lightDirection,normalDirection)))*attenuation);
    174. /// Final Color:
    175.                 return fixed4(finalColor * 1,0);
    176.             }
    177.             ENDCG
    178.         }
    179.     }
    180.     FallBack "Diffuse"
    181.     CustomEditor "ShaderForgeMaterialInspector"
    182. }
     
    Last edited: Dec 18, 2014
  35. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Particles generally have issues with lighting and positioning. I'm not sure if it's possible.
    Also, you should mark your normal map as a normal map, otherwise you'll get incorrect normal data

    I would guess it's possible using the code node, and looking at how Unity did their shader, and translate it to SF nodes, but I'm not entirely sure.

    There's the node documentation you mentioned, but also the video tutorials, the wiki, and the included example shaders :)
     
  36. bizilux1

    bizilux1

    Joined:
    Jun 6, 2013
    Posts:
    151
    wow. thanks alot... now cubemap is crisp, without normalmap. BUT... now i dont have normal maps lol. As you can see in attached picture of normalmap, it is very well done, baked from highpoly window. So how can i fix this? I need to have normal maps. that is for sure.
     

    Attached Files:

    • x110.JPG
      x110.JPG
      File size:
      34.4 KB
      Views:
      1,039
    • x109.JPG
      x109.JPG
      File size:
      99.6 KB
      Views:
      1,022
  37. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115
    @bizilux1 Hmm... and you are sure that the model has proper uvs? if that happens and the normal here is flat it seems that some uvs were mixed.
     
  38. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    @bizilux1
    I think the problem is your cubemaps. If it's a 360 HDRI map you should use cylinderical mapping.
    Try putting the cubemap to a sphere to see if it works perffectly.
     
  39. Deleted User

    Deleted User

    Guest

    New features added :)

    P.S = Sorry for low quality video.

     
  40. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
  41. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    I can't really tell what the shader does. Does it glow any mesh it is applied ?
     
  42. Deleted User

    Deleted User

    Guest

    Yes...all system is based on multiple self copy of object that contain the script...a torus in this case (i know, it's heavy for tris and verts, but i think that LOD can resolve this problem), this copies contains a shader that acquire color from a point light (light color node), for the rest the main script extrude normal and combine all mesh in one (or more split) for recreate a sort of diffuse mantle.

    Maybe it's not a brilliant idea, but it's only that i have think in this last days :D

    P.S = Sorry for my bad english :/
     
    Last edited by a moderator: Dec 19, 2014
  43. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Can you show it on a different more complex mesh ?
     
  44. Deleted User

    Deleted User

    Guest

    Are needed smoothed mesh for make a good glow.

     
    Last edited by a moderator: Dec 19, 2014
  45. Deleted User

    Deleted User

    Guest

    Another thing, i not able to be find anything (anything of working) about combine skinned mesh, someone of you know some good script?
     
  46. bizilux1

    bizilux1

    Joined:
    Jun 6, 2013
    Posts:
    151
    @DaDarkDragon i think model has proper UV. normal maps are placed on top of diffuse maps, you can check picture x111, its without cubemap, only diffuse,normal,specular. so yeh it looks great.

    @Cactus_on_Fire well, i tried all 5 different cubemap mappings, none did the trick. it looked fuzzy all the time. i attached picture of windows using cubemap that comes together with shaderforge!, its Cubemap_Sunny1, and you can see how fuzzy clouds are.
     

    Attached Files:

    • x111.JPG
      x111.JPG
      File size:
      62.7 KB
      Views:
      1,024
    • x112.JPG
      x112.JPG
      File size:
      80.2 KB
      Views:
      995
  47. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    ...

    Click on cubemap_sunny1 in your asset inspector and set the face size to something higher. Also remember that the textures used by cubemap_sunny1 are only 512x512, so you may have to change their max size as well.
     
  48. bizilux1

    bizilux1

    Joined:
    Jun 6, 2013
    Posts:
    151
    i tried. i've set them to their max size, aswell as face size on cubemap. high as it can go is 1024px. it made no difference, something else is the problem.
    its not the problem that they aint crisp enough, its not textures, its something else... its that fuzziness. thats not from textures, im sure.
     
  49. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    Is there a cheap and dirty way to access worldNormal from ShaderForge or am I going to have to use the code node?
     
  50. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115