Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 166 11-09-2006 , 07:23 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
Matt, Maybe we should start making a tutorial...?
Haven't done anything on it lately...

# 167 12-09-2006 , 08:18 PM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
hey Arne!

my computer problems are F I X E D!!!!!!! :attn: :attn: :attn: :attn:

anyway, I'll start working on this script on Sunday, I'm going somewhere today.

I'll take a look at the script(s) and I'll add some stuff like... well... we culd start working on mat editor and stuff.

anyway, im so happy!!!!!11 :attn: :attn:


Live the life you love, love the life you live
# 168 12-09-2006 , 08:24 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
Congratulation!!! :attn:

I was thinking about using custom nodes as material info holders
And some extra attributes in the polys to hold material name and the "Generate this" option user added image

Code:
string $indPolyObject[];
$indPolyObject = `ls -sl`;
$shaderName = "Diffuse";

$indShaderNode = ( $indPolyObject[0] + "ShaderName" );
$indGenNode = ( $indPolyObject[0] + "GenThis" );

$indSetShaderNode = ( $indPolyObject[0] + "." + $indShaderNode );
$indSetGenNode = ( $indPolyObject[0] + "." + $indGenNode );

   addAttr -ln "ShaderName" -sn $indShaderNode -dt "string";
   addAttr -ln "GenerateThis" -sn $indGenNode -at "bool";
   setAttr $indSetShaderNode -type "string" $shaderName;
   setAttr $indSetGenNode true;
This will create a Node containing the Diffuse Settings
Code:
		if( !`objExists "indigoDiffuseNode"` ) {
                                                createNode "transform" -n "indigoDiffuseNode";
$indObjectToAddTo = `ls -sl`;
			//---------------------------------------- Add Attributes

			// add a string attribute
			addAttr -ln "ShaderName" -sn "indDifName" -dt "string";

addAttr -ln indDiffuseColor -usedAsColor -at float3;
    addAttr -ln redCol -at "float" -sn "indDifRed" -parent indDiffuseColor;
    addAttr -ln greenCol -at "float" -sn "indDifGreen" -parent indDiffuseColor;
    addAttr -ln blueCol -at "float" -sn "indDifBlue" -parent indDiffuseColor;

$iotatRed = ( $indObjectToAddTo[0] + ".indDifRed" );
$iotatGreen = ( $indObjectToAddTo[0] + ".indDifGreen" );
$iotatBlue = ( $indObjectToAddTo[0] + ".indDifBlue" );
$iotatName = ( $indObjectToAddTo[0] + ".indDifName" );

			//---------------------------------------- Set Initial Values
			setAttr $iotatRed 0.5;
			setAttr $iotatGreen 0.5;
			setAttr $iotatBlue 0.5;
			setAttr $iotatName -type "string" "Wall";

		}
And to Change Attribute Settings
Code:
select -r indigoDiffuseNode; //name of material node to be selected
$indObjectToAddTo = `ls -sl`;

$iotatRed = ( $indObjectToAddTo[0] + ".indDifRed" );
$iotatGreen = ( $indObjectToAddTo[0] + ".indDifGreen" );
$iotatBlue = ( $indObjectToAddTo[0] + ".indDifBlue" );
$iotatName = ( $indObjectToAddTo[0] + ".indDifName" );

			//---------------------------------------- Set Initial Values
			setAttr $iotatRed 0.5;
			setAttr $iotatGreen 0.5;
			setAttr $iotatBlue 0.5;
			setAttr $iotatName -type "string" "Wall";
What do you think? Just connect this to the Mat Editor user added image

Anyway, Welcome back!!! user added image


Last edited by arneoog; 13-09-2006 at 10:13 AM.
# 169 13-09-2006 , 12:10 PM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
hmm... looks good. it'll take me a while to understand what's going on :p

okai, from what I see, the script won't run because of multiple variables that are undeclared

but this is what I understand of it.

for each polygon object in the scene, give it a node that says "create material" and one that says "current material".

then adding the nodes to it, but why do you need

Code:
$indSetShaderNode = ( $indPolyObject[0] + "." + $indShaderNode );
$indSetGenNode = ( $indPolyObject[0] + "." + $indGenNode );
next, it checks for if the node is already there, and if it is not, then it goes in and adds attributes fr the diffuse material.
finally it gives the user the ability to edit them ??? I can't see how. (it's just me :p)

