MtI rev 32 29 oct 2007

Announcements, requests and support regarding the MAYA exporter
User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Fri Nov 02, 2007 5:17 am

perhaps the code that prints the output and the code that actually saves the file is different.. ie. an extra / is printed, so looks correct in all cases, but the save to file code won't work ??

edit: restarted the server, it should be OK now.

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

Post by dougal2 » Fri Nov 02, 2007 5:25 am

looking in mti_Gen.mel,
just after

Code: Select all

//--MATERIALS--
seems to be where the file is written.
should the line

Code: Select all

$xmlFile = ( $saveFolder + "/" + $saveName );
be more like

Code: Select all

 string $xmlFile = $saveFolder + "/" + $saveName;
?
seems strange that $xmlFile is otherwise uninitialised.

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

Post by CTZn » Fri Nov 02, 2007 6:03 am

Not sure... Strange things happening here, maybe you could enlight our mind on global variables not working properly, Benedikt ? BTW my real name is Adam.

I'm now to test the implemented rotation code, sourcing just returned no error. Will commit if mess is limited ;)
obsolete asset

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

Post by CTZn » Fri Nov 02, 2007 6:23 am

Code: Select all

loading external model 'C:\work\3d\Indigo\dev\objs\ beast_head:mesh_5Shape.obj'...
SceneLoaderExcep: CSModelLoaderExcep: ModelFormatDecoderExcep for model 'C:\work\3d\Indigo\dev\objs\ beast_head:mesh_5Shape.obj': could not open file 'C:\work\3d\Indigo\dev\objs\ beast_head:mesh_5Shape.obj' for reading. (In element 'mesh', around line 58, column 1)
Fatal Error: SceneLoaderExcep: CSModelLoaderExcep: ModelFormatDecoderExcep for model 'C:\work\3d\Indigo\dev\objs\ beast_head:mesh_5Shape.obj': could not open file 'C:\work\3d\Indigo\dev\objs\ beast_head:mesh_5Shape.obj' for reading. (In element 'mesh', around line 58, column 1)
What the heck !? Is that me ??? Again I can't test rotation code, already lost 24h :x *pissed off*

Feedback on rotations please (untested), commiting next rev anyway :(

REV 52
obsolete asset

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

Post by CTZn » Fri Nov 02, 2007 6:30 am

See attachment. Supposedly Rev52 works the same for Y and Z up. Sorry if I was rude while pissed off, it's over now ;)

EDIT: Generally speaking, when you are coding, if your testing shows that MtI has lost functionality then IMHO it's better not to commit, or it will hold others devs back.

Peace,

Adam.
Attachments
ZUP_rotationTest.ma.zip
A test scene for rotations (Zup). please test once obj export get fixed.
(960.61 KiB) Downloaded 242 times
obsolete asset

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

Post by CTZn » Fri Nov 02, 2007 7:04 am

On menus, let's give that more sense. Of course the following is only a suggestion:

Edit
Load Settings
Save Settings
Reset Settings (load factory default. Prompt window.)

Tools
objectEditor (where is it ?)
mti_makeInstances;
...

Help

As for tools and icons, I don't see MtI being a tool box for modeling, or that's not going toward simplicity. We should stick with stuff concerning Indigo directly. Thoughts ?
obsolete asset

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

Post by CTZn » Fri Nov 02, 2007 10:08 am

I know I was wrong yelling at one, furthermore now I suspect the error to be because of the name of the mesh I imported. Apologies again If I've been offensive... Anytime if I'm wrong just tell me, I can take it, and I support positive attitudes !

testing rotation code for good... *omg* will report soon again.

=>> Ok I confirm that for REV52, rotations work well only for z up setting and around z axis, nice for trees and such then. Regressed to the old wrong orientation in Y up, my bad.
obsolete asset

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

Post by dougal2 » Fri Nov 02, 2007 12:09 pm

hey adam, looks like you had an exciting evening ;)

I've nothing really further to add at the minute - far too busy doing real work :evil: You're safe to carry on and crack this RM problem :)

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

Post by CTZn » Fri Nov 02, 2007 1:55 pm

Ahh a friendly answer !!! Yep I blew a fuse, nevermind :mrgreen:

Well actually rotation matrices cracked me down... for now you can rotate locators around the up axis safely (Y and Z up), so you should be able to create a nice forest from a few trees. Random scale lacking. A bit of formating for matrices in xml,

REV 53.

I have an algorithm that should do for rm, but I don't know how to define the third angle, I'm not able to implement the algorithm correctly.

What the algorithm should do (Z up):

- rotation around Z axis,
- rotation around X axis then
- secondary rotation around Z axis

The person told me: "that way you can define an arbitrary orientation for the object, and it's much more simple than using actual x, y and z values in rotation matrices." and he left me alone with a sheet of paper and a TI calculator wich I can't feed correctly. The problem is that I still don't know how to get the value for the secondary rotation around Z, it's supposed to be defined by... well I have no clue.

bkircher you didn't answer me on how far you get witm rm... I need help.

Cheers !

