Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 21-05-2006, 06:36 PM   #121
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

I think ArneOOg said this earlier:

Indigo For Animations? No Way!!!

Check this out (NOT DONE BY ME!!!!)

There is an AVI (640x480) that the same guy did, but I won't post it.

He said each big frame (640x480) was rendered in 20 minutes.

__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 22-05-2006, 02:37 AM   #122
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

cones! lol. 2 hrs, rendered originally at 640x480 (scaling down trick- it reduces noise really well, and in less time!!!)
Attached Thumbnails
 
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 22-05-2006, 01:36 PM   #123
arneoog
Registered User
 
arneoog's Avatar
 
Join Date: Mar 2006
Location: Norway
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah.. hehe I did say that :blush:
But I thought it was really cool when I saw it!!!

That's some awsome looking cones, Matt! hehe

The first script for Maya to Indigo v.0.0.1 has been made :attn:
Can't wait to see it finish!!!
__________________
Arne OOG - Makin' stuff
>>elqx Studios<<
arneoog is offline   Reply With Quote
Old 22-05-2006, 09:28 PM   #124
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

yeah, I am gonna make one too, gonna start on it soon.

'cept, it will actually produce an XML file (I hope!!!) and run indigo with it! It will work with meshlights, and have custom materials that you can assign to objects, and it will have a box (with checkboxes for physical sky, DOF, etc...)
__________________
Live the life you love, love the life you live

Last edited by MattTheMan : 23-05-2006 at 01:31 PM.
MattTheMan is offline   Reply With Quote
Old 27-05-2006, 01:42 AM   #125
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

I've written a Maya->Indigo exporter!

Please test it! Oh- your up vector needs to be set to Z.

no meshlights yet, it makes a default background light, triangulate mesh first-

IMPORTANT Triangulate every single polygon in your scene. Also, delete ALL history first.I will have the script to do that, but, 'till then...

Lambert materials are plain diffuse

Phong materials-

Color is actual color

Reflectivity is specular color

If you want a non-constant specular color (eg 1 0 1 instead of 1 1 1) you need to set reflectivity to 0 and use the reflected color gauge

Cosine power is specular sharpness (warning- it is multiplied by 10- eg. 12 is 120 and 0.3 is 3)

you need to use a camera- camera, aim, and up. Don't rename it.

Code:
//Script by Matt B. (ThatDude33) for export from Maya 6.5+ to Indigo 0.5.3
//Fixed by Arne OOG
//Outputs in script window
//Copy-Paste results into XML file, run using Ini File.
//No edits should be neccesary

//Start Writing:
string $write = "<?xml version='1.0' standalone=no>\n";
$write += "<!--Exported from Maya-->\n\n";

proc vector normalize(vector $v){
float $len = sqrt($v.x*$v.x+$v.y*$v.y+$v.z*$v.z);
vector $n = <<$v.x/$len, $v.y/$len, $v.z/$len>>;
return $n;
}
//Will have a prompt window, but now uses settings from render globals
$write +="<scene>\n";
$write += "\n<renderer_settings>\n";
$write += "\t<width>" + `getAttr defaultResolution.width` +"</width>\n";
$write += "\t<height>" + `getAttr defaultResolution.height` +"</height>\n";
$write += "\t<metropolis>true</metropolis>\n";
$write += "\t<large_mutation_prob>0.2</large_mutation_prob>\n";
$write += "\t<max_change>0.025</max_change>\n";
$write += "\t<russian_roulette_live_prob>0.7</russian_roulette_live_prob>\n";
$write += "\t<max_depth>1000</max_depth>\n";
$write += "\t<bidirectional>true</bidirectional>\n";
$write += "\t<strata_width>10</strata_width>\n";
$write += "\t<frame_upload_period>20</frame_upload_period>\n";
$write += "\t<halt_time>-1</halt_time>\n";
$write += "\t<logging>true</logging>\n";
$write += "\t<image_save_period>30</image_save_period>\n";
$write += "\t<save_tonemapped_exr>false</save_tonemapped_exr>\n";
$write += "\t<save_untonemapped_exr>false</save_untonemapped_exr>\n";
$write += "</renderer_settings>\n\n";
$write += "\t<tonemapping>\n";
$write += "\t\t<reinhard>\n";
$write += "\t\t\t<pre_scale>2.0</pre_scale>\n";
$write += "\t\t\t<post_scale>1.0</post_scale>\n";
$write += "\t\t</reinhard>\n";
$write += "\n\t\t<colour_correction>1.0 1.0 1.0</colour_correction>\n";
$write += "\t</tonemapping>\n";
$write += "<background>\n<radiance>1 1 1</radiance>\n</background>\n\n";
$write += "\n<camera>\n";
float $px = `getAttr camera1.tx`;
float $py = `getAttr camera1.ty`;
float $pz = `getAttr camera1.tz`;
vector $pos = <<$px, $py, $pz>>;
float $tx = `getAttr camera1_aim.tx`;
float $ty = `getAttr camera1_aim.ty`;
float $tz = `getAttr camera1_aim.tz`;
vector $target= <<$tx, $ty, $tz>>;
vector $front = $target-$pos;
vector $dist = $front;
$front = normalize($front);
$write += "\t<pos>"+$px+" "+$py+" "+$pz+"</pos>\n";
float $ux = `getAttr camera1_up.tx`;
float $uy = `getAttr camera1_up.ty`;
float $uz = `getAttr camera1_up.tz`;
vector $up = <<$ux, $uy, $uz>>;
$up = $up - $pos;
$up = normalize($up);
$write += "\t<up>"+$up.x+" "+$up.y+" "+$up.z+"</up>\n";
$write += "\t<forwards>"+$front.x+" "+$front.y+" "+$front.z+"</forwards>\n";
float $fstop = 8;
if ($fstop < 1.0){
$fstop = 1.0;
}
if ($fstop > 22){
$fstop = 22;
}
float $aprad = 50/$fstop;
$aprad = $aprad/200;
$write += "\t<aperture_radius>"+$aprad+"</aperture_radius>\n";
float $FD = sqrt($dist.x*$dist.x+$dist.y*$dist.y+$dist.z*$dist.z);
$write += "\t<focus_distance>"+$FD+"</focus_distance>\n";
$write += "\t<aspect_ratio>"+`getAttr defaultResolution.deviceAspectRatio`+"</aspect_ratio>\n";
$write += "\t<sensor_width>0.036</sensor_width>\n";
$write += "\t<lens_sensor_dist>0.0523314</lens_sensor_dist>\n";
$write += "\t<white_balance>D65</white_balance>\n";
$write += "</camera>\n\n";

