www.BinaryAlchemy.de :: View topic - Color Switcher Usage for Framebuffer Material ID
 SearchSearch   RegisterRegister  ProfileProfile   UsergroupsUsergroups   Log inLog in 
If you create a new post, please use a topic that describes your problem
Documento sin título
 
Color Switcher Usage for Framebuffer Material ID
Goto page 1, 2  Next
 
Post new topic   Reply to topic    www.BinaryAlchemy.de Forum Index -> Shader Problems / How do I...?
View previous topic :: View next topic  
Author Message

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Sat Apr 20, 2013 6:34 am    Post subject: Color Switcher Usage for Framebuffer Material ID Reply with quote

Hi, I analyzed the Color Switcher demo scene files I'm still having problems understanding how to use this shader ? My goal which I hope opens up other doors on how this shader is to create a frame buffer of an objects Material ID, there is more to my question, I'll start with that Smile
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Sun Apr 21, 2013 1:34 pm    Post subject: Reply with quote

Have you read the help files?
You just have to plug in a color into a color slot and assign a framebuffer on the framebuffer tab.
That should be all.
But the shader has to be the first shader in your render tree and it has to handle all reflections/refractions.

If you want to render an ID, then you have to assign a different color for each object in that color slot/framebuffer.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Sun Apr 21, 2013 3:03 pm    Post subject: Reply with quote

schoenberger wrote:
Have you read the help files?
You just have to plug in a color into a color slot and assign a framebuffer on the framebuffer tab.
That should be all.
But the shader has to be the first shader in your render tree and it has to handle all reflections/refractions.

If you want to render an ID, then you have to assign a different color for each object in that color slot/framebuffer.


I did read the help file, I still am having difficulty. You say that I need to plug in a color into the color slot and assign a framebuffer on the frame buffer tab.



One of my objects I plugged in the mia_material_x_wrapper into the 'diffuse' slot of the Color Mixer, softimage crashed. My first goal is to assign a material ID based on a color on the texture, whatever direction is required to take me there, whether is it understanding how to get the shader setup correctly is understandable.
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Sun Apr 21, 2013 6:08 pm    Post subject: Reply with quote

Hi

It crashes? The sample scene does not crash on your side, does it?
Do you use the latest version, there was an update a few days ago.

Then you started this thread about the color_switcher.
But in the last post you are talking about the color_mixer?

Which shader do you wantg to use for what?
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Sun Apr 21, 2013 6:47 pm    Post subject: Reply with quote

schoenberger wrote:
Hi

It crashes? The sample scene does not crash on your side, does it?
Do you use the latest version, there was an update a few days ago.

Then you started this thread about the color_switcher.
But in the last post you are talking about the color_mixer?

Which shader do you wantg to use for what?


Sorry, not the sample scenes, rather my project, caused Softimage to crash when I did a setup as you see in the image, except I didn't hook up the shader because it would cause Softimage to crash. I'm strictly talking about the color_switch, I confused the two when writing my last message Smile
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Apr 22, 2013 1:29 pm    Post subject: Reply with quote

Ok.

Does it work in your scene with any other illumination shader than the mia_...?
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Tue Apr 23, 2013 1:41 am    Post subject: Reply with quote

I never tried any other shader, all of my objects use the mia_material shader. It was in the correct order

mia_material > color switch > surface\shadow\photon ports ?

I still don't know how to use it, unless you are first focusing on getting the color switcher to work with mia_material first and foremost ?
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Tue Apr 23, 2013 5:23 pm    Post subject: Reply with quote

Hi

>mia_material > color switch > surface
Yes, that is right.

>I still don't know how to use it
There is nothing more that I can describe.
The color switcher has to be the first shader, plugged into surface and shadow.
Then your shader into a color port of the color_switcher.
And the color_switcher has to handle all transparencies/reflections.
Like in the sample scene.
That's all. There is not more to get it working.

If it crashes and the sample scene does not, then I assume it is a problem with these special mia_material shaders.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Wed Apr 24, 2013 5:06 am    Post subject: Reply with quote

I placed the Mila_mixer Shader into the default and diffuse port.
(must the shader be plugged into the default port as seen the example scenes, and why is it ?)

I plugged the new mila_mixer node into the ba_switcher shader, question, does the ba_switcher override the 'diffuse' channel within Softimage or does it write to it's own 'diffuse' channel, I'm finding out that it writes to softimage 'diffuse' channel. Confused

