How to use PTex in Maya 2013


#1

Hi Guys,

Since AD hasn’t integrated this process, I thought I would give you all a heads up on how to use PTex textures in Maya 2013:

Set PTex registry value for mental ray for Maya:

Create/edit file maya.rayrc in the user Maya directory 2013/prefs/ (or 2013-x64/prefs/ or /Maya2013/mentalray/) and add the new registry setting below.

[b]Example (Maya2013 64bit on Windows Vista/7):[/b]
Edit the file:
C:\Program Files\Autodesk\Maya2013-x64\prefs\maya.rayrc

add the following line:
registry "{_MI_REG_CCMESH_PTEX}" value "on" end registry


[b]Using PTex textures in Maya:[/b]

[ol]
[li] Create a regular polygon mesh[/li][li] Assign a mental ray subdivision approximation[/li][li] Assign any material shader[/li][li] Create and assign a new node to a texturable color slot using mib_ptex_lookup[/li][li] Write the full file path to the .ptx file (relative paths won’t work)[/li][li] Render[/li][/ol]


#2

Thanks Corey, been poking a stick at this today without success, so very much appreciated.

btw when do you think there will be an update for mental core around this, (no pressure ha ha :))


#3

No worries - working on that now, can’t give you a date, but aiming to release 2013 support as a update with a bunch of new features too.


#4

…sweet.


#5

:thumbsup:

Good work Corey (as usual!).


#6

What do you think guys, for those who need to stick to Maya 2012 do you think its possible to extract the ptex capabilities of maya 2013 and somehow make it work for 2012??


#7

seems impossible since you would need the latest version of mental ray for it, and it’s only available for maya 2013…unless maybe it works with the standalone version.

cheers


#8

in this way dont work


#9

seems impossible since you would need the latest version of mental ray for it, and it’s only available for maya 2013…unless maybe it works with the standalone version.

mental ray has been able to render Ptex for some time and the Ptex for Maya is a separate library so it may be possible, the problem will be that Mayatomr, the plug-in, may not work well for that in anything before 2013.


#10

This might be a dumb question, but havent worked with ptex before. I work in mudbox and Im used to tiling textures so I can get more resolution within the maximum texture size in mudbox and its more efficient. Ptex looks like it uses just a single file, can they be tiled, and would you need to?


#11

For ptex, each polygon face can have its own resolution. So there’s no need to think about tiling anymore.


#12

thanks for this very helpful guide:)


#13

some info on ptex…
http://www.youtube.com/watch?v=YNgy2CYEvfI


#14

Thanks to Coreys excellent instructions rendered out a scene from mudbox with ptex textures with MR in Maya 2013. I can see why it was mentioned the implementation in maya was a bit clunky. The mudbox implementation is super smooth and effortless, while in maya I spent a lot of time hooking up ptex lookup files (non reference path names) just with the small number of objects ~25 I had in the scene, plus add gamma correction nodes. Also as noted above the swatches are black and I couldnt get any viewport textures showing after hooking up the mib ptex lookup. But still… goodbye UVs for a lot of stuff except where a map is useful. Hope they make a way to browse to files sometime. Or some one writes a useful script :slight_smile:


#15

How can I use ptex as a bump channel? Maya wants to convert the file to an alpha and the bump channel only has a single input. Should I run it through a rgb -> Luminescence node first?


#16

mental images goes into detail about how this is done here: http://forum.mentalimages.com/showthread.php?9506-bump-maps-with-mib_ptex_lookup-in-maya-2013

 hth, 
 ron
[b][font=Courier New]
 [/font][/b]

#17

I can get color, but vdm crashes, and I can’t get the bump channels to connect at all.


#18

Create/edit file maya.rayrc in the user Maya directory 2013/prefs/ (or 2013-x64/prefs/ or /Maya2013/mentalray/) and add the new registry setting below.

    [b]Example (Maya2013 64bit on Windows Vista/7):[/b]
    Edit the file:
    C:\Program Files\Autodesk\Maya2013-x64\prefs\maya.rayrc
    
    add the following line:
    registry "{_MI_REG_CCMESH_PTEX}" value "on" end registry
    
 
    [b]Using PTex textures in Maya:[/b]

[ol]
[li] Create a regular polygon mesh[/li]> [li] Assign a mental ray subdivision approximation[/li]> [li] Assign any material shader[/li]> [li] Create and assign a new node to a texturable color slot using mib_ptex_lookup[/li]> [li] Write the full file path to the .ptx file (relative paths won’t work)[/li]> [li] Render[/li]> [/ol]

Despite having done all that, I still get nothing when I render. I’ve used the default tree stump model in Mudbox at low rez level. Exported it as an OBJ with a .ptex file (bark texture) to go with it. Opened the OBJ in Maya and did steps 1 thru 6 and I get nothing. I’ve put the files on my desktop and copy pasted the full path of the ptex file into the mib_ptex_lookup node which is plugged into the color of an mia_material_x node. I don’t get error messages, so it must be kinda working. I’m just not seeing anything when I render. Is there an extra node that needs to be placed between the ptex lookup and color? Thanks guys.


#19

I had to change the \ to / in the file path names. also the rayrc file must be edited as indicated if you didnt do that


#20

i did all steps exactly, still the head renders “black”, nothing shows up in render
i tried reexporting the ptex textures but with no results, any ideas ?!