well, I'll try to incorporate this into the main script as well. Good job user added image


Live the life you love, love the life you live
# 170 13-09-2006 , 01:07 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
-The first one adds two extra attributes to the selected object

$indSetShaderNode = ( $indPolyObject[0] + "." + $indShaderNode ); <<--This is needed to set the attributes
$indSetGenNode = ( $indPolyObject[0] + "." + $indGenNode ); <<--This is needed to set the attributes

addAttr -ln "ShaderName" -sn $indShaderNode -dt "string";
addAttr -ln "GenerateThis" -sn $indGenNode -at "bool";
setAttr $indSetShaderNode -type "string" $shaderName; <<--This sets the attributes
setAttr $indSetGenNode true; <<--This sets the attributes


-The second one creates a Node to hold the Material Settings for indigo Diffuse material

-The third in to change the settings in the Node created above

Good luck scripting! :p user added image


Last edited by arneoog; 13-09-2006 at 01:10 PM.
# 171 25-09-2006 , 08:47 AM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
ok, I think i'll write a tutorial, so plan on it by tomorrow (yes, tomorrow i will write the tut user added image)


Live the life you love, love the life you live
# 172 25-09-2006 , 04:33 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
cool! user added image
Remember to use lots of images/screenshots user added image

# 173 20-10-2006 , 09:21 AM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189

# 174 20-10-2006 , 05:15 PM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
How to set up and render a basic scene:

So let's say you have a basic scene here, like mine. A couple of polygons and a basic plane.
user added image

So you want to render this in Indigo. First thing you have to do is to create a light. Your scene won't render without a light. Now, since Indigo is physically based, you need a 3d object to illuminate your scene.

One thing you might want to consider is render time. The more polygons that you have as lights, the more time the render will take.

So then, let's make a light.
Create a plane about 2 units long by 2 units wide. Position it at an angle, facing the object you want to render
user added image

Now, we have to make sure that the light is pointing toward the object, and not away from it. Go to Display->Polygon Components->Normals. Select the plane, and you will see that the normals are facing away from the object we want to render.

user added image

To fix this, go to Edit polygons->Normals->reverse
user added image

Alright! Now what we want to do is triangulate everything. So, select everything. Go to Polygons->Triangulate. Alright, now that we have that done, we need materials. It's always a good idea to set the light materials last. This is because of some errors in my own exporting code... which I am unable to root out. So, we will assign the other materials first.

So far, only 3 materials are supported- that is, meshlights, phongs, and diffuse.
So, to let's make the diffuse material for the ground plane first. Create a lambert, and change its color.

user added image

Great! Now let's make a reflective material for the object user added image. I'll create a mirror material, just as an example. Assign a phong with the following settings to the object.

user added image

Alright. Now lets make the light. What you should know about the lighs is that the incandescene value is infact the blackbody temperature of the object. So, to make an object emit a white-ish light, the incandescense value should be in the middle range. For a dim, reddish light, it should be low, and for a bright, blue light it should be very high.

The next thing you should know is that the material type has to be lambert. The collor does not make a difference, just the incandescene value. So let's assign a lambert with the following properties to the plane/light.

user added image

Good. Now, all we have to do is to set the render settings, make a camera, and render.

Open up MayaToIndigo, and go to create->camera. Position the camera anywhere you want.

Finally, go to the last tab on the right, and put in settings like this:

user added image

click Generate XML Code and Maya should export, and Indigo should pop up. Happy Rendering user added image


Live the life you love, love the life you live
# 175 22-10-2006 , 01:38 AM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
Matt, have you done anything on the script lately that you want to add to the 0.6 release? user added image
We should have it done the same day as indigo v0.6 is released user added image

# 176 22-10-2006 , 07:59 AM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
well i havent had barely any spare time (and what I did, I used for the tutorial 8)) but i think i will add some stuff... maybe start the material editor user added image


Live the life you love, love the life you live
# 177 22-10-2006 , 11:49 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
Okay.

If you start on the object and material editor they should be in separate files called
mtiObjectEditor and mtiMaterialEditor user added image

Commands = mtiObjectEditor and mtiMaterialEditor

