Jump to content
3DCoat Forums
  • 1

Stencils - set and restore stencil size


cread
 Share

Question

  • Member

Is there a way to set and restore the stencil bounds without manual scaling?  Ideally in world space instead of screen space?  Otherwise, you must resize the stencil every time the smart material is closed and reopened even if the lock button is enabled.  (The lock button only keeps the stencil in sync when the material is open.  If you close the material, say to paint, then the stencil size is off when you reopen the material if the camera has been moved.)

It isn't clear to me how to use this feature if you're concerned about texel density.  I'm constantly having to unlock, scale the stencil against some known entity, and then lock while the material is open.

One or more of the following would make this workflow so much easier:

- Is the stencil window size available to be set by the c++ or python API?  I'm happy to write a script / plugin to set / restore but don't see a way to do this with the API.

- Have a UI/dialog or a load/save stencil xml/json like the camera.

- If the lock worked across material open/close then we would only have to size the stencil once per session instead of every time I close the smart material.

Thanks so much,

Cread

  • Like 1
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  • Member

here's what i wound up doing.  love any feedback if there is a better way.

- create a plane that is 1-1 with the texel density of the texture.  (ex. a 10x10 plane matches my texture in world space)

- save a camera position in front of the plane (via save camera or a camera shortcut)

- to open a smart material:

  1.     move the camera to the default position via the camera shortcut or save
  2.     open the smart material (in "From Camera" mode)
  3.     scale the stencil texture to match the plane 1-1.
  4.     ensure the lock button is enabled
  5.     use the smart material to project

- to close the smart material:

  1. return the camera to the default position via the camera shortcut or save
  2. unlock the stencil
  3. close the material
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
Answer this question...

×   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.

 Share

×
×
  • Create New...