PDA

View Full Version : help with phenomena


achoury
06-04-2006, 03:08 PM
hi
i am using Maya7.01 on XP and want to create a dielectric material whith bumpmap similar to the "usefulPhen.mi"
here is the first connection:
connectAttr -f mib_bump_basis1.u mib_passthrough_bump_map1.u;
connectAttr -f mib_bump_basis1.v mib_passthrough_bump_map1.v;
connectAttr -f mib_texture_vector1.outValue mib_texture_remap1.input;
connectAttr -force mib_texture_remap1.outValue mib_passthrough_bump_map1.coord;

connectAttr -f mib_passthrough_bump_map1.message mentalrayPhenomenon1.root[0];
connectAttr -f dielectric_material1.message mentalrayPhenomenon1.root[1];

connectAttr -f mentalrayPhenomenon1.interface[0] mib_passthrough_bump_map1.step;
connectAttr -f mentalrayPhenomenon1.interface[1] mib_passthrough_bump_map1.tex;
connectAttr -f mentalrayPhenomenon1.interface[2] mib_texture_remap1.repeat;

all my connections look good and no error in the script editor until i try to capture the interface for the "dielectric_material1"
connectAttr -f mentalrayPhenomenon1.interface[3] dielectric_material1.col;
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.col //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
// Error: (Mayatomr.Output) : //
connectAttr -f mentalrayPhenomenon1.interface[4] dielectric_material1.ior;
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.ior //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
connectAttr -f mentalrayPhenomenon1.interface[5] dielectric_material1.col_out;
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.col_out //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
connectAttr -f mentalrayPhenomenon1.interface[6] dielectric_material1.ior_out;
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.ior_out //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
connectAttr -f mentalrayPhenomenon1.interface[7] dielectric_material1.phong_coef;
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.phong_coef //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
connectAttr -f mentalrayPhenomenon1.interface[8] dielectric_material1.lights[0];
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.lights //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //

and the attribute of the phenomenon look like this:

Idx===========================Type==========================Name
0=============================vector ===================step
1=============================<ILLEGAL 9>===================tex
2=============================vector ===================repeat
3=============================color ===================col
4=============================scalar ===================ior
5=============================color ===================col_out
6=============================scalar ===================ior_out
7=============================scalar ===================phong_coef
8=============================<ILLEGAL 11>==================lights

so with these error i exported the file with ".mi extension" to the default path of course i add a node id
and restarted Maya just to see how it look
and in a script editor it say :
// parsing D:/Alias/Maya7.0/mentalray/include/test_pheno.mi
// Warning: (Mayatomr.Nodes) : Attr "tex_str" not created. //
// Warning: (Mayatomr.Nodes) : Attr "outValueA" not created. //

and i can't find the way to solve this problem for andding theses 2 Attributes!!!
so help please
rachid

Morph21
06-05-2006, 06:19 AM
Well i cant help you with that problem, but some days ago i tried DGS_Bump from the "usefulPhen.mi" and i got stranges black artefacts that i dont get away so i used a normal DGS with the bumpCombiner and it works great.

You can get it here http://yashu.go.ro/ i think this work with every MR Shader and you are much more flexible with it :thumbsup:

achoury
06-05-2006, 01:32 PM
hi
thank for replay
rachid

bgawboy
06-07-2006, 02:40 PM
I think it would be easier to debug by just looking at the .mi file declaration for the Phenomenon. I have reverted to that technique in all the mr training, until a node-based Phenomenon building UI comes along.

achoury
06-08-2006, 03:15 PM
thank for replay
bgawboy [looking at the .mi file declaration for the Phenomenon...]

yes, but the problem is when i try to capture the interface for the material and when i look at the attribute for the Phenomenon node there are thing like <ILLEGAL> in type for both tex and light.
and a lot of errors in script editor like:
connectAttr -f mentalrayPhenomenon1.interface[3] dielectric_material1.col;
// Result: Connected mentalrayPhenomenon1.interface to dielectric_material1.col //
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //

so how to solve that?
please help
rachid

achoury
06-10-2006, 01:21 PM
hi

i resolved the problem for the Phenomenon, now it's work, i jsut replace the frist line with color
and here is the .mi file

=======================================================

declare phenomenon

color

"mrdielbump" (
color "col",
scalar "ior",
scalar "phong_coef",
color "col_out",
scalar "ior_out",
boolean "ignore_normals",
color texture "bumptex",
vector "repeat",
scalar "factor",
vector "step",
array light "lights"
)
shader "coord"
"mib_texture_vector" (
"select" 0,
"selspace" 0,
"vertex" 0,
"project" 0
)
shader "remap"
"mib_texture_remap" (
"input" = "coord",
"transform" 1. 0. 0. 0. 0. 1. 0. 0. 0. 0. 1. 0. 0. 0. 0. 1.,
"repeat" = interface "repeat",
"alt_x" off,
"alt_y" off,
"alt_z" off,
"torus_x" off,
"torus_y" off,
"torus_z" off,
"min" 0. 0. 0.,
"max" 0. 0. 0.,
"offset" 0. 0. 0.
)

shader "basis"
"mib_bump_basis" (
"project" 0,
"ntex" 0
)
shader "bump"
"mib_passthrough_bump_map" (
"u" = "basis.u",
"v" = "basis.v",
"coord" = "remap",
"step" = interface "step",
"factor" = interface "factor",
"torus_u" off,
"torus_v" off,
"alpha" off,
"tex" = interface "bumptex",
"clamp" off
)

shader "dielectric_mat"
"dielectric_material" (
"col" = interface "col",
"ior" = interface "ior",
"col_out" = interface "col_out",
"ior_out" = interface "ior_out",
"ignore_normals" = interface "ignore_normals",
"phong_coef" = interface "phong_coef",
"lights" = interface "lights"
)
root
= "bump"
= "dielectric_mat"

version 1
apply material
end declare

bgawboy
06-11-2006, 04:40 PM
Now I suggest putting in some defaults, for example to add in white as the default for the color:

declare phenomenon

color "mrdielbump" (
color "col" default 1 1 1 1,
...
array light "lights"
)
...

achoury
06-12-2006, 04:44 PM
thank a lot bgawboy

Now my material look good

"mrdielbump" (
color "col", #: default 1 1 1
scalar "ior", #: default 1.5
scalar "phong_coef", #: default 25
color "col_out", #: default 1 1 1
scalar "ior_out", #: default 1
boolean "ignore_normals",
color texture "tex",
vector "repeat", #: default 1. 1. 1.
scalar "factor", #: default 1.
vector "step", #: default 0.01 0.01 0.01
array light "lights"

and i can render the dielectric with bump map with no pb

but i need to understand the error generating in script editor when i try to capture the interface
// Warning: (Mayatomr.Nodes) : mentalrayPhenomenon1: cyclic dependency detected, connection to node ignored //
what is cyclic dependency ? is it the wrong way?
tahnk's
rachid

CGTalk Moderation
06-12-2006, 04:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.