Jump to content

UV channel questions


photo

Recommended Posts

Hi.

 

is there a functionality, assigning different UV channels to texture slots?

 

e.g. Diffuse - UV 1, Specular - UV 2

 

Is it possibility to set a separate UV set for the alpha channel?

 

If not, will this be possible with the shader access in the SDK update?

 

Cheers.

Werner

 

Link to comment

Werner, the "interpretation" of uv channels is fully defined within the fragment shaders. The default Unigine shaders do not support your sample uv-usage out-of-the-box. If you need such a behaviour, you will have to modify the specific fragment shader code.  

Link to comment

Yes, I thought that this is that way.

 

I am pretty curious, how the

 

C++ API
- introduction of ObjectExtern - Q1 - delivered
- access to materials and shaders - Q1

 

 

will look like.

 

I am hoping for some easy access to things like UV etc.

 

Thanx.

 

Werner

Link to comment

I think, that this is quite essential to have (the selection of the UV channels).

 

We have it quite often, and I guess it is a best practice, to use e.g. 2 channels for texturing in the case:

 

You have elements with unique Diffuse Textures UV1, and a Ambient/Lightmap on UV 2, which you can do using shared textures for many objects (which saves texture memory).

 

As well there a cases where you have Different UVs for Diffuse and Detailmaps.

 

I think it is a very good idea to have at least 2 UV channels to choose from for each texture slot.

 

I will post that into the material wishList.

 

Thx.

 

Werner

Link to comment

most probably this will not be possible as general Unigine base material feature due to shader permutation explosion. If you need such alternative uv texture mapping you will have to hard-code it in your own fragment shader of a custom/inherited material definition.

  • Like 1
Link to comment

Hmm, I actually cant judge the 'explosion', but imo 2 Texture Coordinates sets are a feature which is quite useful and should be implemented in the basic shaders. I actually don't know if there always are 2 set available for UV coordinates, but it seems so as the exporter works with 2 sets as well. So it would be useful.

Link to comment
×
×
  • Create New...