Vertex Color Tools

User avatar
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

Post by clintonman »

trueBlue wrote: 14 Feb 2023, 19:56 Here is a zip file:
3 Flags.RsScn - Original scene modified per your instructions on your website for Making a Vertex Color animation.
3Flags.ctx - Context saved with the 3 Flags.RsScn loaded and the clothConversionScript opened in a floating panel.

American Flag.RsScn - A scene that was created with your previous version in this thread.
Note: The American Flag; VLA's dummyOut connector was exported out.
Load this scene and press the Animation panel's P 'Play' button.
Demonstrates an alternate way that does not need the VLA panel showing in the Stack/Panels
Screenshot (67).png
Loaded your ctx, selected the USA flag and pressed the Vertex Colors. The physics ran and it seemed to run all the way through. Then the bar graph status started over, got stuck at 0 and then tS crashed. So yeah, something different in your tS... Now I got something to look at. I need to try on a different machine though, this one doesn't have the latest UU9 rosetta.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Vertex Color Tools

Post by trueBlue »

clintonman wrote: 14 Feb 2023, 20:23
trueBlue wrote: 14 Feb 2023, 19:56 Here is a zip file:
3 Flags.RsScn - Original scene modified per your instructions on your website for Making a Vertex Color animation.
3Flags.ctx - Context saved with the 3 Flags.RsScn loaded and the clothConversionScript opened in a floating panel.

American Flag.RsScn - A scene that was created with your previous version in this thread.
Note: The American Flag; VLA's dummyOut connector was exported out.
Load this scene and press the Animation panel's P 'Play' button.
Demonstrates an alternate way that does not need the VLA panel showing in the Stack/Panels
Screenshot (67).png
Loaded your ctx, selected the USA flag and pressed the Vertex Colors. The physics ran and it seemed to run all the way through. Then the bar graph status started over, got stuck at 0 and then tS crashed. So yeah, something different in your tS... Now I got something to look at. I need to try on a different machine though, this one doesn't have the latest UU9 rosetta.
I can still run your previous version in this thread without issues, although I had to fix a couple of errors.
User avatar
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

Post by clintonman »

PreUpdate sample code changes:

Will not run if the simulation time is less than the cloth tool end time
Will not run if no mesh, matrix or cloth
Esc to abort will clear the status line
VTA node use trueBlue fix for errors that devs would see
Copy animation from the original source when vertex color conversion is run
Option to delete the original source node
deeper search for VTA nodes and unique WinID values for their frames
Attachments
clothConversionScript.RsObj
(350.92 KiB) Downloaded 44 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Vertex Color Tools

Post by trueBlue »

clintonman wrote: 15 Feb 2023, 03:16 PreUpdate sample code changes:

Will not run if the simulation time is less than the cloth tool end time
Will not run if no mesh, matrix or cloth
Esc to abort will clear the status line
VTA node use trueBlue fix for errors that devs would see
Copy animation from the original source when vertex color conversion is run
Option to delete the original source node
deeper search for VTA nodes and unique WinID values for their frames
Great updates! :bananathumb:
Thank you!
Ran several tests runs with the Vertex Color animation and it works flawlessly.
Will test tomorrow more thoroughly in different scenarios.
Wondering what might happen if a user did not answer Yes to the tS Construction History dialog.
Seems that might be better if it ran silently and then Restore the user's Dialog settings.
Maybe replace the Alert with a Status Message with instructions about Resetting the Vertex_shader.
The Shader button could Clear the Status Message.
2 less Alerts.
User avatar
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

Post by clintonman »

VertexTextureGodot01.jpg
The flag mesh was imported to Godot as a collada file.
First Godot test using a shader that matches the vertex shader in trueSpace. The next step is to have it read the normals image to get proper lighting/shading.
Clinton Reese

http://clintons3d.com
User avatar
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

Post by clintonman »

VertexAnimNormalsGodot.jpg

Godot shader is complete with normals now. On the left is without the normals animation texture and the right includes it. This is the one piece of the puzzle that trueSpace can't do and the reason that cloth to morphs is a better option for use inside of tS.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Vertex Color Tools

Post by trueBlue »

You Godot! :bananathumb:
Glad you got what you wanted. :D
I see what you mean about your new Morph Animation use in Workspace.
Much easier to use and it works Great!
User avatar
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

Post by clintonman »

More changes and improvements.

Removed flatten command since that should be a user choice. Construction history alert doesn't show anymore.
Automatic convert to editable shape when cloth is applied to primitives. No conversion dialog.

Vertex color animation node automatically opens in the panel view. No need to drag it in anymore.
Put time limit on the vertex color alert and added a status display, also with a time limit.

Added an "Open All VTAs" button to the VTA nodes. Activate all the vertex color animations in the scene without needing to select them all and no need to open the cloth panel to press the same button.
Clinton Reese

http://clintons3d.com
User avatar
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

Post by clintonman »

Ran into some issues, here is the attachment.

There was a bug in the rsx plugin. The status message timeout value was being ignored.

Here is the updated plugin v1638440:

http://clintons3d.com/plugins/downloads ... Plugin.rsx
Attachments
clothConversionScript.RsObj
(353.16 KiB) Downloaded 48 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Vertex Color Tools

Post by trueBlue »

@Clinton
Can you try this modified version?
Toolbar commands:
LMB = Activity.Run("Scripts/CustomCommands/clothConversionScript/OpenPanel")
RMB = Activity.Run("Scripts/CustomCommands/clothConversionScript/cloth2vertexcolor/OpenAllVTAPanels")

Main differences are the VTA panel's Default aspect is not Exported Out.
This makes one less panel per object that is shown.
The dummyOut connector was changed to vOffset_Out and is exported out to the Morphed object in the Vertex Texture Animation script.
The VTA panel's UI are reduced in vertical size.
VTA panels.png
VTA panels.png (13.54 KiB) Viewed 679 times
Post Reply