Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 26-07-2008 , 06:59 AM
Registered User
Join Date: Sep 2007
Posts: 41

Texture - Ramp Alternate

Hi Guys

I am at the final texturing stage for my Car and have encountered issues. I have detailed my problem and have also enclosed a slide to better explain the same.

Problem on Hand:

For handing the Facing Ratio issue in Maya, I would have used the output from the Sample Node and connected this to the input of the V coord of a Ramp (Say Ramp2). This output (Outcolour), I then connect to the input of Colour Entry List 1 of another Ramp (say Ramp1).

My Issue:

Now my issue is that I am using PS and hence instead of using the Ramp node of Maya, I have used a file to take the input from PS. The problem is that the file node does not have the attribute Color Entry List due to which, I am not able to complete the connection to Ramp 1 and from there to the Blinn.

Can some one advise the alternate to this or another node which can be used to get the same result.

Rgds

GP

Attached Thumbnails
# 2 28-07-2008 , 08:59 PM
LauriePriest's Avatar
Moderator
Join Date: May 2003
Location: London
Posts: 1,001
Shouldnt be a problem, can i see the file texture you are using.

basically you want to use the facing ratio to modify the reflectivity of your file texture. To do this you can use a layer texture node.

Color entery list referes to the value on a point of a ramp, since a file texture isnt a ramp and sources data from an external file the same process does not apply.

The layered texture node would allow your facing ratio ramp to influence the values of your file texture using blending methods like in photoshop.

If your using the photoshop file just for the reflectivity then i would work in color and then use an rgb> luminance node to convert the values from a vector to a float so it will be compatable with the reflectivity attribute of your surface shader.

Maya does not discriminte between what channels you are using for transparency etc. It does not matter wether you hold your red color information in red or your diffuse or transparency information in the alpha channel. I did a similar network for a project i did:

user added image

Note how the general transparency is defined by the cloud inputting into ramp 1, and then modified with facing ratio using a layered texture. Sorry for all the extra information, i used the breakdown for someone else in the past.

# 3 29-07-2008 , 01:59 AM
Registered User
Join Date: Sep 2007
Posts: 41
Hi,
thanks for the revert. I have enclosed the network I was referring to (which is obviously a very simpler one in comparison to the one referred by you).

I had looked at Layered Texture as an alternate to this network, but have not been able to figure out the exact way to go about it. Would appreciate if you can help on this.

Secondly, I am not clear on the statement you made on the transparency - Maya does not discriminate between the channels....

Could you elaborate on this?

Thanks

GP

Attached Thumbnails
# 4 30-07-2008 , 11:39 PM
LauriePriest's Avatar
Moderator
Join Date: May 2003
Location: London
Posts: 1,001
I dont think you understand what the facing ratio is doing to a ramp when you connect it to the v coord.

When rendering, the sampler info node is called to find the angle a point is facing towared the camera. The value it outputs is a float that ranges from 0 to 1.

0 facing away and 1 facing the camera head on. If you where to plug this directly into a channel you get a very obvious resut.
This image is facing ratio dirrectly plugged into the diffuse channel:

user added image

This is all good but it does not offer for control over the values, this is why a ramp is used. Instead of calling upon the sampler info node to provide the value for a rendered point, the ramp is called upon, however instead of using a UV coordinates to decide the value on the ramp, the facing ratio is called.

To have the facing ratio decide which point along the ramp to use just connect the facing ratio into the v choord of a ramp.

This gives you huge control in comparison, as the values that are applied to your channels are decided by you via the ramp.

For example here is a spheres diffused decided by a ramp with its v choord decided by facing ratio:
user added image

Now, lets say i want this effect on my diffuse channel but I dont want to get rid of my fractal texture i have applied to my diffuse:
user added image

To do this we just have to be aware of simple mathematics, by making two images or values interact with eacother we can achieve a result which is the combination of the two, just like with layers in photoshop.

To see how these work just play about with them in photoshop, for this example i will just use the multiplication method using a layer node in maya. All it is doing is multiplying the result from my ramp which is dictated by the facing ratio with that of the fractal.

Here is the result:
user added image

This is where knowing how channels work helps, with a layer node it does not assume that the luminance of your image is the same as your alpha channel which you may find to be the case when you apply a ramps out alpha to any value.

The layer node will assume you want the entire image to be visable, and will automatically assign an alpha of 1 uniformally, (a pure white image) so if you assign your out alpha directly to your diffuse after layering your texture and facing ratio you will just get a result of 1 or white.

To get a good result it is good practice to use an RGB > luminance node to convert your rgb vector information into a luminance float which can be used directly into diffuse etc.

You can naturally use the alpha as luminance attribute on the layered texture but this is not applicable if you want your alpha channel to be different from your luminance and i personally prefer to keep things seperate and visible so i know what i have going on.

Here is the resultant network:
user added image


Last edited by LauriePriest; 31-07-2008 at 01:00 AM.
# 5 02-08-2008 , 09:44 PM
Registered User
Join Date: Sep 2007
Posts: 41
Hi
thanks for such a detailed reply on this. Its going to take a while before I can digest this. Will get back in case I have further queries on this.

Thanks once again for the response.

Rgds
GP

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads