MtI rev 32 29 oct 2007

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 » Sat Nov 03, 2007 12:15 pm

Yep, rotations around up axis fixed, both for Zup and Yup setting (r53).
I debugged in a Z up scheme, but as you know it suffice to multiply a Z up matrix by <<1 0 0 0 0 -1 0 1 0>> to get a Y up matrix, so my implementation works the same in both cases.

Maya can assumes any order of rotation I believe, but indeed default is xyz. As for up axis it assumes what you set in Preferences. And yes, I've been told that matrices are not commutatives when multiplyed.

I see two more options interesting to implement with instances: random value for rotation (around up axis, of course), and an extra attribute to mesh transform to set reference object invisible. You don't necessary want to see the original lying in the center of your scene.

bkircher, you have added quite a lot of features to MtI, but you haven't documented them much. Still wondering what "useExactName" is for (and that's the third time I'm asking, I think), that's annoying when coding with instancing locators... I found no obvious reason justifying that attribute... no disponibility for testing unknown features when coding... thanks.
Anyway, it would be cool if you could put in the z-rotation into the instancing section.
What do you mean ? An up axis randomness switch in main window ? Well not sure it's a good idea to generalize that feature to the whole scene. At this stage of the dev yes, maybe. Preferably locators with a rotation value in a non-up axis will be randomized. For that mean I'll deactivate the non-working part of the code. And as for GUI I have everything to learn, til now I only copied/pasted code chunks; pure mimetism. I have tried to add an icon (it is in the icon folder, called something_temp.bmp) to Main but I couldn't, messed up all.
obsolete asset

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:55 pm

bkircher wrote:Dougal, could you please update the blinn-presets, or add at least on commented to them, that would be great.
In principal I've no problem with doing this, however I would first need to know how to actually use the presets.
I've only been using Maya for about 3 or 4 weeks - can you provide a little documentation on how the presets work?
Then I can test and update as necessary.

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

Post by CTZn » Sat Nov 03, 2007 1:52 pm

You call presets from the Attribute Editor, in the upper right corner ! Anytime you can save AE settings to a preset.
obsolete asset

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

Post by bkircher » Sat Nov 03, 2007 9:49 pm

sorry CTZn for the confusion, I was tired yesterday...
-> You already put in Z-Rotation, so the point is moot, except that we should treat both (with "useExactName" on and off) cases similar:

If you check the .mel-script, you will see that there are two options for exporting via locators, depending on the "useExactName" switch.

The reason for that is if the switch set to false, every transform is checked if it "beginsWith" the string stated in the string field, like checking for "String*" (were the * can be empty).

I feared that could be slower in certain situations with a huge number of transforms and locators (I was dreaming of huge fields full of crops with millions of instances and raindrops on top :lol: ), and prone to errors in some: Imagine you have an object-shape called "Seat_1", you call it with
the "useExactName" switch set to false: A "Seat_10" would be also exported.

Setting "useExactName" to true ("1", "on", whatever) will take the string and directly write it into the .igi, without checking the scene, as far as i recall.

Sorry for the eliptic documentation, when I started on the simple version, I didn't think someone (thanks dougal) would revive this forum so vigourously.

Dougal, to check for yourself, create a PhongE-shader and open it with the AttributeEditor: As CTZn said, in the corner there is a preset button. Select a preset and the values will be inserted. Best thing is that the comment is stored with the presets, so we can explain the code and the translation formula directly in the shaders. Check the PhongE thing anyways, I like the brutish elegance of piping the comment directly into Indigo :)

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

Post by CTZn » Sun Nov 04, 2007 1:01 am

Thanks for the explanation bkircher; I should have guessed that by myself but really I couldn't, due to my skills it is costly to decipher simple code sometimes, that can be very time-consuming and demotivating for me.

That said I'm happy I finally found an occasion to put my head into coding, my first try was almost 15 years ago: I copied down a page of basic and was expecting a full shoot-them-up out of that :lol: Alas it was only a little code chunk, and I was lacking all the ressources (sprites sounds etc). Never tried really since then.

I'm myself very prone to explain things as well as I can, but I do not so all the time, so I understand you. Nevertheless I think it's worth a report here when we add a new feature, if documentation was not updated (and I'm myself refering more often to that very thread than the doc itself).

So if I understand right, I have to treat locators with useExactName the same than the others; I'll update that today or tomorrow.

Cheers all !

PS: Dougal did you find the Presets in AE ?
obsolete asset

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

Post by dougal2 » Sun Nov 04, 2007 4:31 am

well, I was going to have a look here at home but it appears that something's gone a bit wrong.
Maya is complaining about broken video drivers, and reinstalling them made no difference - even though the drivers appear to be ok and other 3d stuff (games) all work fine. :?

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

Post by CTZn » Sun Nov 04, 2007 4:57 am

Dunno what you messed up with... try deleting/moving the preferences folders... Deactivate all acceleration and see. Maya should run without graphic acceleration anyway.
obsolete asset

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

Post by dougal2 » Mon Nov 05, 2007 12:49 am

I've managed to find and install a newer display driver (forceware 169.04), and the systemm seems happy again.
I'm having a look now at updating the blinn/SSS presets.

i notice there are some file locks from 2 - 3 days ago... are you still working on these files?

edit: no, the locks are bkircher doing some work right now :)
please announce when you're done and i'll merge my changes afterwards.

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

Post by bkircher » Mon Nov 05, 2007 1:34 am

