Hi,

On 18/10/10 09:19, Aitor Ardanza wrote:
Hi Delport,

Yes, I have implemented this already ... I have: - Complex model
vertex picking. - Texture coordinates of the vertex I need the
texture coordinates of the picked vertex area, projected in the model
to paint the area, like this: [Image:
http://img89.imageshack.us/img89/5715/29436173.jpg ] I do it on
fragment shader, but i dont know how can I save it on a new texture
to go painting new areas every time I click on the model... One
solution would be to keep the vertices in a vector and them paint the
areas in the fragment shader every frame, but I see more practice to
keep a new texture and combine it with original texture.

if you have the list of vertices, you can reproject them back to texture coordinates in the same way you do with the picking can't you?. You can also try intesecting with a polytope instead of a line, to get multiple intersections.

So:
* pick and get list of vertices
* convert vertex coords to texture coords
* in RTT modify texture
* swap old texture for new

jp


Thank you!

Cheers, Aitor

------------------ Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32803#32803





_______________________________________________ osg-users mailing
list osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to