Vertex Color Tools
Re: Vertex Color Tools
The Vertex Color Animation process has 42 Undo entries in the Command History.
Most of which could be Undone!
Looks like a good candidate for RsApp.ClearHistory() at the end of the process.
What do you think?
The Morph Animation process has a ton more!
Most of which could be Undone!
Looks like a good candidate for RsApp.ClearHistory() at the end of the process.
What do you think?
The Morph Animation process has a ton more!
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
Changes based on your stuff.
the sample didn't have my latest changes so internally still based on my nodes
not open tool as floating panel
using your separate panels, renamed "Vertex" tab to "Color"
added your export image checkbox
didn't export the VTA connector and continue to export the panel - because of the convenience of the Activate All VTMs button
changed conn name to vOffsetOut, without an underscore
no help button on vta - the wording needs work
no clear history
added checks that the end time is not zero
changed input fields to update on change behavior
morph uses fewer undos and nothing that is undone puts tS in an unstable state so no clear history is needed
vertex colors fewer undos - also removed the bitmap connectors from the script node, but might put them back since it may be possible to remove 2 more undos via a plugin copy command
if testing shows tS is unstable or crashing because of undos then the clear history would be a good idea.
the sample didn't have my latest changes so internally still based on my nodes
not open tool as floating panel
using your separate panels, renamed "Vertex" tab to "Color"
added your export image checkbox
didn't export the VTA connector and continue to export the panel - because of the convenience of the Activate All VTMs button
changed conn name to vOffsetOut, without an underscore
no help button on vta - the wording needs work
no clear history
added checks that the end time is not zero
changed input fields to update on change behavior
morph uses fewer undos and nothing that is undone puts tS in an unstable state so no clear history is needed
vertex colors fewer undos - also removed the bitmap connectors from the script node, but might put them back since it may be possible to remove 2 more undos via a plugin copy command
if testing shows tS is unstable or crashing because of undos then the clear history would be a good idea.
- Attachments
-
- clothConversionScript.RsObj
- (580.84 KiB) Downloaded 50 times
Re: Vertex Color Tools
Simple Cloth plane on top of a Cube
Morph Animation
Are you going to allow these scripts to run on Camera and Lights?
I tried on a Camera and Light, all though possible, if you answer No to any of the tS Dialogs, you will get an error and a copy of it.
Vertex Color Animation
Notice a lag in this version unlike the previous version.
I put a trace at the beginning and end in the Vertex Texture Animation script. .
Why do you have an Alert with a timeout and a Status Message?
Alert is too fast to actually read it.
Model Vertex Animation The right side Model Conversion cloth is missing the starting frames which should be flat like the left side cloth.
It looked like the copied meshes were there, just not included in the Model Animation after running the py script, which matched the Step Frames @ 10
Morph Animation
Code: Select all
Source object: /Scripts/CustomCommands/clothConversionScript/cloth2morph2/set keyframes Error: Microsoft JScript runtime error Description: 'clothFS' is undefined Error code: 0x800a1391 - (null) Line: 46, Char: 1 Script text: MeshModifiers.SmoothNormals(clothFS.TargetNode);
I tried on a Camera and Light, all though possible, if you answer No to any of the tS Dialogs, you will get an error and a copy of it.
Vertex Color Animation
Notice a lag in this version unlike the previous version.
I put a trace at the beginning and end in the Vertex Texture Animation script. .
Why do you have an Alert with a timeout and a Status Message?
Alert is too fast to actually read it.
Model Vertex Animation The right side Model Conversion cloth is missing the starting frames which should be flat like the left side cloth.
It looked like the copied meshes were there, just not included in the Model Animation after running the py script, which matched the Step Frames @ 10
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
fixed morphs error
removed alert at end and combined it with delete original dialog
removed vertex color alert to press shader button, only status line now
fix scene instanced materials vertex color animation
could not get rid of 2 undos for vertex color as planned
added trueblue cam and light checks
scene instanced will change the original material, no way around it added question/warning
multi material cloth fixed - requires extra steps at the end
model vertex animation - no changes yet, something weird going on, getting keyframes in modelspace and might be bad tS install(super slow)
removed alert at end and combined it with delete original dialog
removed vertex color alert to press shader button, only status line now
fix scene instanced materials vertex color animation
could not get rid of 2 undos for vertex color as planned
added trueblue cam and light checks
scene instanced will change the original material, no way around it added question/warning
multi material cloth fixed - requires extra steps at the end
model vertex animation - no changes yet, something weird going on, getting keyframes in modelspace and might be bad tS install(super slow)
- Attachments
-
- clothConversionScript.RsObj
- (588.17 KiB) Downloaded 52 times
Re: Vertex Color Tools
Vertex Color Animation still lags with the Vertex Texture Animation script.
Could it be the change to not include the Bitmap(s)?
Sharing this scene because I found it interesting.
The source Plane was painted with your Paint Vertices tool.
The Plane, 1 was converted using your Vertex Color Animation scripts and is currently Invisible.
Run through the animation to see the differences from the source Plane.
Morph Animation did not have any differences.
Could it be the change to not include the Bitmap(s)?
Sharing this scene because I found it interesting.
The source Plane was painted with your Paint Vertices tool.
The Plane, 1 was converted using your Vertex Color Animation scripts and is currently Invisible.
Run through the animation to see the differences from the source Plane.
Morph Animation did not have any differences.
- Attachments
-
- Cloth.RsScn
- (3.64 MiB) Downloaded 51 times
Re: Vertex Color Tools
Model Vertex Animation
I found a workaround for the missing starting meshes missing after running the Python file.
I set the timeIncrement = 1
Also added print("targetMesh has been processed") to the end of the script so I could tell when the process was fininshed.
Observations:
Deleting the left-over nodes in Model is not a good idea!
I used Model's Material Editor to Paint a new material on the targetMesh.
Switched to Workspace and Deleted the left-over nodes.
Using different Bridge settings might be helpful too.
Turn it ON.
Open Model
Turn it OFF.
Run the py script.
Paint.
Turn ON.
Open Workspace.
I found a workaround for the missing starting meshes missing after running the Python file.
I set the timeIncrement = 1
Also added print("targetMesh has been processed") to the end of the script so I could tell when the process was fininshed.
Code: Select all
import sys
sys.path.append('PythonScripts')
import trueSpace
doc = trueSpace.GetActiveDocument()
doc.ClearOutTxt()
timeIncrement = 1
doc.ActiveTime = 0
target = doc.Object("targetMesh")
tsource = doc.Object("transformNode")
posn = tsource.Position
rot = tsource.Rotation
target.Position = posn
target.Rotation = rot
target.SetFrame()
verts = target.NbrVertices
count = 1
source = doc.Object("targetMesh," + str(count))
tsource = doc.Object("transformNode," + str(count))
doc.ActiveTime = timeIncrement
while source:
for v in range(0,verts):
vertex = source.GetVertex(v)
x = vertex[0]
y = vertex[1]
z = vertex[2]
target.SetVertex(v,x,y,z)
target.AnimateVertex(v)
posn = tsource.Position
rot = tsource.Rotation
target.Position = posn
target.Rotation = rot
target.SetFrame()
count=count+1
source = doc.Object("targetMesh," + str(count))
tsource = doc.Object("transformNode," + str(count))
doc.ActiveTime = count * timeIncrement;
doc.Draw()
trueSpace.Stop()
print("targetMesh has been processed")
Deleting the left-over nodes in Model is not a good idea!
I used Model's Material Editor to Paint a new material on the targetMesh.
Switched to Workspace and Deleted the left-over nodes.
Using different Bridge settings might be helpful too.
Turn it ON.
Open Model
Turn it OFF.
Run the py script.
Paint.
Turn ON.
Open Workspace.
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
Modelspace vertex animation update:
Changed the model vertex to include 1 extra copy so the first frame matches the cloth start state.
Tips:
Dont have the model Scene Editor open during the run. It makes it very slow.
After running the python script remove it from the scene.
Think python makes tS a little unstable, so recommend exiting tS soon after a run.
Don't run python, exit to workspace and try to go back into modelspace. I got plenty of crashes with that sequence.
Currently in UU9 just opening a python script and looking at it is enough to make workspace run slowly. Can get the speed back by loading an old layout from unmodified trueSpace. The layouts included in UU9 will retain the slowness.
I don't see any lag in the vertex color processing. Does this prevent it from working?
Changed the model vertex to include 1 extra copy so the first frame matches the cloth start state.
Tips:
Dont have the model Scene Editor open during the run. It makes it very slow.
After running the python script remove it from the scene.
Think python makes tS a little unstable, so recommend exiting tS soon after a run.
Don't run python, exit to workspace and try to go back into modelspace. I got plenty of crashes with that sequence.
Currently in UU9 just opening a python script and looking at it is enough to make workspace run slowly. Can get the speed back by loading an old layout from unmodified trueSpace. The layouts included in UU9 will retain the slowness.
I don't see any lag in the vertex color processing. Does this prevent it from working?
- Attachments
-
- clothConversionScript.RsObj
- (595 KiB) Downloaded 49 times
Re: Vertex Color Tools
I highly doubt that this anything to do with the UU9 Layouts which are in fact UU8 Layouts that are probably even older the that.
The Model's Script Editor, Scene Editor and Facial Animator all do not work very well and make Workspace unstable.
There is no synchronization with Workspace in Model.
Even switching layouts, a lot, can have an effect on Workspace.
Have you tried using the trueSpace6 layout?
Reset the Context
Turn off the Bridge
Delete all objects in the Scene
Switch to the trueSpace6 layout
Close tS from the Model's File menu
Open tS and try using any of the above tools in Model only!
The Model's Script Editor, Scene Editor and Facial Animator all do not work very well and make Workspace unstable.
There is no synchronization with Workspace in Model.
Even switching layouts, a lot, can have an effect on Workspace.
Have you tried using the trueSpace6 layout?
Reset the Context
Turn off the Bridge
Delete all objects in the Scene
Switch to the trueSpace6 layout
Close tS from the Model's File menu
Open tS and try using any of the above tools in Model only!
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
I forgot to post the updated python file. Part of the fix was to prevent tS renaming the objects when switching to modelspace.clintonman wrote: ↑22 Feb 2023, 03:27 Modelspace vertex animation update:
Changed the model vertex to include 1 extra copy so the first frame matches the cloth start state.
...
The name pattern "nodename comma space number" was changed to "nodename comma number" to make modelspace happy.
Code: Select all
import sys
sys.path.append('PythonScripts')
import trueSpace
doc = trueSpace.GetActiveDocument()
doc.ClearOutTxt()
timeIncrement = 10
doc.ActiveTime = 0
target = doc.Object("targetMesh")
tsource = doc.Object("transformNode")
posn = tsource.Position
rot = tsource.Rotation
target.Position = posn
target.Rotation = rot
target.SetFrame()
verts = target.NbrVertices
count = 1
source = doc.Object("targetMesh," + str(count))
tsource = doc.Object("transformNode," + str(count))
#doc.ActiveTime = timeIncrement
doc.ActiveTime = 0
target.SetFrame()
while source:
for v in range(0,verts):
vertex = source.GetVertex(v)
x = vertex[0]
y = vertex[1]
z = vertex[2]
target.SetVertex(v,x,y,z)
target.AnimateVertex(v)
posn = tsource.Position
rot = tsource.Rotation
target.Position = posn
target.Rotation = rot
target.SetFrame()
count=count+1
source = doc.Object("targetMesh," + str(count))
tsource = doc.Object("transformNode," + str(count))
doc.ActiveTime = count * timeIncrement;
doc.Draw()
trueSpace.Stop()
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Vertex Color Tools
I think I found the problem with the the UU layouts. The slowdown occurs when the Scene View is open. Several UU layouts have the Scene View open permanently, meaning there is no way to close it.
Steps:
Default Layout
Open LE window for convenient selecting - selections are fast
Switch to Model
Open the Python Editor
Selections are now super slow
Run the attached script to close the Scene View
Selections are fast again
Can restart tS to get speed with the Scene View open
I think the combination or python scripts and scene view is unstable and the scene view should be closed when running python scripts.
Steps:
Default Layout
Open LE window for convenient selecting - selections are fast
Switch to Model
Open the Python Editor
Selections are now super slow
Run the attached script to close the Scene View
Selections are fast again
Can restart tS to get speed with the Scene View open
I think the combination or python scripts and scene view is unstable and the scene view should be closed when running python scripts.
- Attachments
-
- CloseSceneViewNode.RsObj
- (6.13 KiB) Downloaded 50 times