Archived

This topic is now archived and is closed to further replies.

malachii

Putting "marks" on terrain?

Recommended Posts

Well, the terrain engine for my Tank Wars style game is virtually complete. There is one feature I would still like to add, and that is markable terrain. You know, placing tread marks on a terrain (like in that TreadMarks game!), or bullet marks, etc. My question pertains to how this is accomplished. Should I simply create many huge textures in system RAM (my terrain is very large), and lock the texture, then modify it? Could somebody give me a smal code snippet to look at perhaps? Thanks very much, Mal.

Share this post


Link to post
Share on other sites
This is probably helping you...

http://www.flipcode.com/tutorials/tut_decals.shtml


Edited by - ThePacki on January 2, 2002 10:01:02 AM

Share this post


Link to post
Share on other sites
The article was wonderful. Thanks very much! I was under the impression that a new texture was applied to the existing mesh...

So these terrain marks are actually new polygons? I assume they use alpha belnding to achieve their transparency... Isn''t too much alpha blending slow?

Also, if there are lots of explosions, won''t this slow things down since you now have 100''s of new polygons?

Some sophisicated decal culling would seem to be in order. I guess a quad/octree would do the trick.

Share this post


Link to post
Share on other sites
Soooo. I''ve been putting more thought into this decal method...

My terrain is deformable by explosions, etc. I guess I have to recompute all the decals when the terrain is deformed, right? ugh. What a pain in the arse that will be!

Not to mention that I will certainly have to apply the decal to many polygons, and determining which ones is not altogether trivial due to the level-of-detail nature of the terrain engine. They I must clip each decal since for just 1 explosion mark perhaps 40 decals will be created. Yikes. I smell a slowdown brewing.

Any thoughts?

Mal.

Share this post


Link to post
Share on other sites
I can help you!

If the terrain has been deformed, logically there was an explosion of some sort or something. Either way, there should likely be a very big blackish sort of decal, or at the very least the old decals should be gone.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites