ZBrushCentral

Feature Request - dynamic subdivision

I have a feeling that this is a bit “out there” but I’ll throw the idea out anyway.

What I would like to see is a mode in zbrush that works with the normal transform tools that would automatically subdivide the mesh locally if you tried to add a detail that the current mesh structure couldn’s support, zbrush would subdivide the mesh under the stroke to get a better representation of what you want.

I think this would make low poly sculpting easier. At least for the user. :wink:

As an example, look at the two stroks below. The first one is how it works to day, and the bottom stroke is sort of what I’m suggesting. Use case here is I flip a switch and paint the stroke, zbrush can some how notice that my brush size to polygon size is whacked, and it would subidived under the stroke as I go.

What do you think?

[example.jpg](javascript:zb_insimg(‘11924’,‘example.jpg’,1,0))

hmm local sub d tool intresting thought ,i should imagin there would be a lot of issues to sort out to make this tool reality (though this forum does have some great scripters) id love to see someone take this challenge up it would be invaluable if it was possible (possible as in well made possible :slight_smile: )

One thing that might make it easier would be to make the local sub-d toggle switch automatically do the subdivision when it’s on before displacing the vertices. So rather than trying to dectect when to do it it’s just on, and it does the subd on a given polygon once and only once per stroke. So when you put the “pen” down it starts subdividing, but if you go back and forth over the same polygons they wouldn’t be further subdivided.

So something like this…
turn mode on
put “pen” down
move pen over “clean” polygon, subdivide it (and maybe neighbors) -> those polygons become “dirty”
displace the vertices
move the pen over “dirty” polygon, don’t subdivide again, but just displace the vertices

you can sort of do that with masking but i do like the
idea of clicking a button and perhaps with masking so you could see the area you mean to subd itself…you draw that area with instant results…like the smoothing brush…on steroids…actually a very cool idea the more I think about it and how many times I actually wish for such a thing on some subconcious level.

oh ya got me adding to my own wish list now…:rolleyes:

I would love to see this…I requested this same feature several months ago :slight_smile:

Hi stuh505, I poked around a bit after posting the thread (the similar threads links that appeared at the bottom) and I found a couple of others asking for the same thing.

Animnuts, I know what you mean about mask/invert/divide. It works o.k. It’s a lot more work though, at least for me – a newb sort of user. I think the auto-divide toggle switch would be much smoother and faster.

This is a simple version of what you’re after. It’s got no ‘smart detect’ and will keep on subdividing if you go over strokes. But it’s quite fun and as it might be useful, I’m posting it.

Disclaimer: this is a beta. I’ve not tested it thoroughly and there are certain to be issues. I might develop it further in due course so let me know what you think. My own view is that there are limits to its usefulness but I suppose that it depends on how you model.

It installs a SubDStroke plugin button in a MarcusTools submenu in the Zplugin menu. You can Ctrl+drag the button to your interface for easy access.

Press the button when you have a polymesh in Edit mode and it will subdivide the last stroke you made. You must press the button immediately after the stroke. As with any partial subdivision, if there is a subdivision history it will only work when your polymesh is at the lowest level. Pressing Ctrl and making a stroke will subdivide the masked area.

NOTE: masking is used to partially subdivide a portion of mesh. So as to only subdivide the stroke any existing mask is cleared when the plugin button is pressed. At the moment there’s no warning message about this!

To install:
Unzip the zip file to your ZStartup\ZPlugs folder (…\ZBrush2\ZStartUp\ZPlugs)
The zip contains:

SubDStroke.zsc (the plugin file)
SubD_data folder (the plugin data folder)

Both file and folder are needed for the plugin to work.

grab.jpg

Cool, I will have to give that a shot!

Just to mention that I’ve noticed that the plugin doesn’t work when holding down the Alt key for switching modes (as say from Zadd to Zsub). I’ll correct this when I’ve a moment. It works fine if you use the interface buttons.

Cool! This’ll come in handy!

Thanks Marcus!

I like this.:+1:
I hope you decide to develop this further

Here is one issue i ran into:
The SubD stroke kinda selectivly determines what to divide.

The Mask divide worked well sometimes.

Attachments

ZGrab01.jpg

Thanks for your reply and the feedback. Yes, there are a number of issues that would need addressing. Basically the script captures the stroke and replays it first as a mask which it uses to subdivide the area, then replays the edit stroke. So the result your getting may be because of the focal shift/edit curve you’re using as the script doesn’t alter those settings (obviously it would need to in a finished script).

I may develop this at a later date, but I’ve not received any feedback other than what you see in this thread so I shan’t be making it high priority.

SubDStroke plugin

I’ve developed this into a rather more useful plugin, posted in the thread linked above.

Having thought about the original request, there’s not really any reason why such a thing shouldn’t be coded (using mesh density under the stroke, stroke width, depth etc.) but it’s not currently possible using zscripts alone. But even if you were to code it I think that sooner or later you’d run into problems of esthetics and what sort of result is intended by the user.