How to create the effect of bullet marks?
How to create the effect of bullet marks?
I mean what examples help me. Or key functions
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation
What function can be draw a quads?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....
and Collision detection can get intersection position but a quads need four points position
-
- Posts: 39
- Joined: Mon Sep 06, 2010 5:09 pm
- Location: Italy
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)
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)
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.RuggJack93 wrote:draw a cube scene node an set its Z scale to 0, create a plane mesh and load it...
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!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.
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.
I just find the function addHillPlaneMesh() without 3D coordinate parameter in irr::video::IVideoDriver Class ReferenceRuggJack93 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)
if I create a plane mesh I have eight bullet holes, do I have eight scenenode store them?
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.
It could at least give you an idea.