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 Acegikmo, Jan 11, 2014.
You can do it manually! The remap range node is just regular math in a simplified format
I just wanted to say thanks for this, it is the greatest thing since 3.0.
Just bought it but first thing i noticed is the vegitation shader looks like this right after loading the scene:
So then I go to Edit>Graphics Emulation>Shader Model 3 and then it looks like this:
And then when i go to click on the light wrapping it crashes. Any idea why? Here are my PC specs:
Msi z87-g45 Motherboard
Gigabyte 4gb 770 OC
16 gb 1866 gskill ram
Thanks! Glad you like it
The crash sounds very strange, got any more details on that?
The first issue if because you have deferred rendering on - switch to forward and it should work
Thanks, changing to forward rendering did it. I absolutely love this tool.
When will you be sending out the next tutorial?
I suspect the next tutorial will be on tuesday! I've planned to make something more advanced this time - what would you like to see?
I wouldn't say that the options are more limited, but that what you can do is different, or in some cases can be accomplished with a different technique.
For instance, take a look at the tomb raider talk from GDC last year; they use custom shaders when drawing lights to make "fire" and "water" lights, which add these effects to the scene as part of the lighting stage. This is super powerful, because you don't need to have those effects as part of every shader which might need to look wet or be lit on fire. The same is true for things like reflections, which can be rendered like lights and allow you to avoid baking a cube map into every shader for a location specific reflection effect. This decoupling of the effects from the initial shader, made possible by information in the gBuffer, is a huge side benifit of deferred. That said, I believe Unity uses a thin gBuffer (light pre-pass renderer)? That certainly limits things as well.
As for light position, color, etc - you won't be able to represent these for every light hitting a surface, but you can expose this information for the dominant directional light in the scene (sun).
Almost all deferred renderers used forward as well, since alpha isn't easily covered by deferred approaches. As for light indexing/forward++/etc, from what I can tell the main issue with these systems is poor cache coherency. Given Unities need to run on a wide range of systems, I wouldn't expect them to venture into compute based rendering approaches any time soon.
Is it posssbile to create a shader that can generate moss on random spots or controlled spots on the uv map or etc with a slider? like here have moss come out of the cracks
Also how can i set up a shader for using a displacement map like this:
As for the tutorials some ideas I have are below:
-One I listed above with moss
- like seen in this video -->http://www.youtube.com/watch?v=3tHI2J9_c9k (Real-time spherical area lights along with rectangle and square ones) or from a imported model
These below to me seems like it would be the most basic of all shaders but i dont know how to do it
-Have a plane flash between colors (like this http://i690.photobucket.com/albums/vv268/mzdiamondprincessc/flasher.gif)
-Have ONLY certain parts of a uv flash
The main thing i want to know is, how would it be possible to do billboarding with vertex manipulation (especially ueseful if it would work on a combined mesh if thats even possible).
I find manipulating the positions of vertices is pretty straight forward but rotating things is something i can wrap my head around!
another interesting topic would be to make the outline of a mesh transparent and not having the inner parts affected(simple fresnel solution does not work in this case unfortunately).
Thanks again for SF, but i am repeating myself
Yes, but for that to be robust you need matrix operations; which are available in HLSL but will need to be added to shader forge (or a way to create your own nodes via HLSL or an HLSL node).
To billboard sections of a combined mesh, you'll need to store a pivot position for each billboard (or mesh cluster). In the past, the way I've done this is to compute a pivot point for each billboard as an offset from the model's pivot and store it in the RGB channels of the vertices. I'm not sure if Unity does this, but many engines pack the RGBA vertex color into a single 32bit value, which only gives you 8 bits per channel to represent the pivot position. To deal with this, I scan through the model and compute all of the pivot offsets, then normalize them into a 0-1 range based on the maximum offset and write them into the RGB channels. Then, in the shader, I multiply by the maximum offset to reconstruct the pivot offsets so we can rotate the vertex around them. I think it works out to about 20 vertex shader operations, which is pretty fast.
Another note; you still have that alpha channel open, since your only using the RGB channels as the XYZ values. I usually write a unique identifier for each billboard into this value. This lets you use it as a seed for other operations since it is a unique value for that entire billboard (though it truth, you could likely use the pivot for that as well, but that would take more operations). Anyway, examples of this; doing exploding meshes and having each shard rotate uniquely.
BTW - shader forge really needs noise nodes (preferably 1d, 2d, 3d value noise, perlin, veroni, and simplex variations using either texture lookups or hashes). These are incredibly useful nodes, and I'd add these nodes myself, but there's no way to do that right now.
Is there a way to get good character lighting, something like a half lambert or wrapped lambert, without resorting to using unlit / custom lighting? Something like this (which I currently have plugged into custom lighting, multiplied by a diffuse texture):
It would be really nice to get clean consistent lighting onto characters, but still use specular and especially the IBL features. The example above of course cannot use specular without re-implementing it into the chain.
Thanks for all the tutorial suggestions!
I'll probably do something with texture blending / terrain / vertex paint blends; which seems to be a popular request
Why should that be done on a shader level rather than just using noise textures?
Half-Lambert / Wrapped lambert is *exactly* what the light wrapping input is made for
Set light wrapping to 1 for half-lambert shading, or any value between to make the effect a bit weaker
I'd like to read a tutorial about triplanar mapping.
HI THERE ! ... Cool to See you Daring Asking things like that Man xD ! But very Glad you Asked!
Personaly I would like to see you Doing Terrain Shaders With SkyShop Terrain Meshblend Interaction.
What i Have in mind is Something like This in the Shaders Setup:
... I think thats What i would call a REal Advanced Shader : ) And Something i reaaly would like to see !
Thanks for asking ! You Rule !
TRISH DIAN // TRIAX GAME STUDIOS
PS: Yes As you might assume After The mail i Sent you - I Tought twice and asked a Friend to lend me the money , i think the buy was worthy, I couldnt waith 8 months of Savings just for having this Asset LOL Im pretty happy And Scalling the walls ! But im still Waiting for More features as Zoom in Zoom out Export of Shaders nodes, Relief Shader mapping.. And if i Can think of SOmething else i will tell you : ) Best Regards Joachim.
I think you could add a "basics" tutorial into the mix.
Showing some simple vector math in SF. Like custom lighting via N dot L.
Later on (for the advanced tutorial) you might consider extending on the basic tutorial.
Adding specular highlights, normal maps.
Switch from cubemap reflection to planar reflection via rendertarget texture.
This kind of stuff gets asked pretty often on the forums from what I see.
Of course the vertex blending stuff is cool, too.
Thank you so much for that great explanation, that cleared it up for me! Actually, it shows that i need the help of the shader programmer on our team I was hoping i could surprise him and come up with it on my own but this is a bit above my knowledge, though your explanation is very clear and i totally get the concept!
There are many reasons this has a huge advantage over using a texture; if you use procedural noise to warp a UV input, it looks many times cleaner than using a texture because it's not being quantized to 8 bits (or as low as 4 if your using texture compression) per channel. You can also fully animate the parameters of the noise which is impossible with a texture. You can infinitely zoom into a noise function, because it has no native resolution, and noise functions do not have to tile. You can also generate noise of multiple dimensions which would be memory restrictive in textures (3d noise, etc). And in some cases, a procedural noise function can be faster than using a texture if you're bandwidth limited.
I am very new to shaders, and this tool is great at visualising the processes so thank you.
I have one request for a tutorial, a vertex shader that does wave ripples.
I'm currently stuck with one wave and don't know where to go from there to get multiple ripples =]
Hey there guys. Maybe somebody can give me a hint. I have this Damascus steel blade/knife here and I currently like the way my blade part looks. However, I am not so happy with the wooden part. The specular is too sharp and has a orange tint to it. I would like for it to look more like a clear coat. How would I go about that without using two shaders?
HI THERE !
HUM.... Ok So Here is a IDEA for you .
STarts as this :
- In your 3D modeler / like in max etc ... Setup 2 uvs for the knife.
- - In first uv map you put the Uvs Layout as they are . With a Litle Extra Space for a Mask for the Wooden part
- - Duplicate that Uv map to the Secound uv , and in that Secound uv Remove from the uv 1-0 Space all everything less the Wood part
- - - In secound uv you can also scale the uv1 parts so they are not so litle that dont afect or put them aside just in the uv space
- Bake Alpha 1 / bake alpha 2 - Overlap them .. So in 1 Alpha Texture you got Information of both Alpha of uv1 and uv2 in same space
- - Inspite that uv1 Will just mask Part of the alpha / and uv2 Will just mask the other part .
- - In Shaderforge use the Texture asset to Duplicate same texture, but Use Diferent Uv And : There you go 1 Alpha Chanel That can Work as if was 2 ...
- - - IN Shaderforge you use the Uv2 to mask the Wood part Alone / and those properties not afect the other parts of the model
- - - - This you can use in Whatever material properties you Want - in your case in to mask light Warpping and IBL And Specular ...
If yo in troubles : You can Send-me always the Model And textures to TRIAXGAMESTUDIOS@GMAIL.COM If yoU Want-me to do it for you ...
But im sure some other pros Will give you moar ideas : )
GOOD LUCK ! Big beared guy ...
PS: Dont delete my post / Seams Helpfull this time : ) *giggles*
Cheers Dude ! Keep Cool and Fresh : )
TRISH DIAN. / TRIAX GAME STUDIOS
You need to create a mask to separate the wood from the blade; this can be done with a texture channel, or using the vertex colors. UDK has a
well written tutorial on this here: http://udn.epicgames.com/Three/MaterialExamples.html
Note that your shader will compute both values for each pixel, so packing lots of very different/complex shaders together using this technique can be costly.
Opened Shader Forge for the first time and saved a new shader, got this error.
Strange. Did you use any odd folder structure or so? Did anything else break, or did SF work otherwise?
Well, I did place my saved shader in a folder outside of Unity, wrong?
Outside of Unity? You need to have it in the asset folder, in the project where you have SF installed. (I should probably make this error more clear)
Yes, here is the error when the shader is saved in the project folder:
Does it work when placed in the asset folder?
Yes, it does seem to be working, will have to do some tutorials, thanks.
Also, I would prefer bug reports over at the feedback center!
Sometime soon are you going to do video tutorials on the uses of every nodes uses with in shader forge. The only real reason I've not bit the bullet and bought this asset is do to the lack of video tutorials.
That would be a lot of videos, but it would be good
Possibly, but I will probably make more general shader related tutorials before going into nodes specifically!
However, you can read about all the nodes here: http://acegikmo.com/shaderforge/nodes/
Another idea for videos tutorials : how to (re)make Unity Built In shaders with Shader Forge.
Any news on Skyshop compatibility?
I think it should start from basic.
Maybe explain what each options on the left side does... what works with DX 11.. the nodes...
Everyone wants a complex shader, but for beginners, I think that they will only copy and not understand.
If you explain it to them.. then they can track the other shaders tutorial.
Not yet! However, you can use Skyshop cubemaps for IBL in SF already: http://acegikmo.com/shaderforge/images/progress_b016_ibl.jpg
Hello, I have a noob question :
I need a flat lightening of my faces (faces have the same color), but I am not using the lights in the scene (I want light emitted from the camera). So I need to compute the angle between a face normal and the camera. The problem is the "View Direction" nodes outputs a pixel-camera vector which vary across the face when I need a constant face-camera one.
Do I need to pass the view direction as a parameter to my shader, or is there another way ?
I seen that page before.. There is good number of nodes on that page don't translate to a artist easily at all. This was a issue that people was having with the strumpy shader editor as well. The lack of video tutorials on how to use the product in its entirety and support going into great detail on how to tackle a shader and have it explained in a way for artist to understand... I do believe that if you had a ton of examples of shader tutorials, it would be easier to understand how to integrate into our own projects. I'm sure it would be a lot work to create these videos but I'm also sure it will increase the monetary value of you're product.
You could use a separate specular texture to achieve the visual quality you're aiming for and plug that into the Specular input.
No need to create a secondary UV set.
RGB of the spec map would describe the specular highlight color. And the Alpha channel could be used to modulate the glossiness. Note that specularity and diffuse add up. So it is easy to overshoot the range of 0-1 thus getting only white highlights.
More videos are planned too, it's just that right now it's still a beta, which is why the documentation is a bit incomplete. It would be nice with a complete guide for all nodes at some point!
One thing to keep in mind is that if you really want to learn how to write shaders, you have to understand a fair bit of math. Luckily, most of this can be expressed in a visual way, and interactively, which makes it pretty easy to understand what a dot or cross product is, and basic vector math operations. (I spent a fair bit of time doing shader graph lessons over the last two years). That said, the biggest thing I saw constantly was people not realizing that it IS just math; in that there is no difference between a color and a vector; it's just a set of numbers which can be manipulated.
HI ! JOACHIM !
I have here a Feature but also Support request : ) Im sure many More Advanced Users Would like to know how ...
As SHaderForge Shaders end up Having so many parameters Sometimes the Linear Aspect of them is Quite messy
Im trying to do Nested Folders Of Parameters Inside Shader inspector : For that Seams its possible to do it with a Custom Inspector :
I noticed That you Use at the end of shaders the Custom Mat inspector trick WIch we can Amplify :
Can you Please Show us The Shader CustomMatInspector.cs Configuration for us to have Nested FoldOuts In parameters Like this :
Sorry to ask ! But this WOuld Reaaly but reaaly Help Massively to Organize Shaders Parameters ...
And i think is not that Dificult even for us to do it by hand with a CustomMatInspector.cs Configuration.
Can you pleaase "For gods sake" please show us how and send us a Working Nested FoldOuts CustomMaterial.cs Example For us to work!
THANK YOU DEEPLY SO MUCH !
TRISH DIAN / TRIAX GAME STUDIOS
As you are clearly a dA user why dont't you come onto the chats and discuss your thoughts on Unity, i can be found in #devart most hours and would be interested i hearing what you had to say
THANKS LAZY : Would be a Honour ... I Love Deviantart. I growed up there As a artist since 12 years ago ...
I got a idea Join up : http://soulsshine-unity.deviantart.com/ Wich is the Main "Communitary" JoinVentures Open Source "Universe" Project i work with ...
Every members Can use the blogs and send its own journals to talks about Any whatever Subjects / expecialy About its Own Projects / ideas, And Making offs ...
Invite is Extendable to All everyone !
Kindest regards !
I'll see you there then!
Thanks a lot !
I think that's the backwards dir though, you might want to do 0,0,-1 instead, depending on what you're going to use it for
Should it be possible to store and use an alpha channel in a normal map? I thought it would be a good way to store an extra mask, but I get shader errors whenever I try to use it in a graph?