Hypershade: shading networks

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

Hypershade: shading networks

Post by CTZn » Wed Dec 26, 2007 7:58 am

I'm just posting a link here, an interesting ressource has been released again for shading networks (maya software render), it's on a french forum but all in images:

http://www.mayalounge.com/viewtopic.php?t=304

The images are from a teacher for his students, so in some cases you have to dig into your mind to get the point, but of course I can provide support (if I can keep my connection up) !
obsolete asset

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

Post by dougal2 » Wed Dec 26, 2007 8:20 am

very nice!

I like the orange and cloth in particular.

Do you know if it's possible to render to an image file the output of a shading network? It'd be great to be able to use Maya procedurals in indigo.

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

Post by dougal2 » Thu Dec 27, 2007 10:38 am

FOUND IT!!!

Code: Select all

convertSolidTx -rx 1024 -ry 1024 -bm "extend" -fileFormat "tga" -fileImageName "myTexture.tga" marble1 pSphere1;
procedural export is possible :shock: :shock: :D :D :P :P
Last edited by dougal2 on Thu Dec 27, 2007 11:12 am, edited 1 time in total.

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

Post by dougal2 » Thu Dec 27, 2007 11:08 am

when running this command, Maya seems to auto-create a file node with the baked texture in it!
It's a trivial task then to plumb file.outColor -> shader.color as per normal.

Maya doesn't create .png files, but will create .tga, which are understood OK by indigo.

Perhaps the easiest solution is to create a GUI button to bake the procedural and use the existing file texture exporter to get it into indigo... or should we bake procedurals on export (this could be tricky) ?
Attachments
untitled.xml.png
untitled.xml.png (588.21 KiB) Viewed 7525 times

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu Dec 27, 2007 11:15 am

As I'm not a Maya user, I don't mind, but if I was, I'd prefer the second one :)
Though, there also is the possibility, to do the first in a temporary solution, and add the second later, until it seems to run correctly :)

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

Post by CTZn » Thu Dec 27, 2007 11:46 am

Oh yes I played with that a year ago but had forget about it :) BTW this is the method used to display procedurals in the viewpane !

There is also the command compositeTest X Y;, X and Y being the resolution. This command takes no more arguments I believe, you have to select the swatch and execute. the result will be exactly what the swatch displays, so it's perfect with 2d textures.

I can't get rid of a camera-based artifact when using convertSolidTx, did you find a way to avoid this ? Or we will have to export with the IndigoCamera pane active...
Maya doesn't create .png files
I've just created a bunch of them using convertSolidTx, check your source !

for some reason I missed all answers to this topic until now, sorry !
obsolete asset

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

Post by dougal2 » Thu Dec 27, 2007 12:19 pm

my source:
http://download.autodesk.com/us/maya/do ... lidTx.html

no mention of PNG there.. :? :?

ok, well if it works, then fine :)

I'm unaware of camera-based artifact.. can you explain ?

edit: this is the Maya export...
Attachments
myTexture.png
myTexture.png (1.06 MiB) Viewed 7513 times

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

Post by CTZn » Thu Dec 27, 2007 4:51 pm

My source: the Maya documentation :)
command (MEL) convertSolidTx wrote:-fileFormat(-fil) string

File format to be used for output. IFF is the default if unspecified. Other valid formats are:
  • als: Alias PIX
    cin: Cineon
    eps: EPS
    gif: GIF
    iff: Maya IFF
    jpg: JPEG
    yuv: Quantel
    rla: Wavefront RLA
    sgi: SGI
    si: SoftImage (.pic)
    tga: Targa
    tif: TIFF
    bmp: Windows Bitmap
I'm unaware of camera-based artifact.. can you explain ?
Thanks to your question I checked again and the issue appears to be limited to: marble, brownian and cloud (3d textures). Just display as textured an object having one of these in the color slot, thumble the view a bit and you should see a circling artifact. If you come to refresh the texture again (by moving the 3d placement for instancve) the seam will disapear... to the next border, that is where the facing ratio between object surface and camera is 0 (tangential).

