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 »

I'm almost done updating the cloth conversion script. The morphs are easier to use now and the last details of vertex color animation are done. The one thing that looks iffy at the moment is the normals bitmap. It's not usable inside trueSpace, but I'd like to know it's working for export purposes and I want to make one last attempt at using them inside tS via tricks. Besides the normals I also want to streamline the workflow a little bit. One thing hasn't changed, the modelspace vertex animation is the same as the original script. No improvements of enhancements there.

I'm attaching the wip beta script below. Place the script in the CustomCommands

I've been testing on the sample scene from the documentation,
C:\trueSpace761\tS\PDFMan\resources\chapter10\3_Flags

I use the convert dx material tool to convert D3D Compiled to D3D Shader based material needed for this tool.
The conversion is not needed for the morph part of the tool.
ClothConversionPreReleaseBetaPanel.jpg
ClothConversionPreReleaseBetaPanel.jpg (53.07 KiB) Viewed 710 times
Morph: select one of the flags and press the Make Morph button.

Vertex Color:
convert the flag material to nodes,
select the flag and press the Make Vertex Color button,
answer yes for any construction history dialogs that may appear.
after complete, reset the connector on the vertex shader.
Select something other than the selected node and reselect it. This will show another panel(VTA panel), press the button on the panel to lock it in place in the stack view. This is needed for animation and rendering to work.
ClothConversionPreReleaseBetaKeyingPanel.jpg
ClothConversionPreReleaseBetaVTAPanel.jpg
ClothConversionPreReleaseBetaVTAPanel.jpg (39.48 KiB) Viewed 710 times
vOffset is exported from the VTA so change it's value on the flag model (Plane, 3 in the image) not the VTA panel
Finally, use the keying panel and tools to set a keyframe at 0 with vOffset 0, and a later key with vOffset of 1
Attachments
clothConversionScript.RsObj
(293.96 KiB) Downloaded 51 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 »

I was able to create an Animation of the American Flag. :bananathumb:
Later, I lost the ability to Play the animation.
Does the animated object need to be selected for the animation to Play?
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: 13 Feb 2023, 19:11 I was able to create an Animation of the American Flag. :bananathumb:
Later, I lost the ability to Play the animation.
Does the animated object need to be selected for the animation to Play?
The VTA node needs to be visible in the stack Panel view, which happens when you select animated object. You can make it permanent in the stack by ctrl drag out and back in to the stack.
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 »

I see.
As an experiment, I exported all of the VTA's attributes.
And removed the VTA's Default - Export aspect.
This works without having the VTA panel in the Stack.
VTA connectors.png
.
Still needs to be selected though.
Note: Need to experiment with which connectors have to be exported, may just be the dummyOut.
Edit: Yep, just the vOffset and dummyOut need to be exported.
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: 13 Feb 2023, 19:59 I see.
As an experiment, I exported all of the VTA's attributes.
And removed the VTA's Default - Export aspect.
This works without having the VTA panel in the Stack.
VTA connectors.png
.
Still needs to be selected though.
Note: Need to experiment with which connectors have to be exported, may just be the dummyOut.
Edit: Yep, just the vOffset and dummyOut need to be exported.
Does it still work if the LE is closed?
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 »

Yes, as long as it is selected.
dummyOut.png
dummyOut.png (7.51 KiB) Viewed 702 times
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 »

I reloaded the scene, and the animation would not play.
So, the Stack/Panel needs to be open or Ctrl + Drag the (Selected) animated object out to a floating panel.
I wonder if the VTA could use an Advance Handler like OnPostLoad(), to overcome this issue?
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 »

clintonman wrote: 13 Feb 2023, 19:19
trueBlue wrote: 13 Feb 2023, 19:11 I was able to create an Animation of the American Flag. :bananathumb:
Later, I lost the ability to Play the animation.
Does the animated object need to be selected for the animation to Play?
The VTA node needs to be visible in the stack Panel view, which happens when you select animated object. You can make it permanent in the stack by ctrl drag out and back in to the stack.
Quoting myself above. If you drag the VTA out and back in to the panel you don't need an open le, don't need to select the animated item, dont need a floating item and you can have several vertex animated objects active at one time.

Forgot to mention that the stack Panel view has to be visible.
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: 13 Feb 2023, 21:22
clintonman wrote: 13 Feb 2023, 19:19
trueBlue wrote: 13 Feb 2023, 19:11 I was able to create an Animation of the American Flag. :bananathumb:
Later, I lost the ability to Play the animation.
Does the animated object need to be selected for the animation to Play?
The VTA node needs to be visible in the stack Panel view, which happens when you select animated object. You can make it permanent in the stack by ctrl drag out and back in to the stack.
Quoting myself above. If you drag the VTA out and back in to the panel you don't need an open le, don't need to select the animated item, dont need a floating item and you can have several vertex animated objects active at one time.
Okay.
Another discovery...
Have a floating Animation Editor along with the Link Editor open.
Works without selection, any panel showing in Panels, and does not matter which aspect is showing in the Stack.
Now you can actually see the dummyOut values update while Playing the animation.
Why is tS so weird? :o
Screenshot (64).png
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 »

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.
However, the animation will not Play if the Link Editor is in 4D mode, but you can open a floating Animation Editor.
All animations playing
All animations playing
Post Reply