Unity Community |
Just a thought here, if you're not yet using vertex painting on your models maybe you could paint vertices based on collision contact via scripting (with different strength of color for more damage maybe) and in SSE create a shader that is able to answer to that vertex color by blending the regular model maps with a "damaged" map.
You could even create several "damaged" maps and distribute them on the RGBA channels of your models for more detail and precision.
BLASTER - Game Trailer ! :
http://www.youtube.com/watch?v=cs7D7Y-RiDY
Follow SerialPixel :
http://www.facebook.com/pages/Blaste...16911251711039
http://twitter.com/BlasterDev
I think stramit and few others told me that before...i am working on a model now and it has tangents for normal mapping...i've never used vertex painting before and my shader will have three extra inputs for diffuse/NM/Spec/Gloss for each damage texture and yes, those damage textures will have alphas to seamlessly blend it in... (the default alphas are only 8bit...i am using 32-bit textures)
I am also not a programmer, so i have to learn how to do that![]()
If you already have the damage textures I would be glad to help. But if you're really not a programmer you'll have to be at least in order to call a function doing what I suggested you. I can help only if you let me put the graphs and source code here in the forums, that's the only condition (Also I must have the damage textures you intend to use to be as close as possible of your working "conditions", and tell me what channels you use for your main models...).
BLASTER - Game Trailer ! :
http://www.youtube.com/watch?v=cs7D7Y-RiDY
Follow SerialPixel :
http://www.facebook.com/pages/Blaste...16911251711039
http://twitter.com/BlasterDev
I'll see what i can do... i am working on an alt costume for a model...I will post my first WIP thread here soon. (I come from a CG background so vertex painting and real time stuff is still new to me...)
EDIT: I will be using the Diffuse/Normal/Spec/Falloff channels of my shader to layer on my damage textures
Last edited by Neptune_Imaging; 03-29-2011 at 07:43 AM. Reason: added more info
Well actually I come from a CG background too, I've been working with unity for 6 months now. I'll wait for the WIP, of course you can contact me if you wish a vertex-painted Damage script/shader.
BLASTER - Game Trailer ! :
http://www.youtube.com/watch?v=cs7D7Y-RiDY
Follow SerialPixel :
http://www.facebook.com/pages/Blaste...16911251711039
http://twitter.com/BlasterDev
Will that work with my custom shader? I also use SSE, and i am looking at your Vertex painting offset shader video...neat stuff. I mainly want to use this on character models, (my shader is kinda performance heavy but won't know until i test it). And I am using Unity (non-pro)
Yeah as I told you I can actually dynamically in scripting see wich vertex is being touched when a collision occurs, paint the vertices with for exemple a red color, set the strength of the color to be the force in which the model was touched, and in SSE bind this color to a texture map which behaves correctly to the normal maps and so on. If you saw my video/shader, you also saw that I can basically BLEND colors too wich can give pretty good results say you want to have damage + blood, and want the blood to be reflective etc. As I did it for my shader theorically it isn't really that hard so. ^^
BLASTER - Game Trailer ! :
http://www.youtube.com/watch?v=cs7D7Y-RiDY
Follow SerialPixel :
http://www.facebook.com/pages/Blaste...16911251711039
http://twitter.com/BlasterDev
Sweet man...i will definitely keep you posted... I still need to learn how to code... my WIP will come soon
![]()
No problem, glad I can help. And sorry for deviating your thread Stramit !
BLASTER - Game Trailer ! :
http://www.youtube.com/watch?v=cs7D7Y-RiDY
Follow SerialPixel :
http://www.facebook.com/pages/Blaste...16911251711039
http://twitter.com/BlasterDev
chkkll.deviantart.com
Well he said he'd be answering and doing demo versions for all those who asked questions, but it'll take him a while. So hang in there, he might have something in the works for you? For my part, I didn't know how to fix your problem, or what was wrong with it, actually I didn't quite understand at all, just I get the impression toon shaders are some other kind of animal and people always seem to have comparability problems with them.
Resident Lightmap Whore and person voted least likely to take the Apocalypse seriously.
I'm a PC, and hiding porn on your computer was my idea.
Support these plugins: Playmaker, uLink, SSE and Volume Grass. Or I'll set Miss Piggy on you.
Hire niosop - awesome programmer, a genius actually!
It's too hot to work right now!
hahaha i loved the part toon shader being an animal... i dont have any problem with it actually.. i dont know how to achive toon outline with his shader editor...
chkkll.deviantart.com
Off the top of my head, something to do with fresnel or ramp lighting but based on view distance might do it. But again, I'm really aren't sure. The lighting and vertex side of things are all a bit mystical to me, like a girls bra when I was at school, I knew they existed, I knew what they did, but I'd be damned if I knew how to operate them..
Resident Lightmap Whore and person voted least likely to take the Apocalypse seriously.
I'm a PC, and hiding porn on your computer was my idea.
Support these plugins: Playmaker, uLink, SSE and Volume Grass. Or I'll set Miss Piggy on you.
Hire niosop - awesome programmer, a genius actually!
It's too hot to work right now!
Hi Stramit,
I had a go at your UV pan example and was able to get my shader to work. Thanks a lot.
I have an SSE question. I tried installing version Beta 4.0 but I can't get the preview window to work. It just appears pink. Could this be because we are using an older version of Unity? We are currently using 3.0.0f5. I know there some large descrepencies in shaders between 3.0 and 3.2. Anyways looks like we might be switching to 3.2 soon so I will try again and keep you posted!
This is the error message that shows up in the compiler:
(!) Shader error in 'ShaderEditor/EditorShaderCache': Program 'surf', cannot locate suitable resource to bind parameter "Custom" at line 96
(!) Shader warning in 'ShaderEditor/EditorShaderCache': Program 'surf', implicit cast "float4" to "half3" at line 121
Can you send me the graph that makes the pink material... that should not happen so there is a bug I need to fix there.
Have you tried the Strumpy Shader Editor?
For Beta 4 you need unity 3.2/3.3 a lot of the shader API stuff has changed internally.Hi Stramit,
I had a go at your UV pan example and was able to get my shader to work. Thanks a lot.
I have an SSE question. I tried installing version Beta 4.0 but I can't get the preview window to work. It just appears pink. Could this be because we are using an older version of Unity? We are currently using 3.0.0f5. I know there some large descrepencies in shaders between 3.0 and 3.2. Anyways looks like we might be switching to 3.2 soon so I will try again and keep you posted!
This is the error message that shows up in the compiler:
Have you tried the Strumpy Shader Editor?
Bah! I completely forgot you wanted this. Sorry man, I'll do that tonight!
Have you tried the Strumpy Shader Editor?
Ah, the old DX and AA issue. I know how to fix this and it will be in Beta4.1 (it's caused by annoying dx antialiasing settings).I've a very strange problem with this shader. I downloaded your package, loaded the "Distortion" scene and everything was fine. Then I created a similar shader with some modifications, but the distorted image was upside down. So I reloaded your demo but suddenly the distorted image of your shader was upside down, too. Even when I restart the computer, create a wholly new project, then re-download and import your package, the distorted image is upside down :
Does anyone know how to fix this problem ?
Have you tried the Strumpy Shader Editor?
Have you tried the Strumpy Shader Editor?