Skip to content

logo

Brute Force NFT Games

Play to Earn Games

Menu
  • Home
  • Contact Us

Month: April 2019

Farting mushrooms – Devlog#10

No Comments
| Mushrooms

Didn’t expect that one now did ya?

The art of farting sounds

Farting sounds were fun to implement in Crumble because it just takes you by surprise and I’m a huge fan of trying to make the environment react to the player.

So having good sounds for it is important and cycling through a list of them is better than just a regular unique farting noise.

This is a simple function to call when you want to play a sound on an audio source. You can notice that I change the pitch of it to play variations of the audio clip based on the scale of the mushroom. The larger it is the lower the pitch.

I also add a little offset just to add a little variation just in case. And everything is clamped between reasonable pitch values.

This is what the result sounds like:

Also on a side note I’ve been reading multiple tips devlog here https://johnleonardfrench.com/articles/10-unity-audio-tips-that-you-wont-find-in-the-tutorials/

And it’s actually really useful information, so if you’re interested in audio inside unity give it a read.

Scaling the shrooms

For scaling the mushrooms and getting this nice dynamic effect of being pressed and regrowing with time I simply used a scale multiplier in the script!

I’m getting the distance from the mushroom to the player in update and triggering the function based on that, It’s way cheaper to do it this way than with triggers and actual rigid bodies that will collide with the player (Although it would look cooler).

The scaling of the mushroom is based on this too + delta time!

And this to grow it back up depending on t time.

Also, make sure the pivot on your shroom mesh is at the base of the mesh-like so:

There is nothing much to add to it, it’s just farting mushrooms.

If you want to experience farting mushrooms yourselves, wishlist Crumble on Steam…

Read More »

Watercolor shader – Devblog#13

No Comments
| Mushrooms, Origin Story

How about a devlog about a watercolor shader? Sounds good! And you don’t even have to bring your brush with you!

Inspiration

Let’s talk first about what inspired me to make this watercolor shader in the first place.

I’m a big fan of Moebius and when I saw the tweet from @harry I knew I had to try and emulate that sweet style.

And I think I’ve succeeded, you can see the result of the shader in the last LDJAM I did HERE.

Quick gif of it:http://web.archive.org/web/20201130175714if_/https://static.jam.vg/raw/b1b/91/z/28d20.gif

I’ll talk more about the design and the process and show some textures.

What we want to have

For it I want to have:

-A cutout texture

-Outline

-Unlit with colored shadow

-Moving shadow

-Moving textures

-Ink Fx Mask

The Base

We start with a base shader in Unity3D with light and texture.

This is the base shader for the watercolor effect. This includes color, texture, and fog.

I simply made patches of color and used the Fx tool in Photoshop to get a clear black outline, the background is transparent because I use the alpha channel to mask the base color of the asset.

Outline

The outline is pretty basic and doesn’t need a lot of explanation, only later because of the ink mask I’ve got for the “fade” effect.

Add the shadow

Now we’re going to have fun with shadow and it’s really easy to do in the fragment shader, also we can color the shadow in this process 🙂

The shader is getting a bit long so I retracted it. A couple of things to pay attention to, I added the line “uniform float4 _ShadowColor;” which is the color value for the shadow but it’s not a property in the shader, it’s a property modifiable via shader, but you can as well put a _ShadowColor in the property of the shader if you want to control it via material.

There is also the use of a smooth step function to control the shape of the shadow, which will be useful for what we need to do next!

Also on the screenshot, you can see some grains added by the post process of the camera, adding grain is a good way to have that watercolor paper vibe.

Make the shadow move

You may not want to have this in your game or for your visual assets but I like to have some kind of life in my environment and I prefer to do it via shader.

A moving shadow makes the asset look watery.

I’ve also added a color gradient for that subtle Moebius/watercolor color easing.

Don’t mind the magic flying values, I’m a math wizard.

The actual import part of the shadow control is here:

I use a lot of smoothstep to control how the shadow line should behave then I lerp it to a second inverted shadow line to get that saturated dark watery edge you get when you put too much water with watercolor.

There are many more things to the shader like a moving background texture declared at this line:

And the color gradient at these lines:

If you want to stop there you should because the next step is a bit more advanced and if you don’t know what you’re doing it will not work for you. The last one is good for a watercolor effect without any mask or additional effect, the only thing you can change to make it better is by drawing your own textures.

Ink mask

/!\ If you don’t want the mask use the shader code with moving shadows above!

This is an example for the use of the Ink mask in the project. It’s a great way to instantiate objects with Fx etc… And it keeps the visuals interesting and alive.

For that, you’ll need a RenderTexture and a Camera to render it.

This is the full final shader of the effect, I tried to clean it up a bit.

If you’re not familiar with using RenderTextures in shader let me explain with some lines from it.

Uniform means you’re getting it from a global value that you can modify via script much like how I manage the shadow …

Read More »

Good Reads

  • How to Play and Earn with the Axie Infinity (A Step-by-Step Guide)How to Play and Earn with the Axie Infinity (A Step-by-Step Guide)
  • Is Axie Infinity a free NFT gameIs Axie Infinity a free NFT game
  • How to Sell Axies in the Axie Infinity GameHow to Sell Axies in the Axie Infinity Game
  • The Growth of Axie Infinity in 2021The Growth of Axie Infinity in 2021
  • The move behind the creation of Axie InfinityThe move behind the creation of Axie Infinity

Pages

  • Contact Us
  • Privacy Policy

Archives

  • May 2022
  • April 2022
  • April 2021
  • April 2020
  • March 2020
  • October 2019
  • June 2019
  • April 2019

Categories

  • Avion
  • Axie Infinity
  • Crumble Digest
  • Fog Shader
  • Image Effects
  • Mushrooms
  • Origin Story
  • Palely
  • Tether Swing
  • Water Sea

Brute Force NFT Games 2022. Powered by WordPress