Can't see texture in viewport

   12347   6   0
User Avatar
Member
49 posts
Joined: Feb. 2007
Offline
Can't see texture in viewport. OGL texture shoudn't show the same as diffuse by default? I need check something more?
Edited by Unaided - Jan. 11, 2017 09:07:52

Attachments:
viewport_texture.jpg (184.3 KB)

User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
There is a difference how shaders get shown in opengl display and the mantra rendering. They are not linked.

To make your texture visible in your viewport (opengl) you will need to have the opengl texture Parameters. You can edit the parameter interface and add them. (Add Render Properties -> SHOP Options -> OGL -> Texture Layers)

It seems you are using the mantra surface shader which should already have a OpenGL parameters in its properties. There you can change the texture. As Standard it will be linked up to you diffuse channel texture.

This might be a bit confusing first but remember that OpenGL rendering and mantra rendering are 2 very different things.

Attached a screenshot.
Hope it helps.

Attachments:
load_OGL_Tex.jpg (74.7 KB)

User Avatar
Member
49 posts
Joined: Feb. 2007
Offline
Yes, I'm using Mantra in this screenshot, but for now only need show in viewport a texture for UV coords purposes.

Usually others 3D packages have connected basic shader parameters from built-in or third party render engines to render engine used in viewports to show textures for example.

However, something I should to do wrong, cos I put a image in Mantrasurface/OpenGL/Surface/Texture1 and no wants shows in viewport.

I understand that a simple BoxSOP have automatic UV coords by default, so a checker is shown correctly mapped rendering with Mantra.

Attachments:
notexinviewport.jpg (168.2 KB)

User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
The boxSOP does not have UVs by default.

In your shader you have plugged in your Texture without any S and T coordinate. Therefor it will use point position coordinates for the texture when rendering. (each primitive will get a value mapped 0-1). You should drop down a UV Coords in your Shader VOP and take the u and v plug them into s and t.(Or look at the diffColor part in the shader and how its setup.)

Then if you put down a uvunwrap or uvtexture SOP it will work.

I remember seeing some Video explaining all this and also explains Object, World, Camera and NDC space. If i find it i will link it here.

As mentioned all the preset materials have the diffuse map linked already with opengl. but if you make your own or customize it you will have to set this stuff up yourself.
User Avatar
Member
49 posts
Joined: Feb. 2007
Offline
Now it works! Thank you!

As I see in Mantra render the texture mapped, I think that boxSOP already generate auto UV.

So, for this example is perfect, but now I've that generate UV from a skinSOP for a dynamic geo. I mean, can't edit with UV Pelt or unwrapping handly.

Attachments:
uvtexture.jpg (319.4 KB)

User Avatar
Member
49 posts
Joined: Feb. 2007
Offline
I found this [sidefx.com], but still I have not tried.
It seems is that I will need.
Edited by Unaided - Jan. 11, 2017 16:20:52
User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
Unaided
I found this [sidefx.com], but still I have not tried.
It seems is that I will need.

This should help you: https://www.sidefx.com/tutorials/procedural-uv-node/ [sidefx.com]
  • Quick Links