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:
htt
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.jp
OK, so we've finally arrived at your problem :)
On 15/10/10 14:31, Aitor Ardanza wrote:
Yeah, I understand it... but I can't work on a quad, because I need
to compare the position of the picking and the vertex in the vertex
shader, and depending on the distance between them make a new texture
..
Yeah, I understand it... but I can't work on a quad, because I need to compare
the position of the picking and the vertex in the vertex shader, and depending
on the distance between them make a new texture
Doing on a quad, the resulting image would be the next:
[Image: http://img836.imagesh
Hi,
On 14/10/10 17:26, Aitor Ardanza wrote:
Sorry for my explanation, but my level of English is not very good ...
I would need two textures, an original model and a modified one, which are
applied to the model.
I assume you have the original texture (O) loaded from file.
Prerender RTT came
Sorry for my explanation, but my level of English is not very good ...
I would need two textures, an original model and a modified one, which are
applied to the model.
Thanks for your patience!
Cheers,
Aitor
--
Read this topic online here:
http://forum.openscenegraph.org/viewt
Hi,
what comes out of the RTT camera is just a texture (or textures). What's
in the texture depends on what the camera is looking at (for no shader),
what it's looking at plus some processing on the output pixels (fragment
shader) or completely on shader code (ignore the scene and just use
in
J.P. Delport wrote:
> Hi,
> You can get an osg::Image for any or all of the RTT textures. Have a
> look at osgmultiplerendertargets.cpp example. Read below the line:
>
> // we can also read back any of the targets as an image, modify this
> image and push it back
>
Yeah, I've been playing and
Hi,
I'm still not sure what you want to save... Just the texture data?
You can get an osg::Image for any or all of the RTT textures. Have a
look at osgmultiplerendertargets.cpp example. Read below the line:
// we can also read back any of the targets as an image, modify this
image and push i
Hi,
The idea is to capture the mouse picking in the model and paint on. We can see
a red circle in the model and the result of RTT in the quad. I guess it will
catch part of the models arm..
[Image: http://img844.imageshack.us/img844/9583/kokkp.jpg ]
Whith these shaders I can paint red circles:
Hi,
sorry, I cannot know what you are trying to do with the shader, but
don't you need to init the texcoord you are using?
Something like
vec2 Texcoord = gl_TexCoord[0].xy;
I'd suggest trying to do a simple texture copy (or even just inserting a
constant value) in the RTT camera for a start
I don't know if this method helps me get what I want ...
RTT give me an image of the model from configured camera, but I need to take an
image, like model texture, painting only specific areas defined in the fragment
shader:
Code:
uniform vec2 textCoord;
uniform sampler2D baseMap;
uniform vec3
Hi,
a few things...
On 07/10/10 11:33, Aitor Ardanza wrote:
Frederic Bouvier wrote:
// load texture as an image
imgTexture = osgDB::readImageFile("model/BAKE_OVERRIDE.jpg");
// if the image is successfully loaded
if (imgTexture)
{
imgTexture->allocateImage(3500, 3500, 1, GL_RGBA,
GL_UNSIGNE
some help with this?
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32697#32697
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-ope
Frederic Bouvier wrote:
>
> > // load texture as an image
> > imgTexture = osgDB::readImageFile("model/BAKE_OVERRIDE.jpg");
> > // if the image is successfully loaded
> > if (imgTexture)
> > {
> > imgTexture->allocateImage(3500, 3500, 1, GL_RGBA,
> > GL_UNSIGNED_BYTE);
> >
>
> Why are you reall
> // load texture as an image
> imgTexture = osgDB::readImageFile("model/BAKE_OVERRIDE.jpg");
> // if the image is successfully loaded
> if (imgTexture)
> {
> imgTexture->allocateImage(3500, 3500, 1, GL_RGBA,
> GL_UNSIGNED_BYTE);
Why are you reallocating space for an image loaded from file
I do not get it to work I follow these steps:
Code:
// load texture as an image
imgTexture = osgDB::readImageFile("model/BAKE_OVERRIDE.jpg");
// if the image is successfully loaded
if (imgTexture)
{
imgTexture->allocateImage(3500, 3500, 1, GL_RGBA, GL_UNSIGNED_BYTE);
// create
I only found example of render to texture of the camera ...
How I had to do to have multiple render targets? like:
Code:
fragment shader
void main(void)
{
gl_FragData[0] = vec4(1.0, 0.0, 0.0, 1.0);
gl_FragData[1] = vec4(0.4, 0.4, 0.0, 1.0);
}
Thank you!
Cheers,
Aitor
---
I asked this question in gamedev forum, and they would suggest the following:
> You can not do it like you have in your example. You need to set up an FBO
> with multiple render targets, and bind your editedMap as one of the targets.
But I dont have idea how can I do this... How can I configure
Hi,
I'm trying to implement a simple model painter. I detect the intersection with
the mouse and loaded model, and I applied a red color to the area:
[Image: http://img818.imageshack.us/img818/9672/painting.jpg ]
You can see the selected point on the texture image. I edit the texture image
wi
20 matches
Mail list logo