Page 1 of 2

Hypershade: shading networks

Posted: Wed Dec 26, 2007 7:58 am
by CTZn
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) !

Posted: Wed Dec 26, 2007 8:20 am
by dougal2
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.

Posted: Thu Dec 27, 2007 10:38 am
by dougal2
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

Posted: Thu Dec 27, 2007 11:08 am
by dougal2
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) ?

Posted: Thu Dec 27, 2007 11:15 am
by Kram1032
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 :)

Posted: Thu Dec 27, 2007 11:46 am
by CTZn
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 !

Posted: Thu Dec 27, 2007 12:19 pm
by dougal2
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...

Posted: Thu Dec 27, 2007 4:51 pm
by CTZn
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 !

Posted: Thu Dec 27, 2007 11:56 pm
by dougal2
oh, i see.

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

Posted: Fri Dec 28, 2007 12:59 am
by CTZn
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 !

Posted: Fri Dec 28, 2007 1:25 am
by dougal2
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.

Posted: Fri Dec 28, 2007 1:39 am
by CTZn
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 ;)

Posted: Fri Dec 28, 2007 6:44 am
by CTZn
I'm going offline probably from today and for a few days/weeks, hope to meet you here again later !

Posted: Fri Dec 28, 2007 6:46 am
by dougal2
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 :)

Posted: Wed Dec 17, 2008 10:24 pm
by Hellstorm
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