Animated Character Projector

Greetings!

I’m obviously new to the forums and have enjoyed reading at length the topical information this great site has to offer. I’ve been fumbling on my own in the shadows quietly and have found no solution or clue to my conundrum thus far. I do have many conundrums with Unity at present, but this one in particular leads me to ask if my understanding is correct.


This is my desired result! I can haz heroprojectorz?

And a video of what I’m trying accomplish.


Quick Lerpz example. The projector is rotating perfectly, but the tiled cookie is a mystery.

The video clip above is of the game Heroes V - Tribes of the East. My primary focus here is the hero character’s animated projector which rotates on the ground directly below him. I am trying to achieve this same effect in Unity 3 with the projector and have no success thus far, even after trying numerous ideas. I can only get the projector (which is placed directly over the hero and pointing downward) to produce a tiled pattern all upon the entire terrain.

I tired many variations of the alpha map and different projector modes. I also tried several file formats for my alpha map (PNG, TIF, TGA, PSD) and all failed. This seems like it would be a very simple thing to implement, but apparently this isn’t as simple as it looks. Perhaps my understanding of how the projector works is limited, but I’m very close to my desired results…I just need that tiled pattern to display a single image.

Any help would be marvelously spectacular to say the least! :stuck_out_tongue:

Try setting the Wrap Mode of the texture to Clamp (not Repeat).

I have no idea where to set this to clamp. I just simply created a material with the appropriate settings and dragged my textures over from Assets and I saw none of these options. I’m still looking around now and can’t find where to do this at. I found this in the manual and it mentions this, but shows NO way to accomplish this task.

Thanks for the hint, BTW, I really appreciate the help.

Find your texture in the Project view and select it. The Wrap Mode option appears in the Inspector view.

Angel from Spain, I thank you very much! I only wish the manual had a search engine 'cause this was one of those silly things I should have found long, long ago. Thanks a bunch once again!

I did get it working…sort of, but now I have these two crossed lines to deal with. At least I’m down to one circle now and I’ll play with the inspector’s options until I fall over I guess. lol

Edit: I just fixed the X/Y artifact by adjusting;

* Correct Gamma: Checked
* Border Mip Maps: Checked
* Mip Map Filtering: Box

I hit Apply and bam…


Lerpz Gone Wild! And enjoying his newly acquired magical codex thanks to angel_m!

Those parameters didn’t fix the lines completely, but about 99%. I think I read somewhere here about touching the borders with the graphic…either move it away from the border or make it touch.
I also need the brightness/gamma of this to be higher. I duplicated it and had two projectors going, but that seems really impractical to be a solution.

I’ll mess with this more and report later…although, me and Lerpz seem to be the only ones interested in this effect at all. :slight_smile:

I had the same issue with projectors previously (referring to your image with the 4 green lines going off in different directions). I found that, like you said, an image with transparency that is being used as a projector creates those sort of artifacts when the opaque part of the image gets too close to the border. But it seems like you got it working. Looks cool!

Yes, I think moving it away from the border can help.
Good job. :slight_smile:

It’s funny because sometimes the easy things can be the most frustrating in Unity it seems. I’ll have to spend more time with the Inspector and the relative options for assets…and some sleep once in a while might be a good idea, as well. Thanks for the encouragement, kind words, and the help! Lerpz wanted me to send up an animation, so I decided to put one up before I move on to my next problem.

I am having the same problem with brightness. Did you figure out a solution? Ambient light really fades out the effect.

Well, I did find that duplicating the same projector did the trick quite well, and if you have it instanced…it really shouldn’t take that many more resources. Unfortunately, I could not arrive at a logical solution to simply “brighten and glow” the thing due to the inherent nature of the projector shader. Being relatively new to Unity, I’m not really sure how one could easily do this…but simply duplicating the projector was the fastest solution for me. I felt that the hero character deserved this feature done properly at whatever means necessary. Perhaps someone will chime in with a quick and easy way to make the projector brighter with a simple line of code that I’m missing, but I see no obvious parameter in the component to tweak.