Assign octane materials based on OBJ groups?

A public forum for discussing and asking questions about the demo version of Octane Render.
Forum rules
For new users: this forum is moderated. Your first post will appear only after it has been reviewed by a moderator, so it will not show up immediately.
This is necessary to avoid this forum being flooded by spam.
Post Reply
mpavlovich
Licensed Customer
Posts: 2
Joined: Tue Dec 03, 2013 12:21 am

First I want to say Octane is amazing and I can't wait to get deeper into this program! Right now I'm just having one stumbling block...not a deal breaker, but something that would help my workflow out drastically. I've done a number of forum searches and found the question being asked, but haven't found a concrete answer (if I missed it I apologize).

What I like to do (since I do a lot of my high res source art in ZBrush) is to utilize obj groups rather than materials to dictate how my mesh should be broken up within my rendering program. I'm not sure of a way to assign materials to polygroups in ZBrush, and the alternative would be taking my 4 million poly mesh into maya, selecting the faces assigned to the polygroups, and assigning a material. Which wouldn't be a big deal but a 4 million polygon mesh in maya isn't the friendliest thing to deal with.

Other render solutions have a few import options that allow the usage of obj groups rather than material assignments; you can discard groups entirely if you want, or you can choose to group by objects rather than materials. Since I can't seem to get material assignments out of ZBrush, this would be an ideal way to break up my source and assign materials that way.

Like I said, not a deal breaker really, and there might even be a script or plug-in that will do that conversion out there. Or Octane may do it I just don't know how.

Image
User avatar
roeland
OctaneRender Team
Posts: 1826
Joined: Wed Mar 09, 2011 10:09 pm

Octane always uses the materials in the OBJ files, so there is no real solution using only Octane.

Upcoming versions will support scripting, and they will allow loading these objects from OBJ files, so with the next version you will be able to solve this problem using Octane itself, but for now you will have to edit the OBJ file with some other program.

--
Roeland
mpavlovich
Licensed Customer
Posts: 2
Joined: Tue Dec 03, 2013 12:21 am

Thanks for the reply! Editing the .obj and .mtl file manually to get what I wanted wasn't difficult, and I'm sure somebody smarter than me could easily write a script that would do it.

Basically (just in case someone out there needs to do the same thing) I just had to edit the .obj file as a text document and point it to a specific material file (mtllib), and add a "usemtl" to each group that pointed to a "newmtl" in the specified .mtl file.

It's easier than I made it sound, in case somebody is reading this wondering what I'm talking about. You just need at the top of your .obj file (for example):

mtllib ZBrushPolygroup.mtl

then for each group, point it to a material within that file (for example):

g Group38568
usemtl blinn1SG

then in your .mat file, for each group usemtl, you need a (for example):

newmtl blinn1SG

Easy enough workaround, even manually, and like I said probably a super easy script to make. Success!!

Image
Post Reply

Return to “Demo Version Questions & Discussion”