How to stop tiling texture??

Hey guys, having a lot of problems with this one. Anyway I am trying to overlay alpha texture over diffuse and i want to move that texture on y axis and bring it gradually down. However i cant make texture not to tile on axis.I am trying to make a health bar that way, just experimenting… Any ideas, I ll take anything xD


I’m not sure this is the best way…an easier way would be to make the image twice as big in the y axis and leave the empty half blank…or better, just move the image. if the clamping is not going to work how you expect it…you used to be able to use an object to control the mapping, but either I forgot how to do it correctly or it does not work in the bge.

Tnx, I ll try making larger image :smiley:

That gave just a part of solution, still having problem with transparency… Anyone has any idea how to approach making of diablo style health orb? I can make it in cycles or internal, but game engine just wont cooperate… My biggest problem is making circle to appear. With rectangular health bars is easy - you scale them according to origin and add some properties, but here you cant just scale the circle, and build modifier would be overkill…

Have a look at the node editor. It will allow you to stop the tiling.

Also see:

This is how I do health barse and similar things these days. Actually, I need to update that tutorial, there’s a small tweak to it I’ve discovered.

The advantage of the node editor is that you can map multiple texture maps on top of each other in funky ways. So here I’ve got the method in the tutorial to do the animation, and have another image overlaying it (the ‘ticks’ around the edge).

That is really cool, I am very good with nodes in cycles but never used them in game engine so it is gonna take a while while i get them. anyway I am going for something like this https://youtu.be/-bU0lesUai0?t=259

you just want to have a hp bar that goes down(and ofc back to full)?
That is easy to make with just a simple animation and 1 property to set the frame the action should play.

always-> and- action (set it on property)
put a property on the plane and let the action brick run from that property
the plane (hp bar) set the origin(orange dot) at the bottom of the plane.
animate the plane (scale it down) insert keyframes (lets say 0 for 0 hp and 100 for 100 hp)
set the action in the logic brick, and now by changing the property value it will go down or up.

Hey. No I want to do health orb and I cant just scale it like normal health bars. I need to cut orb horizontally when player is losing health…

you can rotate a sphere. half textured red, other half black or transparent…backface culling…

[video]https://streamable.com/ttkdr[/video]
[video]https://streamable.com/jh9kj[/video]

Here are two videos, one with rotating sphere and one with half transparent texture. Still I Don’t quite like it. I need to do some overlay animations and it is not easy If I am animating UV’s. Sphere is cool but because of the top line you can see that something is not right…

what about animating a ramp texture?..if that is possible? I’m sure it is…I just never tried it.

Hey. No I want to do health orb and I cant just scale it like normal health bars. I need to cut orb horizontally when player is losing health…

so you want this?

round_healthbar.blend (492 KB)

W increases HP
S lowers HP

Square but round, texture it nicely and its an round hp bar :wink:

Tada:


Done with a node shader very similar to the one in my custom healthbars tutorial, just I threw a texture sample in there.
So nothing scales, in fact, nothing moves. It just plays an animation on the object color - where magic happens.

It respects the alpha of the texture, so it doesn’t matter if the ‘bar’ is a hear, star, or whatever. It will fill the image along it’s vertical axis, so don’t expect a squiggle to fill up in order.

Blend:
BallHealthTexMask.blend (649 KB)
W/S to change health.

(Pokeball Image source url)

@JustinBarret:
in the node shaders you can animate a ramp texture, that’s how the speedometer I posted a little earlier has the current ‘tick’ being white. There’s a color ramp which is bright red, a white stripe, and then a dark red.

I love you guys. now I can sleep in peace, THAAAAAAAAAAAAAAAAAAAAANks :smiley:

Sorry, I did not look at what you guys did, but did you animate the first uv layer, and hold the second layer an alpha(non animated)? I never use nodes :slight_smile: