Multiple textures

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple textures

drjustice

Hi folks. I sent this a while back on vtk-users but got no response.



I am sending this to vtk-developers because if the features isn't implemented, I will implement it.


I am trying to pass multiple texture buffers to a fragment shader.


I saw I can do:


1) actor->SetTexture(vtkTexture*) takes only a single vtkTexture


2) actor->GetProperty()->SetTexture(int unit, vtkTexture*) takes a texture that I can associate to a texture unit, but those functions are deprecated.


In fact, I think that (2) doesn't even work anymore with the OpenGL2 backend, at least my shader code doesn't seem to be getting them, maybe I am doing something wrong. In any case, I get a vtk warning saying I should not do that.



Some folks have said I should combine multiple images into a single image before sending as a texture image. But I can't do this, because I need to send texture images as well as multiple data (non-image) buffers to the shader as well.


How can I attach multiple image buffers to the actor and/or ogl mapper?




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Multiple textures

Ken Martin
I responded yesterday so maybe check your spam folder etc.  Here is the link




On Tue, Oct 30, 2018 at 3:10 PM, Patrick Bergeron <[hidden email]> wrote:

Hi folks. I sent this a while back on vtk-users but got no response.



I am sending this to vtk-developers because if the features isn't implemented, I will implement it.


I am trying to pass multiple texture buffers to a fragment shader.


I saw I can do:


1) actor->SetTexture(vtkTexture*) takes only a single vtkTexture


2) actor->GetProperty()->SetTexture(int unit, vtkTexture*) takes a texture that I can associate to a texture unit, but those functions are deprecated.


In fact, I think that (2) doesn't even work anymore with the OpenGL2 backend, at least my shader code doesn't seem to be getting them, maybe I am doing something wrong. In any case, I get a vtk warning saying I should not do that.



Some folks have said I should combine multiple images into a single image before sending as a texture image. But I can't do this, because I need to send texture images as well as multiple data (non-image) buffers to the shader as well.


How can I attach multiple image buffers to the actor and/or ogl mapper?




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers





--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Multiple textures

drjustice

You rock.


I will give it a try. Not sure how I missed it.


BTW, Google is my friend, but I kept finding this link whatever search terms I gave google.


http://vtk.1045678.n5.nabble.com/Using-multile-texture-files-in-vtkOBJImporter-td5744430.html



"It is possible to have multiple texture maps applied to a single surface where the texture maps are blended together using a blending function. That is the part we do not support. "


I wasn't sure what to make of that comment!   :-)

Many other places in archives also state that only one texture and one texture coordinate is supported...





From: Ken Martin <[hidden email]>
Sent: October 30, 2018 3:16:10 PM
To: Patrick Bergeron
Cc: [hidden email]
Subject: Re: [vtk-developers] Multiple textures
 
I responded yesterday so maybe check your spam folder etc.  Here is the link




On Tue, Oct 30, 2018 at 3:10 PM, Patrick Bergeron <[hidden email]> wrote:

Hi folks. I sent this a while back on vtk-users but got no response.



I am sending this to vtk-developers because if the features isn't implemented, I will implement it.


I am trying to pass multiple texture buffers to a fragment shader.


I saw I can do:


1) actor->SetTexture(vtkTexture*) takes only a single vtkTexture


2) actor->GetProperty()->SetTexture(int unit, vtkTexture*) takes a texture that I can associate to a texture unit, but those functions are deprecated.


In fact, I think that (2) doesn't even work anymore with the OpenGL2 backend, at least my shader code doesn't seem to be getting them, maybe I am doing something wrong. In any case, I get a vtk warning saying I should not do that.



Some folks have said I should combine multiple images into a single image before sending as a texture image. But I can't do this, because I need to send texture images as well as multiple data (non-image) buffers to the shader as well.


How can I attach multiple image buffers to the actor and/or ogl mapper?




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers





--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Multiple textures

Ken Martin
At one time we supported multiple textures, then we didn't and now we do again. So the archives do give a lot of conflicting answers.

On Tue, Oct 30, 2018 at 8:09 PM, Patrick Bergeron <[hidden email]> wrote:

You rock.


I will give it a try. Not sure how I missed it.


BTW, Google is my friend, but I kept finding this link whatever search terms I gave google.


http://vtk.1045678.n5.nabble.com/Using-multile-texture-files-in-vtkOBJImporter-td5744430.html



"It is possible to have multiple texture maps applied to a single surface where the texture maps are blended together using a blending function. That is the part we do not support. "


I wasn't sure what to make of that comment!   :-)

Many other places in archives also state that only one texture and one texture coordinate is supported...





From: Ken Martin <[hidden email]>
Sent: October 30, 2018 3:16:10 PM
To: Patrick Bergeron
Cc: [hidden email]
Subject: Re: [vtk-developers] Multiple textures
 
I responded yesterday so maybe check your spam folder etc.  Here is the link




On Tue, Oct 30, 2018 at 3:10 PM, Patrick Bergeron <[hidden email]> wrote:

Hi folks. I sent this a while back on vtk-users but got no response.



I am sending this to vtk-developers because if the features isn't implemented, I will implement it.


I am trying to pass multiple texture buffers to a fragment shader.


I saw I can do:


1) actor->SetTexture(vtkTexture*) takes only a single vtkTexture


2) actor->GetProperty()->SetTexture(int unit, vtkTexture*) takes a texture that I can associate to a texture unit, but those functions are deprecated.


In fact, I think that (2) doesn't even work anymore with the OpenGL2 backend, at least my shader code doesn't seem to be getting them, maybe I am doing something wrong. In any case, I get a vtk warning saying I should not do that.



Some folks have said I should combine multiple images into a single image before sending as a texture image. But I can't do this, because I need to send texture images as well as multiple data (non-image) buffers to the shader as well.


How can I attach multiple image buffers to the actor and/or ogl mapper?




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers





--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers