How to create the effect of bullet marks?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
klikli234
Posts: 97
Joined: Tue Sep 07, 2010 10:52 am

How to create the effect of bullet marks?

Post by klikli234 »

I mean what examples help me. Or key functions
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Fastest way - simple geometry planes with alphed textures 8)))
Do you like VODKA???
Image
Image
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

To explain a little more, a common technique is to create quads wherever the bullet hit and texture that with a bullet hole. This works best on flat surfaces, though.
klikli234
Posts: 97
Joined: Tue Sep 07, 2010 10:52 am

Post by klikli234 »

Bear_130278 wrote:Fastest way - simple geometry planes with alphed textures 8)))
sorry, I can't understand.

did you have example?
you say geometry planes not like billboard or particle system in the irrEdit?
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Fastest way - simple geometry planes with alphed textures
simple geometry planes - really a quads (2 triangles)
alphed textures - a simple diffuse map for the bullet hole with alpha channel.

Like slavik262 said....
Do you like VODKA???
Image
Image
klikli234
Posts: 97
Joined: Tue Sep 07, 2010 10:52 am

Post by klikli234 »

Bear_130278 wrote:Fastest way - simple geometry planes with alphed textures
simple geometry planes - really a quads (2 triangles)
alphed textures - a simple diffuse map for the bullet hole with alpha channel.

Like slavik262 said....
What function can be draw a quads?
and Collision detection can get intersection position but a quads need four points position
RuggJack93
Posts: 39
Joined: Mon Sep 06, 2010 5:09 pm
Location: Italy

Post by RuggJack93 »

Well, there are many ways to draw a quad in irrlicht, just choose one that suits you: use the function addPlaneMesh();, draw a cube scene node an set its Z scale to 0, create a plane mesh and load it or even create your own custom scene node (if you really have to...) and others...

Then, when you have your quad, use the collision intersection point as center for your node (you also have to rotate it accordingly to the normal of the hit triangle).

Finally load your bullet mark texture, apply it to the plane and set its material
a to trasparent one (depending on the texture you loaded)
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

RuggJack93 wrote:draw a cube scene node an set its Z scale to 0, create a plane mesh and load it...
There's no point in creating a cube scene node with 0 depth. You'll still have lots of unneeded, redundant vertices. There's also no point in loading in something as simple as a quad.

Also, you should avoid creating a custom scene node for each quad. Creating a scene node that acts as a manager for a group of bullet holes (and maybe even batches them into one draw call) is a great idea, however.
klikli234
Posts: 97
Joined: Tue Sep 07, 2010 10:52 am

Post by klikli234 »

slavik262 wrote:
There's no point in creating a cube scene node with 0 depth. You'll still have lots of unneeded, redundant vertices. There's also no point in loading in something as simple as a quad.

Also, you should avoid creating a custom scene node for each quad. Creating a scene node that acts as a manager for a group of bullet holes (and maybe even batches them into one draw call) is a great idea, however.
you are right!
but all mesh put in scenemanager.
how can I draw all bullet holes by a scenenode?
I can used a plane mesh for many scenenode
but can I use a scenenode for many bullet holes?
Last edited by klikli234 on Wed Oct 27, 2010 7:24 am, edited 2 times in total.
klikli234
Posts: 97
Joined: Tue Sep 07, 2010 10:52 am

Post by klikli234 »

RuggJack93 wrote:Well, there are many ways to draw a quad in irrlicht, just choose one that suits you: use the function addPlaneMesh();, draw a cube scene node an set its Z scale to 0, create a plane mesh and load it or even create your own custom scene node (if you really have to...) and others...

Then, when you have your quad, use the collision intersection point as center for your node (you also have to rotate it accordingly to the normal of the hit triangle).

Finally load your bullet mark texture, apply it to the plane and set its material
a to trasparent one (depending on the texture you loaded)
I just find the function addHillPlaneMesh() without 3D coordinate parameter in irr::video::IVideoDriver Class Reference

if I create a plane mesh I have eight bullet holes, do I have eight scenenode store them?
joshcryer
Posts: 46
Joined: Thu Sep 13, 2007 8:57 am
Contact:

Post by joshcryer »

I used this uber simple decal engine for that: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=3464

It could at least give you an idea.
Post Reply