I also realized that Ba_switcher does not work with Mental Images new Mia_Material layer materials\shaders, is there a work around for this ? Crying or Very sad

How do I create a materialID channel using Ba_switcher, I'm still can't come to terms on how to do this ? Also What do the Free ports do on the color_switcher node, I want to make sense of this shader then pretending I know how it works. Very Happy
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu Apr 25, 2013 10:41 am    Post subject: Reply with quote

Hi

>does the ba_switcher override the 'diffuse' channel within
The intention of the color switcher is to write all channels. So if you tell the ba_switcher to use one of the input ports and put it into the diffuse channel, then it does that.

>is there a work around for this ?
This is the first thread where I was informed about crashes with the mia_materials.
I do not think that there is a workaround.

>How do I create a materialID channel ?
What kind of material ID do you want? The color_switcher is a color shader, therefore RGBA.


>Also What do the Free ports do on the color_switcher node
If you do not need then, do not use them. If you need more channels to shade your object.
For example I have used it to render a DOF channel with these inputs, or a illumination channel.
I do not know your compositing.

A real-world example for the free ports and what the shader does.
You buy a new storage rack. It has 12 Boxes. But you onyl have stuff for 9 Boxes. So what do you do with the left 3 Boxes in the rack? You just leave them emtpy until you have something them to be used.
And you can name these boxes as you like in the framebuffer tab. So you can name one box as "channel reflection". And if the renderer wants to have the reflection, it takes what every ou have placed into the box.
That is all the shader does. You have a lot of free boxes in a rack (the input color ports) and you can name/assign them them for the renderer (framebuffer/channel)
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Fri Apr 26, 2013 4:43 am    Post subject: Reply with quote

Quote:
Hi

>does the ba_switcher override the 'diffuse' channel within
The intention of the color switcher is to write all channels. So if you tell the ba_switcher to use one of the input ports and put it into the diffuse channel, then it does that.


That is exactly what I did, I viewed my 'diffuse' channel within the IPR (render region) and there was no diffuse render for the object. This is my setup;





Quote:

>is there a work around for this ?
This is the first thread where I was informed about crashes with the mia_materials.
I do not think that there is a workaround.


I haven't experienced any crashes recently, it could have been a minor computer issue.
Quote:

>How do I create a materialID channel ?
What kind of material ID do you want? The color_switcher is a color shader, therefore RGBA.

A red MaterialID.

What if you have a UV texture on your object and part of the texture you want a MaterialID suppose a strip that has three colors within, or a pattern created for the texture, how do you set this up as well ?


Quote:
>Also What do the Free ports do on the color_switcher node
If you do not need then, do not use them. If you need more channels to shade your object.
For example I have used it to render a DOF channel with these inputs, or a illumination channel.
I do not know your compositing.

A real-world example for the free ports and what the shader does.
You buy a new storage rack. It has 12 Boxes. But you onyl have stuff for 9 Boxes. So what do you do with the left 3 Boxes in the rack? You just leave them emtpy until you have something them to be used.
And you can name these boxes as you like in the framebuffer tab. So you can name one box as "channel reflection". And if the renderer wants to have the reflection, it takes what every ou have placed into the box.
That is all the shader does. You have a lot of free boxes in a rack (the input color ports) and you can name/assign them them for the renderer (framebuffer/channel)


I asked because I thought there could be more to those ports Smile[/img]
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Sat Apr 27, 2013 1:28 pm    Post subject: Reply with quote

>How do I create a materialID channel ?
>A red MaterialID.
Question back: Imagine no switcher setup, no channels.
How would you shade your object in red?
Probably set the color to red...
>What if you have a UV texture on your object and part of the texture you want a MaterialID
Assign a texture projection to the object and change the UV projection that your object is shaded with that part of the texture.

So if you have created one of the above, without any channels, then plug that into a port of the switcher.


How large is your scene file?
If it is less than 2MB, please upload it via www.BinaryAlchemy.de/upload_b.php
Otherwise, create a new one with only a cube and upload it.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Sat May 04, 2013 10:19 pm    Post subject: Reply with quote

I want the BA_Switcher to control the diffuse and shadow of the object and write to the framebuffer, so when I render out the pass the channels render along with it. Although when I preview the 'diffuse' framebuffer in Softimage IPR it's black ?

I want to create a material ID for the yellow in the DoorGateColor Image map, so I can apply a glow in Post to only the yellow area on material.

Download Scene
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon May 06, 2013 1:54 pm    Post subject: Reply with quote

Hi

I found the difference between your scene and the sample scene.
You have set Diffuse in the handle add. channel tab, which is not enabled in any sample scene.
www.BinaryAlchemy.de/help/baEssential/index.htm?Shader/Channels/Color_Switcher/Color_Switcher.htm


>I want to create a material ID for the yellow in the DoorGateColor
You do not want to create a material ID. A material ID is an ID for each material. And a material is the same all over an object.
You want to create a mask (way different). So just plug that texture into any of the shader inputs and assign that input to a channel.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Mon May 06, 2013 4:53 pm    Post subject: Reply with quote

Hi, I'm terribly sorry. You mention that the problem with my scene was that I had set the 'diffuse' in the 'add channel tab' I removed it under the 'add channel tab' and my diffuse channel continues to render black within Softimage IRP, it's probably easy and I'm missing a step or something I'm missing and it's frustrating myself.



Creating a MaterialID from the yellow within the texture once again, it is not working, I plugged the texture into any of the shader inputs and then I assigned the input to a channel, it renders black ? I plugged the texture into one of the slots to create a mask for the texture as seen in the image, the FreeA and Matte port, neither worked.

Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon May 06, 2013 5:03 pm    Post subject: Reply with quote

Steps:
1. You plug what you want to render into any of the input ports.
2. First page "colors", you set the switch to your input. It will now render into the main image buffer.
If you see what you want to have in your buffer, continue. Otherwise stop.
3. Page "Channels": You select your input on one side and select the framebuffer on the other side.
4. First page "colors", you set the switch to your main color/what you want to have as main color.


From your second screenshot I see an issue in step 3.
You have not assigned any channel where the matte should be placed in.

For your diffuse, please try the default XSI lambert, does it work with that?
First test one shader and not 3rdparty shaders at once.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Mon May 06, 2013 5:50 pm    Post subject: Reply with quote

Quote:
Steps:
1. You plug what you want to render into any of the input ports.
2. First page "colors", you set the switch to your input. It will now render into the main image buffer.
If you see what you want to have in your buffer, continue. Otherwise stop.


I stopped what I wanted as you mentioned because in my diffuse buffer the diffuse wasn't rendering, instead the specularity was rendering on the object as well. I never did anything to the channels tab, although I changed the shader to phong for testing Smile



Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon May 06, 2013 6:19 pm    Post subject: Reply with quote

So you now get your input into the channels?
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Mon May 06, 2013 6:59 pm    Post subject: Reply with quote

I did, atleast I think I did. In the 'channels' tab 'Channel 1' I set 'diffuse for both drop downs. Rendered out my diffuse framebuffer within Softimage IPR and it looks the same as the 'default' channel.

Update:
I came upon a discovery, I was plugging in the Illumination shader with the texture into the diffuse port on the BA_color_switcher. Instead I plugged the illumination shader into the specular port.

Within the color tab I set the switch to specular, and in the channels tab 'Channel 1' I set to it Specular as well for the right side 'specular' as well (what does the right side do in the Channels tab ?)

In Softimage IPR I choose the diffuse channel and it rendered the diffuse channel. This is what I find strange if I wanted to render out the diffuse framebuffer, why wouldn't it work when the illumination shader (phong) is plugged into the 'diffuse' port of the BA shader and instead it works when it is plugged into the 'specular' port ?

I tried a 3rd party shader and the BA_color switcher breaks when I try to render a 'diffuse' channel in Softimage IPR it is only black Sad
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon May 06, 2013 7:15 pm    Post subject: Reply with quote

>(what does the right side do in the Channels tab ?)
Left side: Shader inputs
Right Side: MRay Framebuffer/Channels

Just imagine the Example I wrote a few posts earlier:
The new storage rack with 16 Boxes.

So if you plugin something into the Diffuse input of the shader and you want to have it in the Diffuse framebuffer, you have to assign Diffuse => Diffuse in the "Channels" tab.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Mon May 06, 2013 7:53 pm    Post subject: Reply with quote

If the Left Side is shader inputs and the Right side writes to MRay FrameBuffers/Channels how come when I plug the illumination shader into the diffuse port but write it to the specular and render a specular channel it's not rendering the diffuse ? As you say the Left side is for shader inputs and the right side is to write to the frame buffer. Then how do I create a mask for the yellow on the texture ?

What does the color tab do and what does 'noTrans' mean ?

I'm sorry, I want to fully understand this shader, I only wish it would work with 3rd party shaders, such as Mia_Material and the new MilA development shaders, I don't know if it can be changed to accept these shaders as I know that these shaders have their own channel output system, if they can be combined that would be very effective.

Edit: Add Content

When I add 'diffuse' to the Handle Add.Channels and render a 'diffuse' channel preview the object renders correctly with diffuse only, I assume I did this correctly.

When I remove the 'diffuse' from the slot within the Handle Add.Channels make it empty and render a diffuse channel the object renders with diffuse/specularity etc, this is normal behavior, I assume. If all this is correct, I don't understand why there are two tabs for channels, you told me the channels tab is for selecting the channel then writing that to the Softimage buffer, then you have to add the 'diffuse' channel again, in the Handle Add.channels tab, just so long as it renders the diffuse channel, why ? There is a flow to this shader I'm not understanding it is not hard for you, I want to create a workflow that is intuitive and effective when rendering for compositing.









When I render a specularity channel, that renders correctly, although it misses a second highlight.
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Tue May 07, 2013 11:58 am    Post subject: Reply with quote

>how come when I plug the illumination shader into the diffuse port
>but write it to the specular and render a specular channel it's not rendering the diffuse ?
It should, they are just names. It does not matter if you use the diffuse or specular input.
The shader works that simple.


>What does the color tab do and what does 'noTrans' mean ?
At some point you should use the help files. ? button.

>Then how do I create a mask for the yellow on the texture ?
You paint a black-white texture. That is what we do for masks. Or use the alpha channel of the texture.

>When I add 'diffuse' to the Handle Add.Channels and render a 'diffuse'
>channel preview the object renders correctly with diffuse only, I assume I did this correctly.
You are using the diffuse channel output of the XSI shader. You are not using what you pipe into this shader.
The XSI shaders write to framebuffers as well. Please see the help file for the "Handle add. channels" tab.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Tue May 07, 2013 12:11 pm    Post subject: Reply with quote

I retested with your scene, and it works.
If I plug the phong into the specular port, and assign the channel to it, I get the result i want.
Please follow exactly these steps.
I assume you missed one step, therefore it does not work.

Steps:
1. You plug what you want to render into any of the input ports E.g. "FreeA".
2. First page "colors", you set the switch to your input "FreeA". It will now render into the main image buffer.
(If you see what you want to have in your buffer later, continue. Otherwise stop.)
3. Page "Channels": You select your input "FreeA" on one side and select the framebuffer e.g. "Diffuse" on the other side.
4. First page "colors", you set the switch to your main color/what you want to have as main color.

Perhaps you should delete the shader and get a new one.
In case you have set something that should not be set.


Here your scene, as you can see the Phong is used two times and both framebuffers show the same.
www.BinaryAlchemy.de/forum_linked_files/SphereScene.scn

I also made an extract FX framebuffer/channel.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Wed May 08, 2013 12:22 am    Post subject: Reply with quote

This is the scene you sent me, except I changed it. Preview the 'diffuse' and 'specular' channels. How come both channels render the same, the 'diffuse' should not render with any spec, and the spec should not render with any diffuse, yet both are rendering as though I'm previewing a 'main' channel ? I changed the 'switch' within 'colors' to 'diffuse' and 'specular' and both as mentioned show the same ?
http://www.divshare.com/download/24083682-e09


Scene

Here are some screen shots to my setup, you be the judge Smile




Back to top
View user's profile Send private message

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Wed May 15, 2013 4:03 am    Post subject: Reply with quote

I hope you haven't decided to throw in the towel ? There are some things I want to clarify with this shader, it will be understood very soon, the documentation for the shader is sorta vague. It may be simple to use but I want to understand a little under the hood Smile
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Wed May 15, 2013 12:23 pm    Post subject: Reply with quote

You get the same result as what you plug in. Exactly the same.
So if you plugin a phong shader that has diffuse and specular into an input of the switcher, then this is the result.
It is IMpossible to split an image into its parts.
There is no magic function in this shader that can seperate an image into its parts (if there would one, you would not have to render into seperate channels)
So if you want a diffuse only and a specular only, then you have to use two phong shaders, one set to diffuse, one set to specular only.

See the step 2, second sentence:

Steps:
1. You plug what you want to render into any of the input ports.
2. First page "colors", you set the switch to your input. It will now render into the main image buffer.
If you see what you want to have in your buffer, continue. Otherwise stop.
3. Page "Channels": You select your input on one side and select the framebuffer on the other side.
4. First page "colors", you set the switch to your main color/what you want to have as main color.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Wed May 15, 2013 3:14 pm    Post subject: Reply with quote


I want the red sphere to have only diffuse.

Quote:
First page "colors", you set the switch to your input. It will now render into the main image buffer.
If you see what you want to have in your buffer, continue. Otherwise stop.



My Channels Tab Settings for the Red Sphere


The Red Sphere should show only the diffuse but there is specular and reflection on the sphere ? Also my yellow sphere is cut off and is also red ? At this point you said stop if it's not what I expected, it isn't but I'll show you the rest of the steps I took.


My Channels Setup for the Red sphere.

The shader, is plugged into the diffuse port of the Color Switcher node.
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Wed May 15, 2013 4:31 pm    Post subject: Reply with quote

If you want to have a phong without spec in the framebuffer, then plug in a phong without spec.
If you plug in a phong with spec and reflection, then you get a phong with spec and reflection in the framebuffer.
That is what I ment with if you do not get what you want, then stop at step 2.
At step 2 you get a red sphere WITH specular. So disable the specular in the phong shader.
Now you get what you want. So then continue with the framebuffer setup.

The inputs names of the shader are just names.
You could name them specular or highlight or myBrighlight. Just because you name it specular does not mean all shaders are now rendering something else.

>Also my yellow sphere is cut off
I assume you have done the up the red shader setup and not yet the yellow sphere shader setup
that's why the yellow is black in the framebuffer.
>and is also red
That's called a reflection of the red sphere on the surface of the yellow sphere.
The reflection is handled by the color_switcher and is working for all framebuffers.
That is the reason this shader was created. Reflections and Transparencies working with framebuffers.

I will setup a scene with 3 spheres as you have shown.
I assume you want:
The main channel (color+specular)
The diffuse channel (color)
The spec channel (spec)

To be clear I will not use any input nor framebuffer that is called "diffuse" or "specular".
_________________
Holger Schönberger
Binary Alchemy - digital materialization


Last edited by schoenberger on Wed May 15, 2013 6:57 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Wed May 15, 2013 5:01 pm    Post subject: Reply with quote

The scene file:
www.BinaryAlchemy.de/ftp_file/Color_switcher__channel_setup_2.zip
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Thu May 16, 2013 2:51 am    Post subject: Reply with quote

Why did you let ba_color_switcher control the reflection instead of the phong shader, Is that the reflections tab main purpose ? Does the specular tab work the same way as the reflection tab ?

How does the Handle Add.Channels work, and how did you rename the channel to MyObjXXX ?

Why do you have the slots named shadow / occlusion / etc if you can rename the channel outputs ?

I have the foundation of the shader understood, after your explanation from the last post, that I have to plug a shader into specular, for specular, or diffuse, for diffuse, hopefully now I can get this shader figured out, after a few more questions Smile
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu May 16, 2013 1:03 pm    Post subject: Reply with quote

>Why did you let ba_color_switcher control the reflection instead of the phong shader
That is THE reason why this shader was created. Transparencies and Reflections for framebuffers.

>How does the Handle Add.Channels work
See
www.BinaryAlchemy.de/help/baEssential/index.htm?Shader/Channels/Color_Switcher/Color_Switcher.htm

>Why do you have the slots named shadow / occlusion / etc if you can rename the channel outputs?
Because names are better for the human mind than numbers 1-16.
Otherwise you need a table in front of you which number is what.
(Just think of the story why IKEA uses these names)

>how did you rename the channel to MyObjXXX
I did not rename them. You have read the text I had placed in my scene file?
"At first I deleted all default render channels in the new scene.
(The ones that Softimage allowed me to delete)
Then I added my own channels."

Ok. I think there is big problem.
You have to learn step by step.
Before you use an specialized shader that was build to extend the Softimage channel system you should first learn how to use the channels the Softimage way.
How to use them, how to create new ones.
http://lmgtfy.com/?q=userguide+Render+Channels+%26+Framebuffers

And I would also recommend to learn how passes with material overrides work.
That is what I learned long before I even started to use channels.

And I would recommend a book or tutorial about compositing/passes setup.

I am sorry, but I am really busy before the Siggraph I do not have time to teach you how to use Softimage.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Thu May 16, 2013 1:42 pm    Post subject: Reply with quote

