MayatoIndigo Developement

Announcements, requests and support regarding the MAYA exporter
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Wed May 14, 2008 1:01 pm

Your opinion on leaving icons for menus ? They take long to load , I realize that now they're installed.

A shelf zone may rock... some place where holding the right mouse button brings a directional menu.

Well as you ask me I'd tell I've left my text editor for a pen and am structuring mi mind a bit. You can feel the boundaries of intuition when you are facing a computer :D That's my way of learning, but now got to create...

and don't put me into a hurry, I'm the one who started yesterday saying "I'd like a release within 7 days". C'm'on, c'm'on don't push me ! :P

LOG (cools my brain out, planifies next action so yes talking to myself):

- simplfying attribute concatenation to string variable directly. No more intermediate variables but the usual state check for checkboxes.
...
It's going somewhere...
I'm covering indigoShader's cases, reformatted, now cleaning transparency template for medium and such. Work response is positive.

Thanks Ono for hosting, how goes ?

...
wow, this one is just for the brain cooling :shock: Gonna surf by there a bit
...
Upped working specular. I think the maya shaders versions is broken. I'll finish for iS before I check that.
obsolete asset

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu May 15, 2008 4:26 am

I'm thinking to automatically create and assign an indigoShader as soon as a mesh is selected through the Indigo Palette, The scene will have more shader at a certain designing stage, but they can be cleaned afterwards. So at the end an Indigo scene may contain only indigoShaders.

Less hassle, more coherency. Op ?

I'm really stopped by a configuration I can't sort out (specular switches), I have simplified the code a bit yesterday but I've been stalling on this one, I may need help there.

Whoops, storm here

*offline*
obsolete asset

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Thu May 15, 2008 4:35 am

Not sure about trying to automatically assign an indigoshader - not all Maya versions support it. Only 8.5 +

Also, the left over debris concerns me a little. I have a hard enough time finding shaders in my scenes as it is :)

Although... an interesting function could be to manually convert the selected Maya shader into an indigoShader via a button.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu May 15, 2008 6:31 am

Although... an interesting function could be to manually convert the selected Maya shader into an indigoShader via a button.
Approved.

If incandescence=0, the button (or menu) will assign the new indigoShader to all shapes with the Maya shader assigned, then delete the later.

Once you have created mti_settings the scene is dedicated to Indigo, is that correct to say ?

BTW did you test exporting a scene using references ? Could work in conjunction with instances, allowing not to load the original mesh into the scene. Yummy, big scenes with craploads of differents hires meshes duplicated with the weight of locators !
obsolete asset

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Thu May 15, 2008 7:22 am

no external meshes yet. I was thinking of maybe another custom locator for this purpose.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Wed Oct 29, 2008 2:42 am

bump !

First draft for the new export process. Not sure I want to have this identation, I'd rather write procedures for each steps, just like MtI is oriented now.

What PhongE was (but who can tell ?) will be generalized: notes attribute from shaders will be parsed, looking for material childs tags (displacement, albedo etc), though if a whole valid material tag is present the shader attributes may be fully overwritten. That means isl code as well, yeah !

So from now two things should be in focus:

1 - Coding the separate procedures wich will handle each step of exporting a shader, and link them together;

2 - Parsing xml forth and back.

The Thing:

Code: Select all

// we start with a list of visible meshes in scene
proc shaders (stringArray $meshes)
{
	for each mesh in list
	{
		if it has a shading group	//	mti_mesh2sgs, done.
		{
			for each shading group
			{
				if the sg has a surfaceShader	//	mti_sg2mat, done.
				{
					if the surfaceShader has notes		//	from there new stuff to do
					{
						if there is a displacement tag in notes
						{
							scan for other tags
							save all valid tags found in notes in a list
						}
						else
						{
							if the sg has a displacementShader	//	todo: mti_sg2disp
							{
								get disp value
							}
						}
					}
					else	// surfaceShader has no notes
					{
						actual export proc
						/*	to be more object oriented, as far as I understand OOP
							the list of tags from notes must interfere here
						*/
					}
				}
				else
				{
					discard mesh
				}
			}
		}
		else
		{
			discard mesh
		}
		mesh +1
	}
}
Ah, I'm exhausted already !!!

:mrgreen:

well of course for a first draft I can see now conditioning limitations etc, its a broken draft actually but explains some stuff, ehr, I hope.

I will add an image explaining better how things are linked within Maya, since I discovered that the Maya forum was read by more people than just me and Hellstorm :shock:
obsolete asset

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Wed Oct 29, 2008 4:14 am

Image

For the curious people.

Any input/question/whatever is welcome !
obsolete asset

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu Oct 30, 2008 4:42 am

