YafaRay for trueSpace 2019

LightWorks, VRay, Dribble, YafaRay and more..
User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 14 Nov 2019, 15:46

clintonman wrote:
14 Nov 2019, 08:24
trueBlue wrote:
12 Nov 2019, 17:37
Use Custom Temporary Directory - Path to the Custom Directory.
Directory for storing generated XML file and temporary YafaRay output image. Default working directory is the same as the output image directory. Use this option if you want to use a different directory from the final image output directory.

Use Custom XML Export file - Use the File browse dialog button for selecting custom XML file export location.
Use a custom filename and directory for the generated XML file. This is useful when generating multiple XML files for batch rendering or for rendering a previously generated XML file.

Export XML - Creates an XML file without rendering.

Render XML - Renders the Custom XML file or the last XML file that was generated.
The above is from the help file.
Not really sure how this is suppose to work, so I will leave it up to you that it is working as expected.

If when using the above options, and an image is suppose to render to these paths, it does not work.
It dose seem to render to the Output Render File path though.

There is one glitch when checking 'Delete XML file after render', and using the Render XML button on second attempt. It will produce a handled error.

Maybe the help file can be amended?

ExportXMLFnSet is using System.SetBusyCursor(true); in your code.
I can confirm that this is not working as you have said previously.
I would suggest removing this just incase it may be causing any problems.
The image only renders to the selected render path.
I have no idea why there would be a temporary image in the custom directory.
Use Custom XML Export is for directly rendering a preexisting xml file instead of the normal process of generation then rendering. I'm guessing the export xml is useful only for developers.
Can you explain the glitch more?
Are the steps:
Delete XML file after render
Render
Render XML
Render
Render and get Error
Interesting, with using all the default settings, I selected the Export XML button. The Console spawned with a blank screen. Should have waited longer, but after a few seconds, I selected the Render XML button. Console disappeared and rendered. This may happen only on the first render of the day.
Any way, the steps to test the glitch is with the:
Delete XML file after render 'checked'
Export XML
Render XML
Render XML -> will produce an error.

The glitch I think is the Delete XML file after render is tied to the selected render path. (1 of 3)
If the Delete XML file after render was isolated in the code when using the custom or temporary render paths, then the XML file would not be deleted.

Even with your explanation, I still do not really understand it's use or workflow.
As said, maybe the help file can be amended (with your help) about all of the above.

User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 14 Nov 2019, 20:36

Anim
Backup button
Changed

Code: Select all

var protectNode = "Scripts/CustomCommands/ProtectWorkspace";
var ScnProtectNode = Space.CurrentScene() + "/ProtectWorkspace";
if(Node.Exists(protectNode || ScnProtectNode))
{
Activity.Run("Scripts/CustomCommands/ProtectWorkspace/BackupButton")
Activity.Run("Scripts/CustomCommands/ProtectWorkspace/Popup Panel/OpenPanelFrame")
} else {
Activity.Run(Space.CurrentScene() + "/ProtectWorkspace/BackupButton")
Activity.Run(Space.CurrentScene() + "/ProtectWorkspace/Popup Panel/OpenPanelFrame")
}
Guess the above idea might not work, because I notice there is a lot of code going on in the animation nodes that point to "Scripts/CustomCommands/ProtectWorkspace" ONLY.
Odd thing is, I did not see anything wrong with the scene that had the ProtectWorkspace in it, and renaming the ProtectWorkspace in "Scripts/CustomCommands/ProtectWorkspace"

clintonman
Captain
Posts: 2923
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: YafaRay for trueSpace 2019

Post by clintonman » 14 Nov 2019, 20:54

I misspoke before about Optdetector option. This table shows the logic of the checkboxes. These are the controls for the viewers so most likely I'll adjust the code to behave like your changes, but the useRenderToFile checkbox will be totally removed because it adds complexity, the 16 combinations listed below would turn into 32 possible combinations. I could be wrong about that if your change are completely outside this logic.
0 = unchecked, 1 = checked, blank=no external viewer defined, xxx=some external viewer defined
Note that this happens invisibly, the checkbox options are not changed even temporarily.

Code: Select all

internal	optdetector	use external viewer	external viewer	result
0	        0	        0	                blank	        no viewers
0	        0	        0	                xxxx	        no viewers
0	        0	        1	                blank	        no viewers
0	        0	        1	                xxx	        no viewers
0	        1	        0	                blank	        optdetect
0	        1	        0	                xxx	        no viewers
0	        1	        1	                blank	        optdetect
0	        1	        1	                xxx	        external viewer
1	        0	        0	                blank	        base internal
1	        0	        0	                xxx	        base internal
1	        0	        1	                blank	        base internal
1	        0	        1	                xxx	        base internal
1	        1	        0	                blank	        optdetect
1	        1	        0	                xxx	        optdetect
1	        1	        1	                blank	        optdetect
1	        1	        1	                xxx	        optdetect
I also had an idea of having a question for the no viewers option where the file explorer would open to the image folder.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 14 Nov 2019, 21:21

I have been testing these changes for two days now and I have not seen any problems what so ever.
I did just change the viewer button scripts to include Node.Value(yafNode, "useRenderToFile") = false;
Still no issues.
Maybe you can try it out in a scene?
You would have to add a couple of lines to the RenderAnimation in your YafarayScripts in order to test rendering with the Render Animation toolbar command.

Code: Select all

