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 'Assets and Asset Store' started by Amplify_Ricardo, Sep 13, 2016.
Thanks for the info . Adam very helpful.
Hello, I am pretty new to shaders in general, I have been trying to get my planets to display textures based on vertex height from the center. I have some progress but I can't get it to work properly, I got something similar working on a flat terrain. I disabled the textures for now so that its easier to see the outcome.
Thank you for your help.
I think this is what you want:
I'm sure there are some improvements to make, but you can see the basic idea.
Vertex Position gives you each vertex position. You can subtract the center of the sphere (usually will be (0,0,0)) to that vertex position to get a vector whose length is the distance between center and vertex. Then I used a Remap to scale a manually set Min Height and Max Height to a 0-1 range, and lerp it.
Hope this helps!
Here is what I got, so I recreated your shader and had messed around with the values. Couldn't get the other texture to appear. I had done a debug even to see the general vertex distance from the center and I got values from 0.4-0.55 so I populated the min and max height with values close to those but the results stayed the same. Then I tried the same but with 100x as the scale of the planet is 100x. No luck with that either. Any ideas? :/
EDIT: I have solved the issue, I had to manually place values for "Min New" and "Max New" on the "Remap" node. So I placed a float of 1 on max new and a float of 0 onto min new.
I guess this gets completely screwed up by batching as the pivot point becomes the same for all objects part of the batch?
Is there any way around this beside disabling batching? (btw how do we disable it in AS?)
Any way to identify the object would do, I guess I could pass some value by script for each instance of the object but if its possible in the shader I'd like to know how.
Hi, I am trying to use a render texture with my shader but it doesnt work. I got the texture working and I can see it's content updating fine but the shader wont react to it.
Here is my setup:
If I connect the Multiply, Cos and Cosh to the XDeform value instead and set it to anything from 0.1 to 1 I works fine.
The render texture simply consists of a white (255) trail on a black background. From what I understand,, with white, each RGB channel should output 1 so I should see some result but nothing happens at all.
What's am I doing wrong?
EDIT: Ok I figured I need to generate some proper UV coordinates to do the lookup on my render texture. I tried multiple ways to do it but im out of ideas can someone enlighten me please?.
Hi, I have a problem, I get an error when trying to use a texture from an array to displacement:
Shader error in 'xxx': cannot map expression to ds_5_0 instruction set at line 150 (on d3d11)
Shader error in 'xxx': cannot map expression to ds_4_0 instruction set at line 150 (on d3d11)
I'm trying to make a replacement to the standard shader with the same behavior in inspector. Is it possible with ASE?
If not, a property called "Albedo" should keep the value when switching from standard to ASE shader but it doesn't, instead the property defaults to another value. How to prevent that?
Good timing on this post, I'm having this issue as well. I think this is a bug?
Image showing the problem:
Unfortunately both Custom Geometry and Compute shaders are not covered by ASE.
For now you will only be able to specify your shader LOD number and Fallback shader but in the future we will greatly extend its capabilities.
Concerning your second question, it is not possible to 100% mimic the UI likeness of a standard shader since we are not exposing all the property drawers.
When you change the shader on a material it sets its values to the shader default. I think this is Unity normal behavior.
There is no way to prevent this via ASE, but I'll take a closer look at it when possible.
Sounds like you found a bug on the Remap node, you shouln't need to connect Float nodes for it to work correctly.
We'll take a look a look on what might be happening and fix it on our next update.
If you are doing object-space vertex deformations you'll need to disable batching. This can be done via shader through the DisableBatching tag.
Right now there is no way to add this tag to a shader via ASE but this is relatively easy to implement so hopefully we can add this option soon.
Concerning the Render Texture issue maybe this is a refresh issue, are you updating your sampler property on your material each time the render texture is modified?
Yes this is definitely a bug. We'll take a look at this and fix it as soon as possible.
We just uploaded a new build to fix the issues on the 'Texture Array' node among some other ones.
Here are the release notes:
Release Notes v0.6.1 dev 01:
Activating internal data into 'Object To World' and 'World To Object' nodes and setting it to (0,0,0,1) by default
'Texture Array' nodes can be created by dragging a Texture 2D Array object into ASE canvas
Fixed issue on 'Texture Array' node when connecting it to Vertex Ports
Fixed issue on 'Vertex TexCoord' not generating correct source according to their properties
Fixed issues on MourEnvironment, SandPOM and WaterSample shaders
We also tested the 'Remap' node but it appears to be working as it should.
Looking for flexible high-quality asset packs? Check out the Old Town package by PolyPixel, it includes ASE compatible shaders that you can customize to your own requirements. If you are not familiar with their work, be sure to check it out!
Amplify Shader Editor - Product Page
I like PolyPixel. They do good work.
Hello, thank you for your reply.
I dont think its an issue with the render texture. With no connection on the UV port I see it updating the trail when the editor is open while running the game and If I move my trail in the bottom left corner of the screen (x0, y0) the shader does react.
I tried dozens of way to generate the proper lookup coordinate to feed in the texture's UV port but It allways samples at 0,0.
From unity's shader doc i thought this should work but same result. The shader trigers when the trail is at at 0,0 on the screen. FYI my two cameras are fixed at the moment, at the same coord, same ortho size, same clipping plane etc. etc.
Even weirder (well... weird to me) if I feed a vector 2 as the render texture's UV with the coordinates 480, 270, which is half the render texture's and screen's resolution of 960x540, the shader reacts when my trail is at the top right of the game screen which should correspond to 960x540 not 480, 270.
I did confirm that Unity's game viewport is set to 960x540.
EDIT: Wow... that exact node setup just started working. No clue why.
There's just one slight problem, the Y coordinate seem to be off as the shader reacts when the trail is above the game object instead of on it. Also the area that makes the shader react is shorter than the game object's height (about 1/4 the height). The width is ok and properly aligned.
FYI This is in Unity2D and my game objects are all sprites.
Any idea what is wrong?
EDIT2: Its strange, the sprite.vertices array lists 4 vertex for the sprite that has the shader on:
(-0.3, 0.6) (0.3, 0.6) (-0.3, 0.0) and (0.3, 0.0) but when I test the shader it is clearly reacting only to 2 vertex positions. Is it possible for the top and bottom vertices to be on top of each other after conversion? Also, regarding the offset I spoke of above, if I multiply the Y coordinates (after conversion to ScreenPos) by 0.83 it corrects the offset (leveled with the base of the sprite) BUT if I move the sprite up and down, this value is no longer enough to correct the offset.
Solution: For anyone interested, I finaly got this working using this node setup:
In the append node Y is simply set to 0. This is being used in a top down 2D game setup on GPU instanced objects (Cause batching messes with the pivot point).
It only resets it to default if the property names change, but here I am matching the property name to Albedo and yet it resets it. It's a problem when importing assets from maya, the materials color translates to standard shader but not ASE. Maybe the name is _Albedo, let me check... nope that's not it, I think the inspector standard shader does funky stuff in the background.
Is it possible to create an Anisotropic shader with Amplify Shader?
Introducing the Dynamic Nature Pack by Nature Manufacture, an awesome example of what you can build with ASE. If you are not familiar with their work, we strongly recommend that you check it out.
Amplify Shader Editor - Product Page
Hi, please someone can give an idea of how to make a billboard shader with amplify shader editor i try with this https://en.wikibooks.org/wiki/Cg_Programming/Unity/Billboards but i cant get it.
Thanks so much
Any luck with the Billboard Toggle in the Master Node? Be sure to let us know if you have specific requirements, we would be happy to help.
Looking forward to your reply.
Similar to this? https://forum.unity3d.com/threads/a...ader-creation-tool.430959/page-4#post-2812164
i'm getting this error with the latest version from your sites
Assets/AmplifyShaderEditor/Plugins/Editor/Utils/CustomShaderInspector.cs(683,21): error CS0117: `UnityEditor.EditorGUI' does not contain a definition for `DropdownButton'
What Unity version are you using? Is it a Unity 5.6 Beta prior to 5.6.0f1?
Starting from Unity 5.6.0f1 there was a slight change on Unity UI library which we had to take into account on our Custom Shader Inspector and unfortunately we are unable to detect beta versions via platform directives.
If so, is it possible for you to upgrade to the latest 5.6 version?
Hi Thanks so much i didnt see it, but i have problems, when i activate billboard the vertex rotate with the camera but it gets scaled with the rotation too, so when i see the plane from the right side the plane rotate but stretched, maybe i have to download the last versión from your website?
Ah i see, yeah i'm still using the beta. I'll try to update to the latest 5.6
Thanks for reporting this bug. We found an issue with our billboards when applying a non-uniform scale to the object p.e. applying a scale of (2,1,0) to the objects transform .
We'll fix it as soon as possible.
Great VR Hands & FP Arms Pack by Nature Manufacture, another cool example of what you can build with ASE. Currently on sale!
Amplify Shader Editor - Product Page
I have a question! Is it good for a person that has 0 knowledge about shading and wants to make an optimised Shader for Android(for example mobile stuff) Since i was looking to buy Skyshop just for the mobile shaders but i want to try other alternatives too and since i don't want to pay for dissapointment I will ask first and see what is good eventualy! Thanks
Thank you for your interest, we really appreciate it. Shader performance will always depend on the complexity of the node graph created, however, we do offer several precision types in order to get the most out of each device, and we do go the extra mile to ensure that it runs as fast as possible.
If you are looking for a ready-to-use solution, but limited to the available shaders, go for Skyshop. ASE allows you to create almost any type of shader but it does involve some work on your side. You do not need to be an expert shader programmer but there are some concepts that you will need to learn in order to build shaders with a visual node editor.
I recommend checking a few ASE tutorials before making your choice - Amplify Shader Editor Wiki Page
Looking forward to your feedback.
I purchased ASE recently and I must say I'm 100% satisfied
But I still have some misunderstanding on on depth and blending modes, that's why I'm coming here in the hope of getting some enlighted comments
Here is what I have accomplished so far :
- I have a planet and its atmosphere in two separate meshes.
- I set the atmosphere to additive
- I changed the Depth offset of the atmosphere to render behind the planet (and keep only the exess outline)
Everything runs "fine" but with those settings I have an obvious problem : If I have another planet or object behind first atmosphere , they still render in front ( obviously )
here is a picture :
So here I am, I have tried multiple different settings and this is the best so far. I understand there is a major and obvious flaw, but I can't find another way to get the wanted result unfortunately.
If you think this post should be in another or separate thread, please tell me
Also, thanks in advance for any comments on this subject.
Is there any way that I can disable the gradients in the editor node labels?
Now they go from left to right, I personaly prefer an even color, or even better from top to bottom.
is it now possible? I've tried mix matching world light direction, color, fresnel and nothing stick
I just played around with the newest version of ASE and was pleasantly surprised that it contains refraction in the master node now (yeah it has been some months since I worked with ASE and Unity in general)
And then I saw, it automatically has a Chromatic Aberration parameter. How awesome is that. ASE has come a long way since I bought it in beta.
Is it possible to create Unity Projection Shaders with ASE?
I can't seem to make an instanced shader that works properly, all the GPU instances come out solid black.
The original object uses the same shader and is showing the texture properly.
I have set defaults for the texture and all other values internally.
Does anyone know what could be wrong?
Quick question. Is there a way to set the render mode to "fade" like in Unity's standard shader?
I want to create a material that has fully opaque parts, some with partly translucency and full transparency. The issue is, that the fully transparent parts(black in the alpha channel) are still slightly visible.
With using "fade" in Unity's standard shader, this solves this problem. I just want to get that working with a ASE material.
Hi, with master node selected try changing the render type on the properties pane (on left side). I think that it is on Blend Mode section (I have not Unity here now).
Hey thanks for your quick reply.
I tried all the different Render Types in the master node's properties panel, to no avail.
What also does not work for me is the "transparent cutout" it returns only a full opaque black in the material.
Hi @nipoco , I don't know if I'm understanding you well, but I have made this quick test:
A simple texture with 4 squares:
top-left 100% opacity
bottom-left 33% opacity
bottom-right 0% opacity
Then a simple shader with blend mode transparent and with only the texture (rgb to albedo, alpha to opacity).
The image test-alpha.png is the texture.
The image 002.jpg is an screenshot of the shader.
The image 003.jpg is the result.
Let me know if this is that you are speaking about.
@nipoco Here go another test with the same texture but setting the blend mode to masked. This time texture rgba to albedo and alpha to opacity mask and testing with several mask clip values.
Edit: I forgot to say that in this example to avoid some artifacts on the borders I have changed the Wrap Mode of the texture to clamp (image 008.jpg)
Just a quick thought, since you are using an additive blend, have you tried maybe instead adding a depth offset, tweak the atmosphere color itself to be black on all the sphere except its border? Something like a Fresnel effect maybe.
This way the effect would only be noticeable on the sphere border.
These gradients are textures so the only way to modify them would be to replace them by other ones.
Unfortunately no. To have a fully functional SSS we need to be able to create Custom Lighting from with ASE which is something that we were unable to tackle yet.
Currently it's not possible. But you raised a pretty interesting point/feature, we'll definitely register it on our roadmap.
That's quite strange. We did some testing on our end and everything seems to be working correctly with an ASE shader .
Is it possible that you share some additional info so we can figure out what might be happening?
What property are you setting as instanced on your shader?
P.e. on how you are setting the instanced property on c# your script? Maybe you are using the wrong property name on the MaterialPropertyBlock?
On our end we'll update the GPU Instancing Sample with a script setting instanced properties via a C# script.
@nipoco did you manage to solve your issue?
Also thank you so much @benderete for your sample.
Hey thanks for taking the time to try this and explain it. Unfortunately I couldn't solve it yet.
To illustrate the problem. I attached a couple of screenshots.
The top and middle pictures show the settings of the master node's render properties and the material in the editor. Like with the transparent render mode in Unity's standard shader, the material in the top screenshot still has some slightly opaque areas around the graphic (marked with the red arrow). In the alpha channel this is definitely fully black. So that can't be the issue.
The second one is set to Transparent cutout like in Benderete's example. Changing the masking values didn't help.
The bottom screenshot is Unity's standard shader with the rendering mode set to "fade". This gives me exactly the result I'm looking for in terms of the transparency.
The texture is a spritesheet and I try to animate it with a flip book animation node. That all works fine. Only the minor problem with the slightly visible edges.
On top image you have the blend mode to Alpha premultiplied instead Transparent. Try it with Transparent. Change it on the selector of the section title (look attached image).
On the second image you are using masked blend mode but you are attaching the alpha output form the texture sample to the opacity input of the master node. You must to attach the alpha output to the opacity mask of the master node. Remember: opacity input for transparent, opacity mask input for masked.
Since the discution seems to be about transparent shaders, and you @benderete look like you know this subject pretty well, do you know if there is a way in ASE to make a transparent shader that receive shadows? I am struggling right now to find a way to do that...
Hi, really I don't know. In fact I think that it is an unity shader engine limitation. If I'm not wrong, without more job, transparent shaders cannot receive shadows, but masked ones yes.
We've just uploaded a new build into our website.
Here are the release notes.
Release Notes v0.6.1 dev 02:
Added 'Triplanar Sampler' node
Added Vertex Output ( can now change from Relative/Local Vertex Offset to Absolute/Local Vertex Position )
Added Smear Sample
Added Unlit Light Model
Added simpler 'Time' node
Added 'Depth Fade' node
Added 'Camera Depth' Fade node
Adding node info into Helper Window
Adding drag and drag valid unity assets list to helper window
'Screen Position' and 'Grab Screen Position' now have a Output dropdown on its properties instead of a Toggle
Improved GPU instancing example by adding a C# illustrating how to set instanced properties
Fixed issue on preview materials not being initialized after returning from play mode
Fixed issue on local variables reset
Fixed issue with tangent and bitangent previews
Fixed billboard issue with non-uniform scaling
Fixed issue on Tex ports counting as having valid internal data on Node Properties UI
Fixed issue on using 'Texture Sampler' or 'Screen Color instances on Master Node Debug port
From this build we would like to highlight our new Triplanar Sampler node which simplifies immensely Triplanar Mapping usage on ASE Shaders.
And also please check out our newest Smear sample:
Concerning the issue with transparent objects and shadows, like @benderete commented, it's unfortunately a limitation from Unity.
Happy shader creations!
Is it possible to make shaders with wireframes in game? I've been trying with shaderforge with no luck, figured I'd ask here first if anyone has achieve it before going off and wasting tons of time finding out it's not possible.
Thank you both, @Amplify_RnD_Rick and @benderete for your answers! I was simply wondering that because of this asset https://forum.unity3d.com/attachments/wip-smoke-shader16-png.157942/, but I guess it's too advanced for me now...
Anyway, this smear FX is purely awesome, I didn't knew it was even going to be possible to do that with ASE! Can't wait to try it to animate fur and hairs on characters.
Keep up the good work!
Hey big thanks @benderete !
This actually fixed the issue. I can't remember that I changed that to premultiplied. Odd.
Yeah and the cutout works too after your hints. Sure that makes sense. The opacity node is even greyed out in that mode. Now I'm feeling stupid
New build available on our website.
Here are the Release Notes.
Release Notes v0.6.1 dev 03:
Adding Fallback shader picker on Master Node
Adding Shader LOD value modifier on Master Node
Node property title changes according to selected node
Added Multi-Line mode to wires ( Ctrl + W )
Added ability to change 'Triplanar Sampler' node name
Improved wire connections rendering while zoomed
Tweaked live mode to save only when user is inactive for 0.5s
Small node resizing issues fixed
Fixed issues on Live mode not catching node connections and creation correctly
Due to high community demand, we added an alternate wire rendering mode. Here's a view of it in action:
I think that wireframe rendering to be done from within the shader body you need to use geometry shaders, which we don't support in ASE.
Happy shader creations!