I know how Softimage channels and passes work, I was having difficulty understanding this shader, and I let a few things skip by me, so it appears as though I don't know what the heck I'm doing.

Quote:
>Why did you let ba_color_switcher control the reflection instead of the phong shader
That is THE reason why this shader was created. Transparencies and Reflections for framebuffers.


Softimage own internal framebuffers can do the same thing ?
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu May 16, 2013 2:58 pm    Post subject: Reply with quote

>I know how Softimage channels and passes work
Sorry, but your question "how did you rename the channel to MyObjXXX" and the fact that I have described how I did that in the scene seemed to show that you do not know how channels in Softimage work.
How you can change the names/number of channels and that stuff.

And you seem to be unexperienced with compositing terms. Therefore I was recommending you a good book.
Material ID, Masks, ...

It is not am issue if you have not learned that yet, but please be honest.
Real world example: You cannot build a skyscraper if you have never build a small house.

>Softimage own internal framebuffers can do the same thing ?
The reason why this shader was created was to support reflections and transparencies for framebuffers.
Softimage shaders support framebuffers/channels as you know, but they do not support reflections and transparencies.




PS: I like the default font size better.



.


.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Fri May 17, 2013 2:23 am    Post subject: Reply with quote

This is making sense, it was a little hard to decipher before. There are are few more questions, I understand about the 'free ports', I understand that you named specific slots, 'diffuse', 'occlusion' for creating those specific type of channels. I also understand that you have 'specular' and 'reflections' tabs because Softimage doesn't support reflections and transparencies. What I don't understand is the matte shader and the extra switches within the specular at this point, what are there purpose ?
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri May 17, 2013 1:35 pm    Post subject: Reply with quote

Hi

The specular is sometimes required to be done in this shader.
This happens in special cases, but that is only if you get issues in compositing with sepcular.
The matte is the transparency of the object. As this shader has to handle reflections/transparencies for framebuffers (if you want them in framebuffers)
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Thu May 23, 2013 5:09 am    Post subject: Reply with quote

How come when I add the BA color switcher to an object to create a AO framebuffer for only the object that I selected, the AO is applied to all the objects in the scene ?

The only difference is the samples are low on the other objects in the scene without BA Color Switcher applied compared to the object with the BA Color Switcher and the AO Shader hooked into the AO Channel port in the BA Color Switcher node only because I increased the samples in the AO shader.
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu May 23, 2013 12:35 pm    Post subject: Reply with quote

>How come when I add the BA color switcher to an object to create a AO framebuffer
>for only the object that I selected, the AO is applied to all the objects in the scene ?
That does not happen.
If you have not assigned an AO shader to an object, then it will not render AO.

Ok, I will take another look on your scene.
Please upload via www.BinaryAlchemy.de/upload_b.php
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Fri May 24, 2013 1:54 am    Post subject: Reply with quote

I can't send the scene, but I can show you with screen caps Smile





The big white box should only have AO, as you see everything does, when the other objects don't have the BA Color Mixer node applied in the RT, they have AO, doesn't make sense ?

Edit:

The circle contains the object that has the AO shader applied to the BA Switcher for the channel and the boxes contain, what appears to be AO on the other objects that don't have the BA Switcher on the object ? It is bleeding onto the other objects ?
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri May 24, 2013 10:12 am    Post subject: Reply with quote

Sorry, screen captures do not help me.
If you do not want to send the whole scene, then delete some stuff of the scene.
I am working since 7 years in support for shaders and the Royal Render farm manager.
I got scenes from many companies, including a few working on feature films. (Once even from ILM about the volume shader)
So I know how to keep scenes confidential: www.BinaryAlchemy.de/upload_b.php
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Thu May 30, 2013 2:27 pm    Post subject: Reply with quote

Hi, I will send a test seen soon.

I wanted to know, if the BA color switcher shader can help me. I'm using the Mia_Material_Advanced shader and it has built in channel support, most of the objects in my scene use this shader. I created an override for the Mia_Material_Advanced shader on the pass partition, switched on the channels from the Mia_Material_Advanced shader that I want to use, they are not showing up in the framebuffer, and I can't add them either, this is driving me nuts and I can't get any help on the issue ?
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu May 30, 2013 2:57 pm    Post subject: Reply with quote

@Falam:
>Hi, I will send a test seen soon.
A test scene with any BA shader in it?

>I wanted to know, if the BA color switcher shader can help me.
Help you with what? That the mia_material setup does not work? I am not familiar at all with any mia_material. I have seen it once or twice, but never used it. I do not like it.

