My goal is to create a sort of orb created from wind. Sort of like like Aang’s air scooter from Avatar: The Last Airbender. I don’t like the sharp edge of the sphere and I was wondering if there is a good way to feather it?
I’ve also tried a bit of vertex offset, but it looked terrible. I am fairly new to working with shaders, so maybe it would work, but at the moment I’m lacking the experience to know how to make it work.
Is there a better way to accomplish this feathering? Or some way to break up the edge a bit?
Looks like you’re pretty close to the solution already. Just inverse your inner fresnel results (unreal calls it a OneMinus node). Additionally, you could multiply the noise texture through the inner fresnel before combining with the other fresnel.
Instead of multiplying those two fresnel values try taking the minimum of the two. You might have to readjust the exponent of each to get the right looking result, but with your current setup it should give you black on the “inside”, a white ring, and black out the outside.
Things to try.
Scale the power of your fresnel between a couple values using another texture.
Scale the offset of the fresnel with another texture.
Flat out multiply some noise against your opacity, but add back a portion of it.
It occurs to me that you might want to create a layering effect with this so that the back part of the sphere is broader and darker, and the front part is thinner and lighter. Your sphere is flattening out because everything is the same value no matter what direction it’s going or what distance it is. I think your challenge here is to create foreground/background relationships.
Are you actually using a sphere in the final effect or will it be a sprite?
I can see what you mean. I am planning on using a sphere for the final effect. Do you have any suggestions on how I could improve the foreground/background relationships? Or how I could incorporate the broader/darker back and thinner/lighter front to the sphere? Or would using sprites be a better?
If you can use a sphere, that’s probably ideal. That will allow you to have the sphere look more like it’s surrounding your target, no?
You should be able to use the negative normals to help split the background from the foreground. Making the bkg dimmer and more blurry is probably a good idea.
Remember, warm colors approach, cool colors recede. So an ever so slight saturation might help you. Subtlety!
Also, consider letting the foreground swipes cover the character up just a little to sell the near face of the sphere.
One other option, if you need to make more of a unique fresnel effect is to make a small horizontal gradient texture defining the opacity you want, then take that initial fresnel value and use that as the X coordinate when reading that texture. After that, it’s easy to make a small collection of fresnel gradients that can share this one shader (even all within one texture to save memory).
Right, and I set the face culling to double sided. I can use the face sign node to assign a color based on whether the geometry is front facing (facing outward) or back facing (facing inward). @William_Mauritzen suggested making the background (in this case the back faces) of the sphere more blurry, but I’m not sure on how to do that via shader. I’m still very new to making shaders (and working with 3D objects as well), so I apologize if I’m not using terms correctly.
I haven’t used Filterforge for a couple years now. I don’t remember how to get the camera reflection or normals. There could be an issue with the back faces thinking that they face the camera and therefore the backface normals are positive as well.
Just be warned that a dot product result is a cosine, so half of a fresnel LUT gets used in the first 15% of the falloff. You can convert to a linear falloff using acos() to get better and more understandable use of the texture, but trig functions are quite expensive and textures are fairly cheap.
I’m sorry. I was very unclear. If I remember what I was thinking…I thought you could use two sphere. One for normals that face the camera from the outside of the sphere, and one for the inside. Both would be single sided materials. You’ll want to have the edges of the sphere blur out. So as the normal goes to 0. Blend to 0 faster against your fresnel.
The textures used for the inside of the sphere that faces the camera could be blurrier and tinted blue.
I don’t have a strong vision of your environment or character, so it’s hard to tell how well a lot of this will work. But two spheres means twice as much control…but half as performant as one sphere.