Just briefly:

Ever wondered why the mti-DoF-Effect was so minute?
Ever wondered why Sun and emitters seemed not to work well together?
Ever wondered why the FocusDistance in a medium sized scene was 700m?

I fear we need to scale every object in the world, except some camera parameters, by 0.01 to work with centimeters.

I tried unsuccessfully for some hours, but my code-basis is somewhat mixed currently (see below, my camera is looking into the scene from a wrong position).

What I propose to do:
Put a

Code: Select all

float $mtiGSF = 1; //Global Scaling Factor, e.g. 0.01 for cm as model unit
somewhere into the beginning of mti_gen.mel, then use this to scale every object in the scene accordingly.

Pass it along to mti_ExportModuleCamera.mel" by adding "$mtiGSF" as last parameter passed to that script and reading it in as: "float $mtiGSF_forCam".

What I found out so far:
Apparently,

Code: Select all

 float $mFocalLength = (`getAttr cameraShape1.focalLength`) / (1000 * $mtiGSF_forCam);
has to be changed in the camera statements, otherwise very strange things happen.
My camera shoots over the scene for some strange reason, until I know what happens here, I won't commit anything, and I'm lost currently.

So please have a look into this, this seems a critical issue.

For work, I think I'll just multiply the PowerDrawn for mesh emitters by 10000 and see what happens.

For testing, I'd start with a moderate value (0.5) and compare that to a default rendering.

Finally, once we've fixed this, let's finish Rotation Matrixes (z(y) only, for the time being), and let's make a stable version, and continue with a developer version...

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

Post by dougal2 » Mon Nov 05, 2007 1:43 am

oh.

is this related to the fact that the cameras don't match up either ?
(doing a render of the Blinn presets)
Image
on second look, it's probably to do with the aspect ratio being wrong?
shouldn't MtI set this up for the user?

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

Post by CTZn » Mon Nov 05, 2007 2:49 am

As far as camera stability goes, I think it is safe to let mtiGen convert a single node camera to a three nodes one at export time based on a prefix (or a selection rollout like in Render Globals), then reverting to a single node one when export is done. I often had issues when I was navigating in the scene with a 3 nodes cam, the up vector would not match anymore, totally mesed up.

As for scale, I'm now used to model at 1cm = 1m, and I'll use that way until a solid workaround is found... C4D exporter uses that scale hack, seems to work tho...

Did I mess something up in my last modifications ?
obsolete asset

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

Post by bkircher » Mon Nov 05, 2007 5:26 am

As for scale, I'm now used to model at 1cm = 1m, and I'll use that way until a solid workaround is found... C4D exporter uses that scale hack, seems to work tho...
ts ts ts, aren't you always carrying the flag of unbiased physical reality? :wink:

honestly, we should fix this as we will work with pretty absurd values of e.g. surface-thickness of subsurface scattering and transparent materials,
get really low light-emission because the area lit is by 10000 times the size in cm, ...

As a hotfix, we can make a

Code: Select all

float $mtiWeAreIndeedLazy = 100;
variable and scale by it certain properties.

But what do we do with F-Stop / DoF ?

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

Post by dougal2 » Mon Nov 05, 2007 6:11 am

a small list of things I noticed whist playing around this afternoon, in no particular order:

1. check sun? didn't work first time i tried it. also, the manipulator handle doesn't work when you first create it.

2. change default reinhard settings. pre 2, post 1, burn 6.5.

3. typo turbitiy => turbidity

(DONE ** update blinn presets.)

4. change b-body temp minimum to 500

5. are OBACHT messages neccesary?

6. camera gets seriously confused if units != cm

7. some minor code style points:
rename indcamera() to mti_IndigoCamera()
rename SmoothShading_Proc() to something mti_ related
some code formatting in mti_Main.mel

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

Post by dougal2 » Mon Nov 05, 2007 6:26 am

ok, i went ahead and fixed the really simple things:
- changed default reinhard settings. pre 2, post 1, burn 6.5.

- typo turbitiy => turbidity

- change b-body temp minimum to 500.
(actually, the coding error here was that the error message was ALWAYS printed, regardless of whether the temp was >= 1 or not).

-some minor code style points:
rename indcamera() to mti_IndigoCamera()
rename SmoothShading_Proc() to mti_SmoothShading_Proc()
some code formatting in mti_Main.mel

- fixed the translate tool when creating a sun

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

Post by CTZn » Mon Nov 05, 2007 9:10 am

@Dougal:

1. I never had these issues (your status on that bkircher ?), but I agree I may not have choosed the best command to call the move tool. But really it always worked as expected here, first call included.

2. and what makes you believe I will use these settings ? :P I think that with such a high burn setting you are loosing a lot of dynamic in your image. Personally for testing purposes I always use 6 < (prescale = burn) < 10, post around 1.125. Would you use these ? :twisted:

3, 4, 5. Fine, good question. Regarding turbidity, it's default value is incorrect, should be 2 obviously instead of 0.01.

6. Definitly. That's a general Maya flaw.

7. Well done.

@bkircher: well, as long as you treat 1 Maya cm = 1 Indigo meter, values stay the sames. I'm not sure but I think default settings are ok for camera if you respect that proportion. I can not answer your questions on optics...

@all: I yell more than I code, nevermind. I'm oscillating between the non-coder/baby coder states permanently... bad mood these last days.
obsolete asset

Post Reply
105 posts

Who is online

Users browsing this forum: No registered users and 2 guests