Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Texture Projection

Author
Message
Dark Fire
18
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: In the code you write
Posted: 10th Apr 2010 08:25 Edited at: 16th Apr 2010 07:32
I have some code for painting an image on a texture based on 2d coords. I need to figure out a 3D solution so I can paint an image based on a 3d coord.

The problem is converting a 3d position to a 2D position on the texture.

Is there a solution for painting on a memblock image or is there a better way?

Here is a solution used in the overgrowth engine:
http://www.moddb.com/games/overgrowth/news/how-to-project-decals

A shader might be a good idea cuz the flash light shader seems to be a start but needs more then one image to be painted on it. (Like multiple decals)

Painting on an image doesn't work if the texture is repeated. It would be difficult to paint on an uv mapped image. Shader based object painting or image kit solution that works for 3d.

I think this command might work: ADD STATIC SCORCH. I tried everything I could to try to get this to work. Anyone figured out how to use the gamefx commands?

I haven't found anyone with a solution yet. I would be willing to work with anyone on a solution based on my code. Either way let me know if you have any thoughts.

Still Unsolved

Thanks,

Dark Fire

My future self met up with one day to teach me what I know today.
Cetobasilius
16
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 10th Apr 2010 15:25
Are you looking for something like this??? :

http://forum.thegamecreators.com/?m=forum_view&t=158832&b=8

hi
Dark Fire
18
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: In the code you write
Posted: 10th Apr 2010 22:14 Edited at: 15th Apr 2010 11:26
@Cetobasilius - I already know about about that solution. It doesn't work on complex objects. Thanks anyways!


That will not work. Any other ideas?

My future self met up with one day to teach me what I know today.

Login to post a reply

Server time is: 2026-07-26 15:31:26
Your offset time is: 2026-07-26 15:31:26