>I created an override for the Mia_Material_Advanced shader on the pass partition
The more complex you make the scene, the more it will be a problem to debug or understand it for anyone.
Why do you use overrides if you use channels?
And then I have started SI to check what the heck you are talking about. There is no Mia_Material_Advanced in SI. So I still do not know what you are talking about.

PS:
You will be better and faster support if you ask in a forum with people that use SI more than I do.
Perhaps even people that have used the mia_material.

PPS: A better description of your issue would also help.
>I created an override Overrride what? The color of input 3 of the shader?
>they are not showing up in the framebuffer Showing where? a) As a dropdown name in the channel selection of a shader? b) As a menu item of the render region? c) As rendered object in the framebuffer?
(if it is a or b, then please rtfm SI, that is really simple)
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Thu May 30, 2013 11:29 pm    Post subject: Reply with quote

Quote:
@Falam:
>Hi, I will send a test seen soon.
A test scene with any BA shader in it?


Yes, as you mentioned to do in your last post.

Quote:
>I wanted to know, if the BA color switcher shader can help me.
Help you with what? That the mia_material setup does not work? I am not familiar at all with any mia_material. I have seen it once or twice, but never used it. I do not like it.


I know you are not familiar with the shader, and I know this specific shader is not a factory default within Softimage. The problem I'm having I already explained. I have a pass, then within that pass is a partition, with the partition selected, I apply an override, you ask why do I apply an override with channels, because I want control over which channels to write to the frame buffer. There is no need to manually add the channels to the framebuffer, because the shader supports writing to the framebuffer with this being the case, how come the override is not writing the channels I selected for that specific shader to the framebuffer ?

I threw this out there, hoping that possibly your shader could help, although very unlikely or you had any idea on why it's not working ? I've already asked the question on a dedicated Softimage forum, no reply, I'll try again, but this is getting on my nerves.




Quote:
>I created an override for the Mia_Material_Advanced shader on the pass partition
The more complex you make the scene, the more it will be a problem to debug or understand it for anyone.
Why do you use overrides if you use channels?
And then I have started SI to check what the heck you are talking about. There is no Mia_Material_Advanced in SI. So I still do not know what you are talking about.

PS:
You will be better and faster support if you ask in a forum with people that use SI more than I do.
Perhaps even people that have used the mia_material.

PPS: A better description of your issue would also help.
>I created an override Overrride what? The color of input 3 of the shader?
>they are not showing up in the framebuffer Showing where? a) As a dropdown name in the channel selection of a shader? b) As a menu item of the render region? c) As rendered object in the framebuffer?
(if it is a or b, then please rtfm SI, that is really simple)
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri May 31, 2013 2:02 pm    Post subject: Reply with quote

>because I want control over which channels to write to the frame buffer.
So it is an override on the disable/enable of a render channel in the shader?
Like in the BA_Color_Switcher the tab "Channel".
(As you see you have to better describe what you are doing. As it is hard for me to decipher what you are doing. There are about 50 different override typesI used for shaders in pass partitions. And each type can have many variations-)

But again, one thing. do it step by step.
If you use 100 modifications, you never find the issue.
1) Does it work without any overrides in a pass?

2) Do you have added the channel to the render options and the pass?

3)And what about the last issue with the AO you had?
That sounded like a problem without any shader that is not installed in Softimage.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Fri May 31, 2013 2:29 pm    Post subject: Reply with quote

Quote:
>because I want control over which channels to write to the frame buffer.
So it is an override on the disable/enable of a render channel in the shader?
Like in the BA_Color_Switcher the tab "Channel".
(As you see you have to better describe what you are doing. As it is hard for me to decipher what you are doing. There are about 50 different override typesI used for shaders in pass partitions. And each type can have many variations-)


To answer your question, yes, kind of similar. I am describing what I'm doing the best I can, without screen captures, we are not on the same wavelength, doesn't mean we won't be on the same wavelength, as with communication it can take time, in the case of the internet time is messages. Smile
Quote:


But again, one thing. do it step by step.
If you use 100 modifications, you never find the issue.
1) Does it work without any overrides in a pass?


If I manually go into the shader and switch on the channels I want, on a object by object basis, those channels are written to the framebuffers, to answer your question, yes it works when I manually switch on the channels. My goal is to remove the tedious work by not having to manually select each object, and turn on the channels I want written to the frame buffer, why I introduced the override on the partition.


