x


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

more ▼

asked Mar 17 '11 at 03:33 PM

raul corrales gravatar image

raul corrales
268 25 28 34

Upvote for a classic :-)

Mar 17 '11 at 03:58 PM efge

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

Mar 17 '11 at 05:05 PM DaveA

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.

Mar 17 '11 at 05:43 PM Jessy
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Apr 07 '11 at 10:13 PM

Marnix gravatar image

Marnix
1.3k 22 31 45

(comments are locked)
10|3000 characters needed characters left

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 :)

more ▼

answered Mar 21 '11 at 12:13 PM

Arnout Swint gravatar image

Arnout Swint
48 2 2 8

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

Apr 07 '11 at 10:14 PM Marnix
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1581
x330
x64
x17

asked: Mar 17 '11 at 03:33 PM

Seen: 1159 times

Last Updated: Mar 17 '11 at 03:33 PM