Jump to content

Converting Shop_vm_surface To Vm_surface


davedjohnson

Recommended Posts

Does anyone have a script or other bit of hackery to convert shop_vm_surface to vm_surface?

Here's my situation: I got a .geo file and a .hip file that has all the right shaders in it and everything renders fine, but I would like to use the "Render from file" option on the object instead of a file SOP. It works much faster in my render farm to do that. The problem is that if I use "Render from file", there aren't any parameters in the Mantra ROP to make it see the shaders correctly. So I did a test and if the .geo is using the vm_surface attribute instead of shop_vm_surface, it renders fine.

I can't go back to the .hip file that created the .geo in the first place and change the switch in the Shader SOP, though that would work.

Any ideas?

Link to comment
Share on other sites

It doesn't sound like you're using instances where you might want a different shader setting per instance (and so be forced to use your own per-point vm_surface attribute). If this is the case, then you *should* be able to just use a shop reference (shop_vm_surface). There's an important detail for this to work though: you have to make sure that all shops are declared in the IFD:

MantraROP > Specific > Shop References = "Declare all SHOPs"

Otherwise it won't get resolved. If you're submitting to a farm and using hscript, then you would:

opparm /out/MyMantraROP ray_shop ( all )

HTH.

Link to comment
Share on other sites

Well, it must have been due to the fact that I was trying this at 1:00am, but the Declare All SHOPs seems to work just fine.

Of course, I did write myself a little script that changes shop_vm_surface into vm_surface.

I didn't make it completely useable, in that you have to go into the script and edit /obj/geo1/shopnet1 to the name of whatever path to your shopnet is. But other than that, it seems to work pretty well.

Dave

ind2d.txt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...