1
\$\begingroup\$

I want to create a blood splat effect as shown in this link: https://gfycat.com/CharmingThickFlies

The developer was nice enough to leave the source explain how to apply this. But I cant seem to follow the provided instructions. Instructions and code are here: https://www.reddit.com/r/Unity3D/comments/4108d1/new_splatter_shader_effect_im_working_on_perfect/cyyj988/

I want to get this effect to a prefab level which I can then instantiate in my code.

I have followed link on youtube and read up on how to use shaders but I can't seem to apply this in unity and get a prefab. I have tried applying this to a particle level system but that also did not help.

Some guidance would be appreciated. Thanks

\$\endgroup\$
  • \$\begingroup\$ "I can't seem to follow the provided instructions" — exactly where in the instructions do you run into trouble? Is there a particular step you don't understand, or that when you try to follow it you get a specific error, or a specific unwanted result? Telling us these details can help us focus in on the specific help you need. \$\endgroup\$ – DMGregory Apr 5 '18 at 13:40
  • \$\begingroup\$ @DMGregory I'm a complete beginner to game development. I feel that the instructions were written for some one who has prior knowledge. That is why I asked this question for help as to how do I get a prefab from the shader?? \$\endgroup\$ – StuckInPhD Apr 5 '18 at 14:16
1
\$\begingroup\$

The 'instructions' in the reddit comment are really desgined for people who know how shaders work. I'll try to break it down for you.

  1. Make a new material (like you would make any other game object), and store it anywhere in your assets folder that makes sense for you
  2. Download the shader file and attatch it to the material.
  3. Download the other two texture files, and attatch them to the fields on the shader stated in the reddit comment (MainTexture in Main and NoiseTexture on Noise).
  4. This is your completed material. All you need to do now is drag it to your Prefab folder and it'll make the material a prefab for you.

That's all there is to it. I think you mistook the comment for a tutorial when instead it was more a link to the files and how to put them together for anyone comfortable with shaders.

\$\endgroup\$
  • \$\begingroup\$ Thanks for clarifying that. I did as instructed but I still do not have something I can instantiate. Its a material not a prefab. I mean I cannot drag it into the hierarchy. I also tried creating a game object >> add mesh renderer >> add my created material. But even that is not working,. \$\endgroup\$ – StuckInPhD Apr 5 '18 at 22:09
  • \$\begingroup\$ You don't want to drag the material into your hierarchy. You either want to make a prefab of the material by dragging the material into the prefab folder so it can be accessed through code, or assign the material to a gameobject that you make a prefab of. \$\endgroup\$ – Daniel Wilkes Apr 23 '18 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.