A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Works In Progress - Archive' started by Tim-C, Aug 2, 2010.
Only works on Pro version of Unity.
Can you raise a bug against unity for this? It should not do this.
SSE is for surface shaders, so it's best not to use it for unlit things.
I got this shader setup:
...and there's this annoying bug with lighting:
Here's the sgraph:
and the shader:
Does anybody know how to fix this? I've searched on Google and only found this thread which has no answer...
i want help about real time sub-surface scattering shader?is it possible in SSE?i am null in shader programming.
i am only depend on Strumpy Shader Editor.
Is there a way to bias the mip maps on a texture within the shader at runtime?
hi i'm trying to make a shader similar to the builtin 3d text where you can see it through geometry but i want it opaque and at the same time be able to recieve shadows, i'm not worried about casting them lol.
so here's what i got so far:
and here's the graph:
and yes i'm trying to do the same thing as someone would do with the camera trick like using layers and set it to depth only but it's not so great, first i can't recieve shadows from other geometry since it's being drawn on top of everything through the camera, screen effects don't work correctly and i get lighting on the model even if i'm on a darker area since it's drawn on top of everything.
anyhow i'm trying to make it as a shader so far it works but if you look at the picture the objects in it are being drawn on top of each other like if they where transparent which is the unwanted result. pretty much i want it to behave like a regular geomtry but drawn on top of the rest withouht using the camera trick.
Anyone familiar with Shells/Fins using SSE? I need to create a shader that uses them to mimic fur/grass, there are some shaders out there that do this, however doesn't use Unity's Lighting System, so looks like I gotta make my own.
Any ideas anyone?
Anyone? Please, help!
How versatile is SSE? Is it limited to specific types of shaders?
i'm still new messing with sse, i wonder is there going to be any more updates and tutorials for example i do see the lightning graph and vector. are there going to be more tutorials about it?
Is it possible to do something like this with SSE?
I tried bringing the ParallaxNode script from this old post into my project but I get the error:
Assets/Scripts/ParallaxNode.cs(17,33): error CS0246: The type or namespace name `Node' could not be found. Are you missing a using directive or an assembly reference?
I'm trying to create my own node (for some specialized texture blending). I got the impression that it should be possible to do this simply by inheriting Node the way it's done in ParallaxNode, but clearly it's not seeing any of the core classes. Am I doing something wrong or did something change since 2010 when that hint was posted?
I am having an issue. I want to have a reflection on PART of a mesh, like the first picture below (Rendered in Unreal Engine 3)
I can achieve this in Unity, using this fab editor, but once I attach my normal or specular then it goes pink (error). So, a basic
diffuse, with the same normal and specular work fine. But the diffuse which has the reflect added in, plus the same normal and
specular gives me errors. I am so lost.
Rendered in UDK (Desired Output)
Rendered in Unity, great (until I attach Normal and Specular)
Hello! Can you help me please?
I want to make something like vertex displace by HighMap, but Sampler2D didn't work at vertex graph.
So how I can define different positions for different vertices?
I am checked the Vertex Modification example, but it just multiply vertices normals and move all vertices at once.
Most likely you just runs out of available for shader model 2.0 number of instructions. Specular and glossiness eats them a lot. Also some of nodes is presented not by one but multiple of instructions, as well as compiler can some how optimize the code, so you can even get different number of instructions by changing values of expressions. Also multichannel operations eats an instruction per channel. You can see a number of instructions of compiled shader in top-left corner - ALU. If shader cannot be compiled and start to give errors means you're out of 64 instructions. For shader model 3.0 this number is greater, but your project will not run on old hardware and mobile platforms.
There is no way to use texture sampler in vertex graph. So, no, you can't. But you can pass from script a vertex colors.
So procedural lighting like in example, only possible due to script that will process each vertex? This require a lot of CPU.
Or this is normal? For example, like a water in the CryEngine 3, that uses vertex transformation.
Artaani, it might be worth checking to see if you can use vertex colours in the vertex graph.
Not being able to use it natively is one downside of Unity's interpretation of surface shader rendering techniques - and the Strumpy Shader interface being catered to 'natively' work primarily with deferred rendering.
I think it's a problem as you need to recalculate normals for displaced mesh. Even tough you can generate procedural transformations based on vertex UV or use a vertex colors.
So may be it's not completely impossible but you should put considerable effort to figuring out how to do this. Or just pass needed info via vertex colors, or even just do everything trough script. It does consume much resources but it should be OK if you have not to much polygons.
With just the Diffuse the ALU is 32
With just the Normal the ALU is 15
With just the Gloss the ALU is 5
With just the Specular the ALU is 22
If I attach everything it say's ALU: N/A
I have shader model three selected. And the object is pink once everything is linked.
If I "exclude path: forward" then there is no error, but just a black texture with ALU: 37
I am so lost with this one. I can link each item individually, but once I link diffuse and
specular and/or normal It wont work.
Any other advise? Any reason my ALU shows N/A with everything linked?
Thanks for the initial advice! I was so stoked to see a reply.
I think, ALU shows N/A because shader isn't compiled because of errors, so there is no report about resulting number of instructions used by shader.
Model 3 permits 512 ALU+512 Textures. So I think it should be enough... May be there is some other limits... Read errors in console carefully.
Has anyone gotten tangents to work with Strumpy? Or world reflection node for that matter? I keep getting errors with this node (models turn pink) and I am trying to get localised reflections on my models... is there a way around this...?
-- If you look at my post on the last page of this topic I have a reflection limited to one area of my model. It's works great, as long as I don't use a normal map or specular map at the same time. Why, I don't know. I have the graph posted though. The reflection/mask is under the diffuse graph.
I would get rid of that unpacknornal...you don't need it there... and I've gotten reflections to work as long as you don't plan on tiling and use a mesh UV node... I am also trying to simulate a rain street using a cubemap... thanks man.
Silly issue: I can't seem to find the little preview window with the sphere in =(
Click on preview
Hey guys, I was essing around with a metal shader I put together... still trying to figure out how to get glossy reflections so I can get the look of brushed metal. All this shader takes is a black texture with alpha and a single swatch... normal maps are optional. From left to right: Copper, Bright Gold, Bronze, Chrome. Thinking about selling this on the Asset Store. Is there a way to get glossy reflections, i.e.: blur the cubemap... thanks.
Can't find anything like that.
I'm so sorry if i'm busy being an idiot!
Thanks for the help!
Oh, if you are on Unity Free, you don't get the preview ... you will just have to apply the shader to your object and hit export...which i find easier to work with
I'm trying to figure out how to make a shader that mimics fog.
So far I've got an alpha texture to display, with an emissive colour for the fog colour. The problem is, I can't get the emissive colour to have an alpha property to fade it in and out.
I'm basically trying to get an alpha texture with a fadeable alpha mask on top.
Can anyone help me out with this please?
Nevermind! I've worked it out!
Here is my fog shader:
You use the slider to change the alpha of the fog, and you can change its colour.
I posted a month ago an issue with lights not working as expected on my Diffuse (with alpha channel) Specular Normal shader and nobody answered (that's fine, that was a noob question). Well I fixed it and shared my sgraph and .shader here for anybody to use. (If another noob like me encounter the issue )
Is there a way to ignore colors that appear behind a texture? I'm working on an Hologram shader and I would like to avoid the x-ray kind of look. Example below.
Is it possible to ignore what's behind on the same mesh without removing alpha?
Ok nevermind I found a way. I simply removed transparency, grabbed the screen texture and added it the emissive. The wheels still appear through the model, but it is unavoidable since it is not the same mesh. I'll add a plane that hide that part when seen from a precise direction.
Now I also have distortion, which is quite nice.
I newb using Strumpy and I want to know if there is a way of searching the nodes I want to use. I know I can mouse over nodes in Strumpy and get quick info, but would like to know if Unity has a shader reference page that I can word search for particular nodes?
While I'm here, does anybody know which node to use for on/off value which needs to be control by time node?
Also, how can get UV_pan node move from one half of a texture to the other half without scrolling? I need this to go back and forth between the halfs.
Hi guys .
I'm trying to make Tree Leaf Shader but I have some problems with cutout and also the blending with image effects like Global Fog here is the Screen Shot :
Thanks for Help
@roach, For the on/off thing, I'd personally use a float property and attach a on/off script that pass the value from 0 to 1 and 1 to 0 via Material.SetFloat().
For the UV_pan node, I don't think it is necessary to use it. You can change the Offset via material.SetTextureOffset on a script. This way you have more control on it since you can do anything as long as it is mathematically possible.
Strumpy looks very cool. I definitely have to try it out on my latest project.
Check the ZTest setting. I can't see the shader network or params clearly, but it looks like your shader is writing a z value for the clear parts.
I'm not working on mobile or anything and I do not really care about performance for the moment. Is there a way to have a glow setting on a shader?
What I'd like is:
1. Have the emissive to fade out smoothly to give it a bloom/glow effect like the one I attach on the camera, but only for one object (ex: lightsaber). Is it possible in strumpy?
2. Have the emissive work with the lightmapper. Even if I add the unity EmissionLM parameter and set it to 1, it doesn't work at all... Any clue?
I'm working on a Hologram shader that currently looks like this (the model comes from the asset store and is not mine. Only the shader is made by myself).
Thanks for the info. I'll look into it...scripting is not something im comfortable.
You can just right click on image and click view image .
I have tested the other settings for Ztest but didn't work Here I post the image again :
If you want to have bloom and glow on your model, you have to enable HDR in the camera (if you have Unity Pro)... in my shader, I have the emission set to a mask in my diffuse so it is possible and you do have Emission LM, which is good... for the shader to work with beast, you have to have the tag "Self-Illumin" in the shader name. It took me a while to figure this out too... but it works
Sorry to get in here and disturb with a n00b questions.
So what i really want to do is to drive the Spec and amount of Reflection (cube) with the R channel in a texture. With the G channel i want to drive the mipsteps of the cube map to get blurry reflections AND also connect it to Gloss.
Haven't decided yet what to do with the B channel. Maybe alpha.
I have several issues. The first one is that my reflection gets distorted when i try to make it become affected by the normal map.
The second one which result in a crash is when i connect the specular. I want both cube map reflection AND specular to be able to draw the light specular on top of the cube map reflections.
Shader error in 'ShaderEditor/EditorShaderCache': Program 'vert_surf', output semantic attribute "TEXCOORD" has too big of a numeric index (8) at line 155
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_SCREEN
Edit- It does work with a simple reflection node. But... It's not as nice We had a shader almost just like this for Killzone 23, i hope that Unity can handle it!
This usually happens when you run out of texture interpolators... I want to tile my textures and the model will turn pink... the one way to solve this is to use a Mesh UV node... do you plan on tiling your textures?
@ Neptune: I don't want to tile the uv's, no. It's for characters that need a bit more love than the usual stone age Unity shaders. I've actually got a result that i'm quite happy with! I'll share it when i'm done of course.
What doesn't work now is still the reflection. I want it per pixel so that it reads the normal map. How do you usually do that?
Also, i need a way of controlling the mip maps of the cube so that i can get some nice blurry reflections. Any ideas?
Ok, the world reflection works! It was just my normal map that was a bit too simple. Now connected to a proper rendered map it renders beautiful!
And, Neptune, thanks a lot for that tip about MeshUV! It works! I just skipped the UV connections from sampler2d and replaced them all with UV1 on the MeshUV.
One more thing remaining. Blurry reflections. How to get to those mip maps.
I am still trying to figure that part out too... I added inputs to my shader that control the Fresnel of the reflections and gloss/spec... I haven't figured out how to do blurry reflections yet, other than blurring the cubemap which is virtually impossible at this point. And if you want realtime relfections, I have a script that I found in Unity Answers that allows that to happen... make sure your cubemap input is named "Reflective Cubemap"
I would also put some fresnel in your shader for reflections...unless you want everything to have a mirror like quality...
It's not impossible, that's the irritating part We used it at both Grin and Guerilla Games and the coders didn't complain about it being too complex. How the shader worked was that it took the already existing mip steps of the cube map and connected it somehow to a color channel. I'm just guessing here, but could we use texCUBElod(s, t) perhaps?
Yup, the reflection is getting some fresnel love but i have it slightly affecting the whole mesh as well just to make details pop out a bit more.
I am trying to figure this out for my shader... still trying to figure out how to make it work with glossy reflections... I can't wait to see what Stramit has in store for Unity 4