Stick a billboard to a skinned mesh?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
lulzfish
Posts: 34
Joined: Sat Aug 15, 2009 8:19 pm

Stick a billboard to a skinned mesh?

Post by lulzfish »

I'm working on a program that is supposed to simulate cutting someone with a scalpel.

It needs to show blood near the cut. Currently I'm trying to use billboards for this.*

However, I need the billboards to move with the person. I'm assuming that I can't use the skeleton because I don't have any weights for the billboards.

My plan is to modify getSceneNodeAndCollisionPointFromRay (Which intersects the scalpel with the person) to return the index of the triangle instead of just its points. With the index, I can track the triangle and find some way to move the billboard with it.

Is there any simpler / better way to do this?

* I could also use a texture map for blood, in that case I think I would need the UV coordinates of the triangle, so I can reverse from a 3D position to a 2D texture coordinate.
Is the somber dream of the Grim Reaper a shade Darker Than Black?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Stick a billboard to a skinned mesh?

Post by hendu »

Yes, read the left4dead wounds paper.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Stick a billboard to a skinned mesh?

Post by smso »

Search for decal in the forum.

Regards,
smso
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Stick a billboard to a skinned mesh?

Post by ACE247 »

Hey thanks hendu for the left4dead paper recommendation!
Didn't know Valve had so much stuff out there, guess I'm sorted with reading material for the weekend. :)
lulzfish
Posts: 34
Joined: Sat Aug 15, 2009 8:19 pm

Re: Stick a billboard to a skinned mesh?

Post by lulzfish »

smso wrote:Search for decal in the forum.

Regards,
smso
Thanks, I forgot about that.

So I'm trying http://irrlicht.sourceforge.net/forum/v ... =6&t=44968

But it looks like there's a couple of files missing? The download doesn't have DecalLoader.h or EmptyDecalSceneNode.h.

Edit: It works if I comment out the #Includes that reference those files.
Is the somber dream of the Grim Reaper a shade Darker Than Black?
lulzfish
Posts: 34
Joined: Sat Aug 15, 2009 8:19 pm

Re: Stick a billboard to a skinned mesh?

Post by lulzfish »

http://imgur.com/XvuNn

It doesn't seem to stick to the animated mesh. (The cylinder is doing crunches) It works well aside from that.
Is the somber dream of the Grim Reaper a shade Darker Than Black?
Post Reply