//UserInterface.OpenToolPanelViewEx2("" , "" ,Space.CurrentScene()+"/YafaRay4tS", 8, 1, 0);
Activity.Run(Space.CurrentScene() + "/YafaRay4tS/open panel");
On another note, I just confirmed that YafaRay Material keyframe changes do not render with Model Mesh Processing.
In my test, I just changed the Color from Orange on frame 1 to Blue on the end frame.
This does work when rendering without Model Mesh Processing checked.

clintonman
Captain
Posts: 2923
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: YafaRay for trueSpace 2019

Post by clintonman » 14 Nov 2019, 21:50

Don't get me wrong, it's not about whether it works or not. It's about keeping the code a simple as possible so it can be maintained and expanded easier in the future. The only reason the useRenderToFile was still there was because I didn't delete it before posting the changes. If I can get the same result with fewer inputs I will.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 16 Nov 2019, 17:51

Hope you do not mind and I mean no disrespect!
I made these updates from your last version of YafaRay4tSv0.9.7 so that I could upload them to the Unofficial Update(s)
The previous updates were not working and causing errors!
I made an additional change and uploaded both Update(s) this morning.
Whenever you are finished, I will upload those changes.

YafaRay4tS Scene Utilities
Update YafaRay Render Node
Add

Code: Select all

Node.Value(Destination, "useRenderToFile") = true;

Code: Select all

UserInterface.OpenToolPanelViewEx2("" , "" ,Space.CurrentScene()+"/YafaRay4tS", 6, 1, 0);
Space.Select(Space.CurrentScene()+"/YafaRay4tS") 
Process Imported Scene
Add

Code: Select all

UserInterface.OpenToolPanelViewEx2("" , "" ,Space.CurrentScene()+"/YafaRay4tS", 6, 1, 0);
Space.Select(Space.CurrentScene()+"/YafaRay4tS") 
I know this is probably low on your list, but the Process Imported Scene script does not work like your Update YafaRay Render Node script with the YafaRay4tS panel.
IE:
Scene Utilities "update yafaray node" updated for the new "no tga"/"disable all views" logic.
Also noticed this morning that I need to update all of the Lights and Camera's View button scripts.
I am using
tSBridge.SuggestTSStateByAlias("SV_VIEW_VIEW_CAMERA")
and they are not compatible with trueSpace Beta 8 Standalone.

Code: Select all

try{tSBridge.SuggestTSStateByAlias("SV_VIEW_VIEW_CAMERA")}catch(error){}
Also the Synchronize Object script

Code: Select all

try{tSBridge.SynchronizeObject(Space.CurrentScene() + System.ThisOwner())}catch(error){}

clintonman
Captain
Posts: 2923
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: YafaRay for trueSpace 2019

Post by clintonman » 16 Nov 2019, 22:03

trueBlue wrote:
16 Nov 2019, 17:51
Hope you do not mind and I mean no disrespect!
I made these updates from your last version of YafaRay4tSv0.9.7 so that I could upload them to the Unofficial Update(s)
The previous updates were not working and causing errors!
I made an additional change and uploaded both Update(s) this morning.
Whenever you are finished, I will upload those changes.

YafaRay4tS Scene Utilities
Update YafaRay Render Node
Add

Code: Select all

Node.Value(Destination, "useRenderToFile") = true;
...

I know this is probably low on your list, but the Process Imported Scene script does not work like your Update YafaRay Render Node script with the YafaRay4tS panel.
IE:
Scene Utilities "update yafaray node" updated for the new "no tga"/"disable all views" logic.
...
Roger that. You should note that useRenderToFile and disable all views are the same thing with a different name. Which is why I should have deleted it before my last posting and the reason I will remove it and alter the rest of the code to give the same result you provided or if I'm lucky just recreate it so it doesn't have the inconsistent name.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 16 Nov 2019, 22:18

Yes, I think I saw your use of that when using the Render button on the Render to File panel. Works great. Would be nice if the status message lasted bit longer.
Edit: Forgot to mention, I added a little more time to the ClearStatus

ClearStatus
Change from 2000
ClearStatus", "Period") = 3000

User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 18 Nov 2019, 19:08

YafaRay Materials library
Add
Map
Switch button
Add
Space.Select('%THIS_OWNER_NAME%')
Space.Unselect()

Gradient Texture
Create & Save a Gradient Texture

YafaRay Hair.RsHair

Blend Material Collection
Change
both tSQuestions to ClintonQuestions

User avatar
trueBlue
Captain
Posts: 2171
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: YafaRay for trueSpace 2019

Post by trueBlue » 22 Nov 2019, 00:22

ExportXML 'script was creating a YafaRay con with no message'
Changed
function Execute(params)
{
System.Trace("ExportXML: Exporting YafaRay XML...");
if(Node.Exists("/Status Line")) {
if(!Node.ConExists("Status Line", "YafaRay"))
Node.ConCreate("Status Line", "YafaRay", "string", 4);
Node.Value("/Status Line","YafaRay") = "Exporting - XML Export file...";
}

var MatFnSet = Node.AccessFnSet(System.ThisOwner() + '/MaterialsFnSet');
var ExportFn = Node.AccessFnSet(System.ThisOwner() + '/ExportXMLFnSet');

ExportFn.ExportXML(params);

Activity.Run(Space.CurrentScene() + "/YafaRay4tS/ClearStatus")

}

Post Reply