The previous code was looking so wrong I had to post the following: this is the actual export procedure, from visible objects in scene to xml. As you see we are not abusing indentation here; procedures generate lists or output in general, wich is taken by the following proc. That's what I meant by more oo but maybe the term is abusive here, no clue...

Code: Select all

for ($mesh in $meshes)
{
	$iM++; $PC = ($iM/$numMeshes)*100;
	progressBar -edit -progress $PC progs;
	$temp = `mti_mesh2sgs $meshes[$i]`;
	$sgs = stringArrayCatenate($sgs, $temp);
	$i++;
}
if ($sgs[0] != "false" )
{
	for ($sg in $sgs)
	{
		//	todo:	test displacement
		$mats[$j] = `mti_sg2mat $sg`;
		$j++;
	}
}
$mats = `stringArrayRemoveDuplicates($mats)`;

for ($mat in $mats)
{
	if (!mti_EMS_matIsExported($mats[$m])&&($mat!="false")
	{
		$mti_theMats += mti_EMS_export($mats[$m], $xmlFile);
	}
	$m++;
}
obsolete asset

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Nov 01, 2008 3:23 am

I managed to modify J. Adrian Herbez's xml_lib script, to be igs friendly. The following is an excerpt of the hierarchy of objects created by the script (edit: after loading an igs file in Maya).

Image

Possible applications are:

- to check the preseence of valid tags for isl precedence over normal shader attributes,
- recreating a Maya scene from an igs, provided it uses external meshes.

More things, more fun :)
obsolete asset

Hellstorm
Posts: 41
Joined: Mon Sep 22, 2008 9:31 pm
Location: Einbeck, Germany
Contact:

Post by Hellstorm » Fri Nov 21, 2008 1:15 am

Heyas.
I've changed some lines in the indigoShader.py plugin and mti_ExportModuleShaders.mel in conjunction with my medium-transparency-thoughts.

Now I can set a medium color and the use a "Medium Density" Multiplier to get the desired glass color.
This way you have a useful color feedback within the viewport but you can easily change the absorbtion amount :D

Wanna see? :D

For the attached image below I've used 3 materials. I did not change the color for each one, I've justed increased the Medium Density.

MtI.rar contains my changed files.
Attachments
MtI.rar
(10.08 KiB) Downloaded 246 times
iorcomp_test1.igs.png
iorcomp_test1.igs.png (1.19 MiB) Viewed 4199 times

User avatar
Phr0stByte
Posts: 395
Joined: Wed Nov 22, 2006 5:07 am
Location: Centreville, VA
Contact:

Post by Phr0stByte » Fri Nov 21, 2008 6:59 am

Hellstorm
Hey! That is freaking awesome! Works kinda like fog color in Vray mats.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Nov 22, 2008 9:42 am

Woohoo, I'm glad you put your hands in Hellstorm ! I'm updating too, maybe we'll have a chat soon on your skillz ;)

Be MtI's guest !

PS: I hope your changes are based on the newest test release code...
obsolete asset

Hellstorm
Posts: 41
Joined: Mon Sep 22, 2008 9:31 pm
Location: Einbeck, Germany
Contact:

Post by Hellstorm » Sat Nov 22, 2008 10:19 am

Revision is 276. I guess that's the current one (as long as there have been no change to indigoPlugin.py since 275 cuz i did not copy the plugin from my svn dir over)

Hellstorm
Posts: 41
Joined: Mon Sep 22, 2008 9:31 pm
Location: Einbeck, Germany
Contact:

Post by Hellstorm » Sat Nov 22, 2008 8:59 pm

Anyways... I'm also thinking about my other mentioned thing: Replacing the Medium Density with a "Distance" value, e.g. the absorption will be weaker with a higher value. This way you can specify the resulting color after X centimeter. I just have to do some test renderings to get the maximum distance value. I hope I have some time the next days to do this.

Btw... If one has problems finding my Medium Density: At the moment it's located in the Extra Attributes tab of the IndigoShader Node.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Tue Nov 25, 2008 3:20 am

Sorry, missed your posts after i deleted web cookies.

I personally need a rest after i broke my head on the parsing thing, I have little stamina.

Now about that distance idea... are you going to put limits to absorbtion ? what is this maximum distance value ?

----

Do you think you could check in the plugin, what's wrong with the string attribute declaration/creation of the textFieldNode ? It was primarily designed to behold isl code, to be plugged in iShader attributes. Would help a great deal if that node was working... but python don't let me in :(
obsolete asset

Post Reply
69 posts

Who is online

Users browsing this forum: No registered users and 5 guests