PDA

View Full Version : How toggle ON SubPatch from an object sequence?



Roque
02-27-2017, 01:52 PM
Hi I am looking for a layout script or samething like that to toggle ON the SubPatch of each object from a sequence.
I can do for one objetct from sequence, by hand with the "toggle subpatch" in the Modeler Tools tab, but when scrub this option lost.

Please anyone can help me?

Thanks,
Roque

Ryan Roye
02-27-2017, 02:48 PM
This happens because the object sequencer loads the data as you scrub keyframes. If the file does not contain any information related to subpatched polygons, it will by default not subpatch any. When you use the "toggle subpatch" option in Layout, this is only a temporary change until you actually save the objects themselves (not the scene file).

This means that in order to have an entire object sequence to apply subpatching, currently the only native way is to load every mesh frame into your scene file, select all the meshes, toggle subpatch, and save all objects.

This also means the files must be .LWO for this to work. I'm not sure if any plugins exist that could streamline the operation of applying subpatching to every file (frame).

Sensei
02-28-2017, 12:45 AM
Hi I am looking for a layout script or samething like that to toggle ON the SubPatch of each object from a sequence.
I can do for one objetct from sequence, by hand with the "toggle subpatch" in the Modeler Tools tab, but when scrub this option lost.

Please anyone can help me?


TrueArt's Modeling Pack
http://modelingpack.trueart.eu
has couple tools which can help you convert your entire object sequence to sub-patched.

You should load the all objects to Modeler. Or if there is really hundred/thousands of them in couple parts.
Then use Layers > Collapse Obj (Collapse: All Loaded, Collapse to: Multilayer).
Then you have the all objects as layers, right?
Select the all layers. And press tab to enable sub-patching.
Then use TrueArt's Modeling Pack tool "Save Layers To Folder"
https://www.youtube.com/watch?v=Z6cIk5VhZIM
(it's using layer name as new file name of .lwo)

I just made 3 objects "obj 1.lwo", "obj 2.lwo", "obj 3.lwo".
Loaded them all to Modeler. Collapsed them. Mass modified single object.
Then used Save Layers To Folder.
And it worked as expected.

Roque
02-28-2017, 05:16 AM
Hi Ryan and Sensei, thank you for your suggestions.
I'm going to try which is more "comfortable", but this job is about realflow simulations of hundreds of frames, with almost daily adjustments by the client. I'm thinking that loading all meshes and subdivided, will be heavy in both, the layout or in the modeler.
I guess with a LScript or with Python, applying a "command" of the layout to an object every time you move a frame should be very simple, unfortunately I do not know how to program in these and how much documentation there is about it.
It occurs to me as an idea, that with some very simple templates and a space for you to enter what you want to do, you could access the scripting tool that would help solve many of these things.
Another possibility would be to have a node that does the Sub Patch, since the scrub in the sequence of objects maintains the displacement applied.

Sensei
02-28-2017, 06:09 AM
It must be done in Modeler. And write new object sequence.

I won't bother you about technical description why..
I guess so you would like to use LWSN or F10 sequence rendering?
LWSN can't execute any commands from Layout Masters.



Another possibility would be to have a node that does the Sub Patch, since the scrub in the sequence of objects maintains the displacement applied.

LW <= 2015.3 does not have nodes that manipulate meshes the way like you're describing..

Roque
02-28-2017, 12:13 PM
It must be done in Modeler. And write new object sequence.

I won't bother you about technical description why..
I guess so you would like to use LWSN or F10 sequence rendering?
LWSN can't execute any commands from Layout Masters.



LW <= 2015.3 does not have nodes that manipulate meshes the way like you're describing..

Hi Sensei, thank for your answer.
I found this thread http://forums.newtek.com/showthread.php?108242-subdividing-each-RealFlow-object&highlight=subpatch+sequence

In these they talk about 2 posible solutions, but any work for me, I think these was for previous versions of lw (I'm with 2015) or maybe I'm doing something wrong.
But from what I understand, the plugin from Blochi would do exactly what I propose: http://www.blochi.com/gfx/subpatcher_en.html

To many centuries ago a was a programmer, I code low level OS in assembler, however now I feel obsolte :(
But I'm dying to see how to program this, I feel it could be simple knowing the syntax and instructions, be it LScript or Python... there are any guide to introduce in this from Newtek?

Thanks,
Roque

Sensei
02-28-2017, 02:11 PM
To many centuries ago a was a programmer, I code low level OS in assembler, however now I feel obsolte :(

Do you prefer Motorola 6502/6510 or Motorola PPC, or Intel or something else.. ? ;)

LDA #123
STA (abc),X
;)

- - - Updated - - -



But I'm dying to see how to program this, I feel it could be simple knowing the syntax and instructions, be it LScript or Python... there are any guide to introduce in this from Newtek?


If it would be so easy, you would get answer straight forward away..

Roque
03-01-2017, 04:34 AM
Do you prefer Motorola 6502/6510 or Motorola PPC, or Intel or something else.. ? ;)

LDA #123
STA (abc),X
;)

- - - Updated - - -



If it would be so easy, you would get answer straight forward away..

Hehehe, I was from Z80, then Intel 8086, 80286 ... and then more from "electronic side" I worked and developed SO for microcontrolers :P

I think that the problem is the access to the tools, because knowing something about syntax and a "couple" of commands, would not be a problem to make one script that applied in one object and on each change of frame run SubPatch command...