How i can repair my shoot decals?

Hi, i use a system of decals to shooting. When i shoot at the corners is it: alt text

and i want this:

alt text

Upvote for a classic :-)

I hope you're gonna port the music over too, in glorious MIDI-quality

Hey now, MIDI isn't audio. Every modern composer uses MIDI! It's all about the synth. But still, I've heard a lot of renditions of the themes, and none of them hold a candle to the original blippy bloops.

2 Answers

2

Awnser:

don't shoot to close at the corners haha

no just kidding...

what you could do (some sort of workaround) is create an non-collidable invisible wall right next to the corner that will overlap the decal.

just a thought :)

@Arnout, nice but inaccurate workaround =) Will also cost you extra memory to save an extra collision model for your whole world.

Multiple solutions are possible for this problem. Currently, you are creating decals of a standard size, which gives problems of course.


Solution 1

Update the actual texture, don’t use decals. Write your decal to the texture instead.


Solution 2

Perform multitexturing on every object that is shootable. Create a new texture with your decals in it, wrap it onto the building.

This solution is a memory eater, it creates textures for every object


Solution 3

Do a check of your decal when adding it to the wall. You could think of shooting rays from the back of the decal again. Or do a box intersect. The intersection points will let you clip your decal texture.

Yes this is a hard one, but gives you more freedom in your decals

The cheapest solution is texture manipulation. (But I think you will need a renderTexture for that?) It will result in the same amount of draw calls, where your decals create 2 extra triangles per decal (100000 bullets ouch).


Update

I found this little project on the forum: http://forum.unity3d.com/threads/2562-blood-splatter