Content so far on the object editor (mtiObjectEditor.mel):
Code:
//-----------------MAYA TO INDIGO XML CONVERTER------------------
//Version: BETA 0.6 (0.6) synced!
//---------------------------------------------
//Credits:
//Matt B. (aka MattTheMan or ThatDude33) (converter engine and more)
//Arne OOG (aka arneoog) (interface and more)
//XML Output in Script Window and Auto Save
//No edits should be neccesary
//Start Writing:

//-----------------OBJECT EDITOR------------------

global proc mtiObjectEditor() 
{ 
window -title "Object Editor" -h 340 -w 570 objE00444;
rowLayout -numberOfColumns 2 -columnWidth2 174 310;
 	textScrollList -width 160 -height 306 -numberOfRows 8 -allowMultiSelection false 
 		-append "one"      -append "two"      -append "three" 
 		-append "four"     -append "five"     -append "six" 
 		-append "seven"    -append "eight"    -append "nine" 
 		-append "ten"      -append "eleven"   -append "twelve" 
 		-append "thirteen" -append "fourteen" -append "fifteen"
 		-selectItem "six"
 		-showIndexedItem 4;
 			                setParent ..;
 			setParent ..;
columnLayout;
text -label "Material Settings" -w 400 -align "left" -font "boldLabelFont";
	separator -h 10 -w 400;
 			shelfLayout -width 390 -cellWidth 34 -cellHeight 34;
shelfButton -annotation "Diffuse Shader" -image "mtiIcons/indigo_diffuce.bmp" -command "diffuce";
shelfButton -annotation "Phong Shader" -image "mtiIcons/indigo_phong.bmp" -command "phong";
shelfButton -annotation "Specular Shader" -image "mtiIcons/indigo_specular.bmp" -command "specular";
shelfButton -annotation "Mesh Light Shader" -image "mtiIcons/indigo_meshLight.bmp" -command "meshlight";
shelfButton -annotation "Metal Shader" -image "mtiIcons/indigo_metal.bmp" -command "metal";

 				setParent ..;

rowLayout -numberOfColumns 2 -columnWidth2 170 230;
text -label "Name Of Material Type" -w 170 -align "left";
textField -w 200;
 			                setParent ..;

	colorSliderGrp -h 25 -label "Diffuse" -rgb 0.5 0.5 0.5;

	colorSliderGrp -h 25 -label "Specular" -rgb 0 0 0;

	floatSliderGrp -h 25 -label "Exponent" -field true 
                -fieldMinValue -10000 -fieldMaxValue 10000 
                -minValue 0.001 -maxValue 10000 -value 10000;
	separator -h 10 -w 400;
text -label "" -h 20 -align "left";

optionMenu -label "Add Existing Materials";
		menuItem -label "?????";
text -label "" -align "left";
text -label "Object settings" -w 400 -align "left" -font "boldLabelFont";
	separator -h 10 -w 400;
checkBox -label "Normal Smoothing" -value 1;
 			                setParent ..;
 			setParent ..;

			showWindow;
}
Happy Scripting! user added image :p


Last edited by arneoog; 22-10-2006 at 11:51 PM.
# 178 05-11-2006 , 09:21 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
MATT!!! EVERYONE THE YZ ROTATION SH*T IS FIXED :attn: :attn: user added image user added image
ahh.... user added image

Matt, where are you? haven't seen you in weeks.... ..Camp?

# 179 06-11-2006 , 03:45 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189

Maya To Indigo XML Converter v0.6 beta1 (0.6t6 & 0.6)

I desided to release the new, pretty much stable, version of the Maya Exporter! 8)
Everyone can now use the Physical Sun Light! No more YZ problems! user added image
There may come another version later on, depends on what Matt B have/can do user added image

Download here: maya_to_indigo_v0.6_beta1.zip


Change Log (v0.6 beta1)

New Functions:
- Added some new settings for indigo v0.6
- Fixed the Y Z up axis translator!
- Fixed Normal error
- Fixed the System Settings

Not Working Functions:
- Object Editor
- Material Editor
- Render Scene from Maya (may work)
- Rectangle Light
- The Edit Menu


Help File (Read Me)

Enjoy! user added image

# 180 08-11-2006 , 02:02 PM
Subscriber
Join Date: Aug 2004
Posts: 515
ive got everything installed, i tested their test scene to render, and the converter is all installed and im getting an error during conversion:

Error: No object matches name:

i tried naming the maya materials "one" and "two" and i also tried the default names, just "phong" etc


First year 3D Grad
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