string $mats[] = `ls -mat`;
for ($one in $mats){
	if (`objectType $one` == "lambert"){
		$write+= "\n<material>\n";
		if($one == "initialMaterialInfo"){
			$one = "lambert1";
		}
		$write += "\t<name>"+$one+"</name>\n";
		$write += "\t<diffuse>\n";
		float $color[] = `getAttr ($one + ".color")`;
		$write+="\t\t<colour>"+$color[0]+" "+$color[1]+" "+$color[2]+"</colour>\n";
		$write += "\t</diffuse>\n";
		$write += "</material>\n";
	}
	if (`objectType $one` == "phong"){
		$write += "\n<material>\n";
		$write += "\t\t<name>"+$one+"</name>\n";
		$write += "\t<phong>\n";		
		float $col[] = `getAttr ($one + ".color")`;
		$write += "\t\t<diffuse>"+$col[0]+" "+$col[1]+" "+$col[2]+"</diffuse>\n";
		float $reflectivity = `getAttr($one +".reflectivity")`;
		if ($reflectivity > 0.0){
			$write += "\t\t<specular>"+$reflectivity+" "+$reflectivity+" "+$reflectivity+"</specular>\n";
		}
		if ($reflectivity == 0.0){
			float $refl[] = `getAttr ($one +".reflectedColor")`;
			$write += "\t\t<specular>"+$refl[0]+" "+$refl[1]+" "+$refl[2]+"</specular>\n";
		}		
		float $exp = `getAttr ($one + ".cosinePower")`;
		float $exp = $exp * 10;
		$write += "\t\t<exponent>"+$exp+"</exponent>\n";
		$write += "\t</phong>\n";
		$write += "</material>\n";
	}
}