Quote:
2) Do you have added the channel to the render options and the pass?


I can't, there is nothing to add, if you also mean did I manually type in the name of the channel from the shader into the channel options within Softimage, no, I didn't because the shader writes to the Softimage framebuffer automatically. The override is not writing to the Softimage framebuffer, there is missing piece, why this isn't working and I can't put my finger on it. I asked in Softimage forums, but everyone knowledge is different with Softimage, many may not know, yet, many may know, but don't want to share.

Quote:

3)And what about the last issue with the AO you had?
That sounded like a problem without any shader that is not installed in Softimage.


The last issue regarding AO was with the BA Color Switcher node, when I created an AO channel using the BA Switcher on one object, other objects in the scene, appear to have AO on them when in reality, you know this, but I'll explain anyhow, you have to apply the BA Color Switcher shader on a per object by object bases, unless I'm wrong, otherwise BA Color Switcher won't create a AO channel for all the objects in the scene if you want that.
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri May 31, 2013 3:19 pm    Post subject: Reply with quote

>to answer your question, yes it works when I manually switch on the channels
So the question is not about the color_switcher, it is about why your override does not work.


Ok, I finally downloaded the shader. And it is bad.


Again, step by step analysis, same as I did it:

I) First how channels work in Softimage:
a) You add the channel to the scene render options.
b) You add the channel to the pass.
If you have both, you get a channel output.
You have to understand this. There is nothing any 3rd party shader or script can do to change this.
This is how SI works, no matter what a shader tries to tell you or hides under the hood.

II)
If you check the channels in the mia_material_advanced, then you get a a) and b).
Therefore I assume a script does a) and b) for you.
BUT: If you uncheck it, it removes a and b for you.

III)
Now check your override scene that does not work.
Open the render settings, check for the image channel name.
Open the SI explorer, set it to passes and open your passes.
Is the channel there?

If I am right, one or both are missing. Therefore it cannot work.




So in the end I would say:
Do NOT use the channels tab of the mia_shader.
Do a) and b) yourself. Manually.

Also, there is no need for any override.
See I)b) This is a per-pass setting.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Fri May 31, 2013 4:18 pm    Post subject: Reply with quote

I know how the passes and channels are setup, despite doing all that, it is not working. As you mentioned I should set it up manually. This is what I did to set it up manually, I went into the script editor, after toggling on a channel that I wanted to write to the frame buffer from this shader, in this example, I wanted this channel;
Application.RenderRegionSetRenderChannel("siViewportB", "MIA_Material_Advanced_spec_raw")

In the Scene > Render Options > Channels. I manually created a new channel called "MIA_Material_Advanced_spec_raw". That didn't work as the channel wasn't written to the framebuffer, but the channel was written to the framebuffer when I toggled it on within the channel tab in the shader, doing it manually didn't work.

Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri May 31, 2013 4:44 pm    Post subject: Reply with quote

After you have let the MIA_Shader add the channel, please check the channel name in the render setting of your scene. There is no "MIA_Material_Advanced_spec_raw". The channels are named differently.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Fri May 31, 2013 5:36 pm    Post subject: Reply with quote

schoenberger wrote:
After you have let the MIA_Shader add the channel, please check the channel name in the render setting of your scene. There is no "MIA_Material_Advanced_spec_raw". The channels are named differently.


It works. Very Happy

All I had to do was manually enter in the channelsl I want, now all the objects render the channel I want. For crying out loud, if I had have been told from the beginning, don't use the channel tab in the shader, manually enter in the channels, I would have had this solved a while ago. If I can manually enter in the channel, I will. I knew it was something small. Mad Very Happy Mad Very Happy

To much confidence in 3rd party tools, that is the problem Smile
Back to top
View user's profile Send private message

Falam



Joined: 20 Apr 2013
Posts: 27
Location/Company/Country: Toronto, Canada

PostPosted: Sun Jun 02, 2013 3:37 am    Post subject: Reply with quote

In one of your posts, you mentioned the Mia_Advanced Shader is "bad", how did you come to this conclusion ?
Back to top
View user's profile Send private message

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Jun 03, 2013 1:36 pm    Post subject: Reply with quote

If you do not have problems with it, use it.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    www.BinaryAlchemy.de Forum Index -> Shader Problems / How do I...? All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 
Documento sin título
 



Powered by phpBB © 2001, 2002 phpBB Group



Number of shameful bots caught by Anti-Spam ACP: 1667