Page 1 of 1

Bump mapping for ricochet.

Posted: Fri Sep 18, 2009 6:48 pm
by adameros
It would be nice to be able to load in a bump map for surfaces that would affect how shots bounce. Sometimes ricochet is a little too accurate... (Plus is would make it so lasers were not quite so over powering)

Re: Bump mapping for ricochet.

Posted: Fri Sep 18, 2009 9:24 pm
by tobylane
Bump mapping is normally used to apply 2D to 2D to make 3D, which is possible and probably coming/already suggested. I havn't heard of bump mapping meaning 3D in this way but I know what you mean. I don't think the same ideas apply, this needs exact details on the texture, per part of a world unit or so, which may be too much.

Re: Bump mapping for ricochet.

Posted: Thu Oct 01, 2009 11:54 am
by optic delusion
Bump Mapping is for textures, not really what your talking about here, but...
I did this a long time ago with L4M3R. He wrote a little script that would wrap any object in tiny invisible faces that had random angles. Shots would bounce off a box in strange ways, sometimes right back at the shooter. It wa fun for an april fool's day map, but not something i'd want to use every day.
Adding hundreds od invisible faces to a six-face cube can make FPS slow. That's becoming less of a concern nowadays, with faster video cards. You might want to use it on one or two objects, but don't make a whole map using this technique.

Re: Bump mapping for ricochet.

Posted: Fri Oct 02, 2009 1:44 am
by BinarySpike
This would be pretty easy. Bump maps are basically vector normals spread across a 2D face to give it a 3D appearance of shading and such. (not quite but you get the idea)

What happens now basically
1) The shot is fired, the segment of the shot is calculated
2) The segment intersects with an object
3) The normal of the shot is calculated and a new segment is generated and calculated

All you would have to do is when the normal is calculated you find where it struck on the bump-map and you add the normal to the one calculated. Although because bullets and walls have no... er... elastic'y? then bullets would spread randomly. I would add a variable factor that was applied to the bump-map normal so that when it's added to the bullet/segment normal it "dampen" the change.

For example, if you had a metal texture with tiny little bolts around the edges, if you bumpmap these and someone randomly hits the bolt it would drastically change the bullet. That would look glitchy. But if you "dampen" the normal it would look fine.