Otherwise it's working well !

edit: I think it's the noise ratio wich is weighted by the facing ratio, in fact I remember now that was already happening in Maya 3.0... still I have no certitude about the origin of the issue. BTW can you reproduce this ? Note that the artifact aspect is defined by the camera orientation, I'm doing another one for comparison.

edit2: lol my demonstration about png is really awesome isn't it ? I juste realised that png was indeed not in the list :mrgreen: But the command works (-fil png), I've checked the image file header, I'm affirmative !
Attachments
myTexture.jpg
Same command, different camera position. Ah oops I played with the texture ratio in between ! Still you can see the prob...
myTexture.jpg (13.98 KiB) Viewed 7492 times
myTexture.jpg
convertSolidTx -rx 512 -ry 256 -bm "extend" -fil jpg -fileImageName"myTexture.jpg" marble1 pSphere1;
myTexture.jpg (25.31 KiB) Viewed 7493 times
obsolete asset

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

Post by dougal2 » Thu Dec 27, 2007 11:56 pm

oh, i see.

but the artifact is tangential to the camera view? so it's visible on the object or not?

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

Post by CTZn » Fri Dec 28, 2007 12:59 am

It's NOT visible if the Indigo camera viewpane was active when exporting, only issue is if you want to avoid this when animating you have to recompute the image for each frame. Also that would be visible in reflections.

I'm wondering if that's not a render optimisation from the old times (lower ratio=faster render) :D

Cheers Doug, nice work on the DB site !
obsolete asset

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

Post by dougal2 » Fri Dec 28, 2007 1:25 am

OK, so perhaps this wouldn't be the best thing to do automatically in the export process... as the user will need to be aware of limitations.

I'll perhaps make a shelf button to bake a selected shader manually.

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

Post by CTZn » Fri Dec 28, 2007 1:39 am

Well I think it's still a nice option to export everything automatically, we just have to warn the users about this issue using some 3d textures... I've underlined the word "option" because maybe in some cases it would be best if it's not automatized. Yes, one more checkbox please ;)
obsolete asset

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

Post by CTZn » Fri Dec 28, 2007 6:44 am

I'm going offline probably from today and for a few days/weeks, hope to meet you here again later !
obsolete asset

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

Post by dougal2 » Fri Dec 28, 2007 6:46 am

sure, have a good time!

hopefully by then at least either one or both of the DB site and changes to MtI will be complete :)

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

Post by Hellstorm » Wed Dec 17, 2008 10:24 pm

Have a look at the command: composite

I guess its even more suitable.
I did not find it in the Maya Documentation, but its pretty simple:

Code: Select all

composite [int width] [int height] [string "filename"] [string format] [string directory] [float startframe] [float endframe] [float byframe] [int padding] [int autoload];
I guess everything is pretty clear: width and height are the texture file dimensions.
Filename is the output filename, format can either be tga, tif, bmp, gif and some outher specific formats (no png however)
Directory is clear I guess.

Startframe, endframe, byframe: This command is able to render a texture sequence for procedural textures, so this sets the images to create.
padding is the number of digits to use for the framenumber part of the filename.
Autoload set to 1 will run fcheck after the command, so set it to 0.

For example to get the texture node "checker1" done at 1024x1024 px:

Code: Select all

select -r checker1 ;
composite 1024 1024 "checkertex" tga images 1 1 1 0 0;
This will output the checker1 node seen at frame 1 as tga file to <project directory>\images\checkertex.1.tga.
If this texture is animated and changes over time, you would run the command like this:

Code: Select all

select -r checker1 ;
composite 1024 1024 "checkertex" tga images 1 99 1 2 0;
Therefore the images will be named checkertex.01.tga to checkertex.99.tga

Post Reply
20 posts

Who is online

Users browsing this forum: No registered users and 1 guest