Resource Bubble is a shader designed to help you create a resource orb (or bubble :] or globe :] ) for display of HP/MANA/ENERGY or any other resource. Asset package contains shader itself orb model as well as a set of textures for the shader.
20+ textures for “liquid” part of the orb.
3 mask textures that control how “liquid” fades into “hotline”
1 scratched glass orb texture
1 hotline texture
multiple complimentary textures (dragon, spikes) that were used in the demo.
You select what textures you want to use and set scroll speed for x and y axis of each texture.Shader also allows setting color for the “liquid” part and the “hotline” part. Shader fill is controlled using single float value.
Orb model is used to add depth and roundness to the globe. You can still use this shader with standard unity UI Image but in this case, orb will appear flat.
It’s a nice asset, but if you ask me, it would be much more appreciated if you would make it so that it would work properly with UGui, because i don’t think people would be happy to have two solutions for HUD at the same time when they can easily use the UGui for most of stuff, the problem would be how to use your system in combination with new unity’s gui system
also, i think a description of what each one of the first three textures do in detail would be nice.
If by depth you mean how three textures would blend, did you give compute shaders a try? they can read and write to textures very fast, not sure how would you convert a texture 2D to a sprite by code to use in UGui though, but using compute shaders would let you use all the power from GPU to calculate new textures at run time !
By depth I mean that orb appears to be 3D. You can see how “mana” bends and wraps around orb inner walls during movement. I do not get the same effect when simply using material on uGUI image. But I guess this “depth” is very subtle right now. I have to emphasize this in feature updates. I guess this asset is in dire need for a proper web demo with uGUI and mesh prefabs side by side on the same screen.
Take a look at this page, it has a spherical distortion, i am not sure if it would be easy to convert it to be used by a shader or not but it worth giving it a try, if you are registered (free) then you can download the source and take a look into it
Is there anyway to get this shader to work with uGUI’s scrollbar Fill transform? My scripts interact with the fill to update the globe, so can it be set as the Fill rect on a Slider component?
EDIT: Just purchased wanted to support you on this!
EDIT Again: Got it working looks awesome! I am wondering thought it seems like they are affect by light in the scene if you are moving a player camera around, is there anyway to avoid this so that they dont “flicker”?
In general the asset should not be affected by lights.
This video is my attempt to make it flicker. As you can see it does not flicker when I move the camera and move around.Sorry for the chunky frame rate.
I got it working I basically had to setup my UI image globes that have the material attached on a separate canvas than the one I was using. It is working beautifully now!
I have it setup as a material on an Image, my script is all custom coded now to update the progress float working great, amazing asset man! A++++++!!!
I have tried for hours to get this to work within UGUI without success. All the sprites (as soon as I add any Resource Bubble material to a UGUI sprite) are 100% black.
I’ve made a hotfix. Please contact me via support email I will send you fixed shaders.
It will be 5-10 work days before fix gets published due to the lengthy approval process.