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

Post by CTZn » Wed Dec 17, 2008 11:51 pm

Effectively there is more than one procedure to export textures, but all rely on the convertSolidTx command, if they don't just wrap it. The difference is wether a virtual plane or actual UV space are used as option, we'll get more flexibility to use that command directly depending on if the texture to compute is 2d or 3d, or if it doesn't need to rely on UVs (plain synth image).

Now I retain this option of exporting all texture frames in a row, there is work to do on optimizing animation export code (notably avoid exporting still objects for each frames :?).

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

Post by CTZn » Thu Dec 18, 2008 2:25 am

With no doubt MtI will be using the surfaceSampler command*, it provides superior output than convertSolidTx. One of the most obvious case hereafter. This shows as I was suspecting that for some procedural 3d textures there was a hack with decreasing ratio for speed concerns, or let's call that a bug. This is history now.

The best thing is that surfaceSampler leaves the shading network inaltered, there will be no need to load the baked textures in Maya since they will be created at export only. This is totally transparent for the user.

* wrong. See 2 posts below.
Attachments
marble1-pSphere1.jpg
convertSolidTx
marble1-pSphere1.jpg (57.27 KiB) Viewed 1872 times
sampledDiffuseColor.jpg
surfaceSampler
sampledDiffuseColor.jpg (67.8 KiB) Viewed 1873 times
Last edited by CTZn on Fri Dec 19, 2008 8:32 am, edited 1 time in total.

Sinister
Posts: 29
Joined: Mon Apr 14, 2008 3:35 am
Location: Ukraine / Kiev
Contact:

Post by Sinister » Thu Dec 18, 2008 4:36 am

So, when will be magical button on gui? :D

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

Post by CTZn » Thu Dec 18, 2008 8:05 am

Not tomorrow, Sinister :D

This command is already available through Lighting / Shading > Transfer maps. Using the UI you are forced to declare both a source and target geometries, but once done it delivers the command:

Code: Select all

surfaceSampler -target pCubeShape1 -uvSet map1 -searchOffset 0 -maxSearchDistance 0 -searchCage "" -source pSphereShape1 -mapOutput diffuseRGB -mapWidth 1024 -mapHeight 1024 -max 1 -mapSpace tangent -mapMaterials 0 -shadows 1 -filename "C:/work/3d/Indigo/textures/sampledDiffuseColor" -fileFormat "png" -superSampling 1 -filterType 0 -filterSize 3 -overscan 1 -searchMethod 0 -useGeometryNormals 1 -ignoreMirroredFaces 0 -flipU 0 -flipV 0
The trick is to declare the same mesh as source and target, then the procedural network is simply baked at the specified place. I was amazed on how well the borders stitch, I could simply not tell where were the pole of a sphere mapped like so (if you set the option mapMaterials 1 then the texture will be attached to a new shader).

Now to answer you precisely Sinister, I can honestly not tell you when, but soon, certainly :)

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

Post by CTZn » Fri Dec 19, 2008 8:41 am

Now the sad part with surfaceSampler is that it will work for albedo and displacement only. convertSolidTx will be used then for other shaded material parameters, but at a higher dev cost than expected (materials are exported in a standalone fashion, information on the surfaces they are applied to is not retained at this point).

So... not that soon I fear :?

Post Reply
20 posts

Who is online

Users browsing this forum: No registered users and 1 guest