string $shapes[] = `ls -s`;
for ($one in $shapes){
	if(`objectType $one` == "mesh"){
	int $nV[] = `polyEvaluate -v $one`;
	int $nF[] = `polyEvaluate -f $one`;
	int $x = 0;
	$write += "\n<mesh>\n";
	$write += "\t<name>"+$one+"</name>\n";
	$write += "\t<embedded>\n";
	for($x=0;$x < $nV[0];$x++){
		string $cv = $one+".vtx["+$x+"]";
		float $pos[] = `pointPosition $cv`;
		$write += "\t\t<vertex pos='"+$pos[0]+" "+$pos[1]+" "+$pos[2]+"'";
		float $normal[] = `polyNormalPerVertex -q -xyz $cv`;
		$write += " normal='"+$normal[0]+" "+$normal[1]+" "+$normal[2]+"'";
		string $uv[] = `polyListComponentConversion -fv -tuv $cv`;
		float $uvcoord[] = `polyEditUV -q $uv`;
		$write += " uv0='"+$uvcoord[0]+" "+$uvcoord[1]+"'/>\n";
		}	
	$write += "\t<triangle_set>\n";
	string $sg[] = `listConnections -type shadingEngine $one`;
	string $mat[] = `listConnections $sg[0]`;
	//$mat[2] holds the actual material.	
	print(`listConnections $sg[0]`);
	if ($mat[2] == "initialMaterialInfo"){
		$mat[2] = $mat[0];
	}
	if ($mat[2] == "renderPartition"){
	$mat[2] = $mat[3];
	}
	$write += "\t<material_name>"+$mat[2]+"</material_name>\n";
	for($x = 0;$x < $nF[0];$x++){
		string $curface = $one +".f["+$x+"]";
		string $vfl[] = `polyListComponentConversion -ff -tvf $curface`;
		$vfl = `filterExpand -sm 70 $vfl`;
		$write +="\t\t<tri>";
		for ($v in $vfl){
			string $vert[]=`polyListComponentConversion -fvf -tv $v`;
			string $vnum = match("[0-9]+",match("[0-9]+\]",$vert[0]));
			int $conv = $vnum;
			$write += $conv + " ";
		}
		$write += "</tri>\n";
	}	
	$write += "\t</triangle_set>\n";
	$write += "\t</embedded>\n";
	$write += "</mesh>";
	}
}

//Models
string $trans[] =`ls -s`;
for ($one in $trans) {
			string $shape[] = `listRelatives -shapes $one`;
			if (`objectType $one` == "mesh"){
			$write += "\n\n<model>\n\t<pos>0 0 0</pos>";
		$write += "\n\t<scale>1</scale>";
		$write += "\n\t<rotation><matrix>1 0 0 0 1 0 0 0 1</matrix></rotation>";
		$write += "\n\t<mesh_name>"+$one +"</mesh_name>\n</model>";
	}
}
$write += "\n</scene>";
print($write);
if (`window -exists indOut`) deleteUI indOut;
window -title "Output for Indigo Renderer" indOut;
windowPref -wh 500 600 indOut;
rowLayout -h 600;
scrollField -w 480 -h 560 -editable false -tx $write;
showWindow indOut;
Thanks to Arneoog for fixing a fatal bug!!!!

Not perfect- I wrote it last night and this morning.

I have plans for a UI and some more interesting lighting (sun and meshlight)

Please test it!!!! Use with Indigo 0.5.3 or 0.5.4- get it from here: http://www.flipcode.dxbug.com/board.php?topic=441

please test my Maya exporter!!!!!
__________________
Live the life you love, love the life you live

Last edited by MattTheMan : 27-05-2006 at 06:24 PM.
MattTheMan is offline   Reply With Quote
Old 27-05-2006, 08:14 PM   #126
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

I rendered a HUGE image just to test how far my computer can go. I am afraid to make an image any bigger, my computer was already going slooooooooow.

I rendered at 5000x3333 size. Reached 0.75 mutations per pixel in 30 mins. Average 7500 mutations per second.

Obviously- 1000 GI bounces isn't enough. Neither is 100 for maximum number of consecutive rejections in the MLT algorithm.

Here is one at 10% size:



Lol, origional PNG file was 45.2 MB And I might have crashed Photoshop trying to save it for web

Please excuse all of the JPeg compression- you try cramming an image that is 5000x3333 into 1024 KB

Here it is: 0.99 MB (PNG was 45.2 MB)

__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 06-06-2006, 12:18 AM   #127
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

if anyone is interested- look in the MEL scripts and programming section to find an update for my Maya->Indigo script. It now supports meshlights!
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 06-06-2006, 11:15 PM   #128
13th_resident
Subscriber
 
13th_resident's Avatar
 
Join Date: Feb 2006
Location: London
Posts: 703
Thanks: 0
Thanked 0 Times in 0 Posts
Default

wow matt your simply a GENIUS.
maybe prodigy will suit you better. :eeek2:
__________________
A pint of example is worth a gallon of advice!!
13th_resident is offline   Reply With Quote
Old 07-06-2006, 09:42 PM   #129
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Matt aparantly theres a demo version of Maxwell V1.0 available, the links on CG talk but I closed it before I copied it into this post.

Sorry dude.
gster123 is offline   Reply With Quote
Old 07-06-2006, 10:40 PM   #130
MattTheMan
Registered User
 
MattTheMan's Avatar
 
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Thanks: 0
Thanked 18 Times in 18 Posts
Default

Yeah, I found it, it's alright, I'm downloading it now

Thanks anyway
-Matt
__________________
Live the life you love, love the life you live
MattTheMan is offline   Reply With Quote
Old 07-06-2006, 10:44 PM   #131
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Ha ha, nice one mate!!
gster123 is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.