Your import seems to be broken, even the inspector/editor code didn't load.
Delete all the files from the previous version and reimport the latest unitypackage.
Sprite Shaders for Unity
yeah, not sure why they dont work for me. I'm on Unity 5.3.6
I had this issue. See my post a few posts up. Check your console to see if you see 1 error that matches the error mentioned in my previous post.
MattouBatou đã viếtI had this issue. See my post a few posts up. Check your console to see if you see 1 error that matches the error mentioned in my previous post.
Ah, thanks that was it. I was not getting anything logged to the console, I must have missed your post. Thanks for the help
Glad it was helpful. I spent a good while scratching my head wondering why the inspector panel looked different to the screenshots in the rest of the thread. If it wasn't for the console logs I was getting, I would have been clueless too. It's a little odd that you didn't get any logs. Ah well, happy shading!
As a sidenote: I recommend Sprite Illuminator for creating your normal maps. I've been hand "carving" them using the angle brush tool and it's been a dream. I attempted setting up a workflow in Photoshop but was a pain previewing the normal map with lighting on a mesh. Sprite Illumintor has a few handy views you can flick between as you paint.
Thanks for all your work @ToddRivers!
I'd definitely be paying for your work, please put it on the Asset Store! Is there a way to get in touch with you directly, maybe to get some active and responsive support, possibly supported by donations?
I thought Spine runtimes for Unity included some basic lit shaders but all the work you're doing is definitely a must have for every Unity Spine user!
Some general questions:
Which Unity Runtimes do your shaders work on? Have you already tested it on Unity 5.4.2f2?
Do the shader support ambient lighting, spot, omni and directional lights?
@[đã xóa]
I had an idea.
Speculars.
And Spec map.
Not a request. : p
Pharan đã viết@[đã xóa]
I had an idea.
Speculars.
And Spec map.
Not a request. : p
I'd love to have them as well. And maybe refraction shaders as well, for "predator-like" effects
Willing to pay for such features as long as support is given, please consider the Asset Store
Correct me if I'm wrong but I believe the esoteric team have already mentioned elsewhere in the forums about not wanting things on the asset store to rely on Spine's Unity runtime. This is because it is then only usable for those people with Spine. With that in mind, I expect that a "Super Shader Pack" would need a considerable amount of extra work to ensure they can also be used with any Unity prefab without any programming experience required to use them.
I'll be adding some shaders of my own to work with Todd Rivers shader collection within the next few months. When I do, I'll post them here. A Specular shader is something I'll do if someone else doesn't do it first.
MattouBatou đã viếtCorrect me if I'm wrong but I believe the esoteric team have already mentioned elsewhere in the forums about not wanting things on the asset store to rely on Spine's Unity runtime. This is because it is then only usable for those people with Spine. With that in mind, I expect that a "Super Shader Pack" would need a considerable amount of extra work to ensure they can also be used with any Unity prefab without any programming experience required to use them.
I'll be adding some shaders of my own to work with Todd Rivers shader collection within the next few months. When I do, I'll post them here. A Specular shader is something I'll do if someone else doesn't do it first.
I can't correct you, I still haven't read all the forum threads since I only registered yesterday.
I believe if Esoteric released the runtimes as a package in the asset store that would be feasible. Wrappers for other devices (mostly bound to VR) or softwares or runtimes (eg:LeapMotion), are present in the store, so I believe it's possible. I don't know the details so I won't insist. Even if, if the shaders are going to be useful in my project I'd gladly make a donation
Yes, mantaining a package in the store requires work (I'm mantaining several), but you also get some funding in exchange to keep yourself motivated and the package alive.
I think this is a bit off-topic, I'm not going to reply anymore about this on this thread, mine was simply the wish of an enthusiast
Hey! Just added updated shaders that support Tri-Color ambient lighting (different ambient colors for Ground / Equator / Sky).
They're approximated based on trying to match Unitys Standard Shader so might need some tweaking in the future (Unity added support for it with like no documentation as usual yay!).
It does look pretty awesome though, I defiently recommend lighting your scenes with gradient ambient lighting rather than flat, a bit of green light bouncing up from beneath the character looks ace (although you'll only really notice it with normal maps obv).
I think these shaders are going to get bundled in the unity runtimes in the future, right Pharan?
The shaders don't rely on Spine at all, they work on any mesh/model. They're just designed with sprites in mind. I use them for all sorts of non-spine stuff myself.
However I don't think I'll put them on the asset store now tbh.
Although I'd definitely love some potential extra income to support my own game dev, I learnt to code via looking at other peops open source stuff so feel I should give some free stuff back
@Pharan yeah specular and reflections are the biggest things missing when comapred to unity's standard shader. Specular should be pretty easy I think, might try it at some point. The number of shader varients is getting crazy now though - the pixel shader apparently has 576,388 variants already according to unity haha
You should consider putting them on the asset store, not for profit, but for convenience.
Put it up for $.99 and then it will offset the internet costs for time spent on this.
Yeah maybe, theres also here http://unitylist.com/ which is a great collection of open source unity stuff.
I've fixed more ambient lighting stuff - the pixel shader now uses Unitys spherical harmonics function to sample ambient lighting correctly.
The variables needed to do that aren't defined when using vertex lights so I knocked together a functions that approximates it.
Its impossible to get it look exactly the same but it works pretty well.
You can switch to always using flat ambient (for better performance) by undefining TRI_COLOR_AMBIENT in the shaders.
Hi ToddRivers,
Great progress and updates!
I ran into some performance spikes with your shader. Not really sure how it occurred, but thought maybe you'd want to know? (FYI it's using an older version .. so maybe your latest iteration fixes this)
Anyways keep up the great work and thanks for everything.
Hmm thats weird. The spike is happening when its first setting that shader for use I think. It could be caused by the Unity running out of shader keywords (the defines used to turn shader features on and off, these shaders now have a fair few of them to allow you to switch all the feature on/off).
At the mo I think theres a 64 keyword limit but its going up to 256 in Unity 5.5 so that might fix it!
I've uploaded new shaders that improve the fake spherical harmonics in vertex lighting mode. Should be a lot faster and look a bit better too
@ToddRivers. Nate wants to bundle it with the runtime but I'm trying to figure out how to proceed.
I've been recommending your shader to people who need these features and the common reaction seems to be: "whoa. that's too many features for me." Even though I try to explain that features you don't use don't affect performance. So I want to make some changes to the inspector (spine-friendly defaults and user-friendliness) before then.
I also feel like I need to rename the shader to "Spine/Sprite/Sprite somethingsomething" so people don't get a random "Game" folder in their shaders and so it doesn't get jumbled up with the others. I was thinking something like this:
But it seems a bit too long.
Anyway, I'm wondering about your thoughts on continuing work on it. Like, will there be two versions? Yours and Spine's? Or would you do PRs on the spine-runtimes git repo directly?
I don't want to impose any weird stuff too (in case I make changes to the inspector) if they don't work for the project that you're working on. But I also want to confidently make updates if ever you make changes that require inspector changes too.
Pharan đã viết@[đã xóa]. Nate wants to bundle it with the runtime but I'm trying to figure out how to proceed.
I've been recommending your shader to people who need these features and the common reaction seems to be: "whoa. that's too many features for me." Even though I try to explain that features you don't use don't affect performance. So I want to make some changes to the inspector (spine-friendly defaults and user-friendliness) before then.
I also feel like I need to rename the shader to "Spine/Sprite/Sprite somethingsomething" so people don't get a random "Game" folder in their shaders and so it doesn't get jumbled up with the others. I was thinking something like this:
But it seems a bit too long.Anyway, I'm wondering about your thoughts on continuing work on it. Like, will there be two versions? Yours and Spine's? Or would you do PRs on the spine-runtimes git repo directly?
I don't want to impose any weird stuff too (in case I make changes to the inspector) if they don't work for the project that you're working on. But I also want to confidently make updates if ever you make changes that require inspector changes too.
The inclusion sounds nice to me as long as support is provided for it.
2 versions would be nice. One, with the Uber shader created by ToddRivers without putting him any limits to his creativity and experimentation, and another managed by the Spine team itself, stable, clean, cross-platform tested, optimised for performance and compatibility so that is coherent and well integrated with the package.
The nested shader solution is nice as long as the nesting makes sense, I'd be ok for it.
OT: btw, speaking of folder structure, having the runtime folders directly on the root of the project folder isn't very clean - may I move them elsewhere? (Also, the runtimes contain duplicate conflicting class names (eg: Animation), could you consider the possibility of using Namespaces?)
The Spine.Animation class has always been in the Spine namespace. Unity still incorrectly detects it as conflicting. It's not even a UnityEngine.Component. There's no way it would conflict. We've already reported this bug and support said it's a won't-fix.
We leave it up to the users to move the spine runtime folders into their own folder scheme. Moving (or even renaming) them doesn't break your ability to upgrade using unitypackages. Unity editor still knows where/which original folder and files are are based on their guid and updates them accordingly when you import updated unitypackages.
I should probably make that clear somewhere.
@Pharan Hey! I think the best option is two have to different versions. One bundled with the runtimes and another which is my own repository where I can check into whenever and then you guys can update from that when you want to.
That means you can have them appear in the Spine namespace etc which def makes sense (my own project is split into Engine and Game namespaces but it doesnt really make sense for anyone else tbh!). Plus make any changes you think will make things clear for people.
One thing I will do is rollover text explaining some of the features as I always find that usefull and found out how to do that the other day.
I do think its important to keep them as 'uber shaders' though. If you start making seperate versions for all the features it can get messy very quickly.
That's why Unity switched to that model for their own shader.
I guess it somehow needs to be made very clear that the tick boxes are turning off shader features so there is no overhead at all for features you don't use/need (which is exactly what happens if you're using the Unity Standard Shader).
ALSO what I think would be really usefull for peops is to have some example scenes in the runtimes specific to the shaders to show the difference between different lighting modes and to show off some of the features you can do with the shaders and Spine.
(Bump Mapping / Toon Shading / Emission / Tinting etc).
Alright.
I'm totally fine mirroring updates to the Spine-Unity version whenever you update your version but I wish there was some way to find out what changes you actually made so I can match accordingly.
Example scene, definitely. Maybe just a bunch in one scene though. I don't want it to balloon into an exhaustive description of Unity's lighting system. That's not something I confidently understand myself, and would be too much; not even the ShaderForge package does that.