I am trying to develop an editor at the moment. I would like to paint textures directly on the mesh ( like Body Paint ).
How can I select and then edit / paint on a texture that is directly below the mouse ?
I am trying to develop an editor at the moment. I would like to paint textures directly on the mesh ( like Body Paint ).
How can I select and then edit / paint on a texture that is directly below the mouse ?
I made for my game a simple JComponent extended to Sprite that can receive new data throughout the Graphics object. If you thereafter impl. a MouseListener that’d change the Graphics area it’d be possible to have som’th’ similar to your request, wouldn’t it be? ???
code is attached to the post as an url http://sf3jswing.cvs.sourceforge.net/*checkout*/sf3jswing/AnimationDemo3/src/sf3/Sprite.java?revision=1.66
(it is a bit too long to fully display it here)
I’m still testing the code, but you may proceed your own tests for mouse listening because I don’r need it at all. 8)
Notice the CompositeCapable interface that is quite simple. :-* :-* :-* :-*
I think he wants to paint on the actual mesh, as in 3d model.
Try picking to get the triangle you’re pointing at, then somehow get the precise position on this triangle, then what coordinates in the texture match it.
In any case, this is probably pretty advanced stuff
Not really. You have (a) ray tracing, or (b) storing a map of pixel–>(Polygon,Texel) for simple implementations!
EDIT: Note that the mapping can be restricted to the mesh in question, and gaps in the texel’s (from the screen mapping) are usually interpolated in any case.
Thanks guys, I think I may have found a way 