PS: I have locally two blank spaces after mti_objsSavDir (objs/ ) value in Attribute Editor, this caused paths errors. Dunno if that's local to my settings or not.
obsolete asset

bkircher
Posts: 115
Joined: Thu Nov 23, 2006 6:24 am

Post by bkircher » Fri Nov 02, 2007 6:10 pm

Hi Adam,

i'll have a look in RM sometimes, when I get mti back to working.
(Currently I've a working Rev. 29 at work, a new Rev at home, and I have to look into the preferences settings things to get that exporting anything)

Concerning your problem with geometry not exporting, sometimes it helps to delete all the construction history.


I'd appreciate some hints as to:
Where should the preferences textfile reside ?
What should be written in there (abs vs. rel paths, / or \ )?
Where do we store all the other prefs, as I use different ?

Finally, we have an mti_Settings node so that we can work with maya-presets. Let's make use of that. Final comment for the time being about editing a txt file or editing a .mel-file.
MentalRay rayrc-file reads like a script also. Moreover, storing prefs in a mel has the benefit of reading/loading the file whereever it is stored. My mti_script is located in a special folder, do you use a similar setup.
'nough said, I'll try to get the .txt file working with your support, and continue complaining later :)

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

Post by dougal2 » Sat Nov 03, 2007 12:26 am

ok, I've an idea about storing prefs... (this may be what you already have in mind bkircher).
Edit: BTW, when I mean "prefs" I don't mean every setting in mti_settings - as that kinda defeats the point of the scriptnode - I'm talking about the _constant_ prefs, pretty much just the indigo path, things that don't change from scene to scene, and are not likely to change frequently.

I can re-jig the code I have to actually generate some MEL. the SavePathsToFile() function will actually _generate_ the LoadPaths() function in a file.

therefore, if we can detect that the LoadPaths() function doesn't actually exist, we can set the defaults and call SavePaths() to generate the LoadPaths() function with the users prefs coded into it.

This might turn out to be a bit more robust than the current approach (ie. no unneccesary string concat/tokenizing).

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

Post by CTZn » Sat Nov 03, 2007 1:36 am

i'll have a look in RM sometimes, when I get mti back to working.
Fine, thanks. What do you mean by "when I get mti back to working" ? REV 53 looks quite fine... pls don't make a REV 54 from REV 29 !

The geometry not exporting was because of the name of the imported obj, or because pasted geometry is grouped. Everything's ok finally.

Personally it's ok to me if the preferences file is beside the scripts; note that I never use the "My Documents" folder but custom ones, and last time Windows was corrupted, all Documents and Settings where destroyed. Simply. Dangerous place.

My idea was a text file with one argument by line to be loaded as a string array; that would be more robust as well than token/concat and accessible for non-coders. But if your version is operational my friends, then I don't care much for now.

Will be off all day, it's up to you. Take care of REV 53 :twisted:

Cheers !

PS: please give feedback on "forest" instancing, bkircher for Z up if I am correct and Doug for Y up. thanks.

EDIT
Will be off all day
Not for now, can not contact the people I was supposed to meet. Listening...
obsolete asset

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

Post by CTZn » Sat Nov 03, 2007 2:08 am

Ok I'm going to meet right now the guy who set the algorithm up, hopefully I'll be set tonight... if I can catch the idea :roll:
obsolete asset

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

Post by CTZn » Sat Nov 03, 2007 6:56 am

Obviously I will be of no more help on rotation matrices. I didn't expose the problem correctly to my friend and so it's model was incorrect. Alas he has no time right now to provide a new model. I can now focus on something different !
obsolete asset

bkircher
Posts: 115
Joined: Thu Nov 23, 2006 6:24 am

Post by bkircher » Sat Nov 03, 2007 11:33 am

CTZn wrote:Obviously I will be of no more help on rotation matrices. I didn't expose the problem correctly to my friend and so it's model was incorrect. Alas he has no time right now to provide a new model. I can now focus on something different !
Me neither. Spent 3h trying all kinds of rotation orders, but that's not making fun. Thank's for trying, CTZn, hopefully, the export-writer forum can tell us something more.

If at some point I continue the wild experimentation, I'd try to figure out the individual components first (you got Z-rotation fixed ?). I had a look into the access to the transformation matrix, but it seems either accissible via the API (thanks, but, no), or the way we worked. Come to think of it, I fear Maya assumes Y-Up, but with a rotation order of XYZ: Does that make for some weird effects?

Are you working with a Z-Up setup (and was the poll inspired by rm)? Anyway, it would be cool if you could put in the z-rotation into the instancing section.

Let's not get frustrated on this...
but RM: :lol: :? :x :evil: :twisted: :twisted: :twisted: :twisted:

Apart from that, I've gotten mti to work for me by taking out all the text-path-references: Thank's Dougal for keeping the structure so straightforward that that's no big hassle.

Dougal, could you please update the blinn-presets, or add at least on commented to them, that would be great.

Post Reply
105 posts

Who is online

Users browsing this forum: No registered users and 32 guests