Page 1 of 1

Confused on which render channel to use in texture editor

Posted: Tue Apr 21, 2015 5:46 pm
by Mihai
I just want to make sure that I'm doing it right regarding which channel I should assign a texture to in Rhino:

- if I add a cubic projector (leave "use multiple mapping channels" to OFF), in Studio I see the object gets two UV sets, both locked. They seem to both be that cubic projector I added?

So in cases where you only add one mapping channel, it doesn't matter if the channel I set in the texture editor is 0 or 1?

- if I add two mappings to my object in Rhino, lets say a cubic one and a planar one. In Studio I now see 3 channels. Are 0 and 1 the cubic one, and 2 the planar one?

Re: Confused on which render channel to use in texture edito

Posted: Tue Apr 21, 2015 6:36 pm
by JDHill
The UVs on channel 0 are the ones used in the viewport, with those explicitly added starting at channel 1, and going up from there.

Re: Confused on which render channel to use in texture edito

Posted: Tue Apr 21, 2015 10:47 pm
by Mihai
So this only becomes relevant if I have more than 1 channels applied to an object? In which case to make certain the textures are applied to the right channel, I should explicitly set them in the texture editor?

Re: Confused on which render channel to use in texture edito

Posted: Tue Apr 21, 2015 10:59 pm
by JDHill
It applies if you have one or more; if you check the "Use multiple mapping channels" box in Rhino's Texture Mapping panel, then you can see that the mappings start at index 1. So, if you have defined no explicit mappings, you will get the UVs that you see in the viewport, and they will be on channel 0. As you add explicit mappings, you will generate more UV sets on the object, and will need to use the Channel parameter in the texture, to match things up how you intend.

Re: Confused on which render channel to use in texture edito

Posted: Wed Apr 22, 2015 12:21 am
by Mihai
As you add explicit mappings
But if I have only one, then viewport texture mapping = my explicit mapping?

Also how is it decided which one is shown in the viewport? I know I can select a map in the mat editor and then that switches the viewport mapping to the one assigned to the texture, but is there another way? Just trying to make sure I don't accidentally screw up my texture assignments.

I noticed also a bug in Rhino in that if you select an object that has "multiple mappings" on, then select an object with this off, it switches it on for this one as well. Maybe only a UI issue or not... but it got me confused at first why that reappeared checked.

Re: Confused on which render channel to use in texture edito

Posted: Wed Apr 22, 2015 1:10 am
by JDHill
Mihai wrote:But if I have only one, then viewport texture mapping = my explicit mapping?
That's the idea, but it's Rhino's business, so I can't guarantee it. And there are also other cases, say, if you have a texture using real scale; it makes no sense to have a real scale texture on channel 1, where there's some spherical mapping or whatever on that channel, so you use channel 0 for that texture, where the plugin is going to generate them, and you have your spherical ones on channel 1. And what you see in the viewport depends on...
Mihai wrote:Also how is it decided which one is shown in the viewport? I know I can select a map in the mat editor and then that switches the viewport mapping to the one assigned to the texture, but is there another way? Just trying to make sure I don't accidentally screw up my texture assignments.
As far as I know, there is no way to guarantee that a given mapping is shown in the viewport. The plugin asks Rhino to show the channel for whichever texture you selected in the material editor, but it often doesn't work. For instance, I create a mesh (an actual mesh, not a nurbs object), and create for it three different mappings, and assign a material that uses them. Switching between active textures in the plugin, I see my mappings switching. Then I close & reopen the file, and it no longer works. Then I select the mesh and click the Texture Mapping button in Properties, and after doing so, I can once again switch the mappings in the viewport, by switching the active texture in the plugin. Making a copy of the mesh, it only works for the original one. I select the copy, then show the Properties (or any other) tab, switch to a different tab, then back to Texture Mapping, and it starts working for the copy. And so on, and so forth, and you can find other quirks depending if the geometry is a nurbs box, or an extrusion object, or if you have/have not enabled "Advanced texture preview" in the Display options. That said, as far as I'm aware, everything works flawlessly in Rhino 4.
Mihai wrote:I noticed also a bug in Rhino in that if you select an object that has "multiple mappings" on, then select an object with this off, it switches it on for this one as well. Maybe only a UI issue or not... but it got me confused at first why that reappeared checked.
Frankly, I no longer try to find much consistency in the texture mapping area. I can generally get done what I want to do, and if you keep it simple, you probably never notice much of this, but if you try to get fancy, there can be surprises, and you may need to rely on FIRE to be sure of what's really going on.