Yafaray4tS v0.9.0

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

Re: Yafaray4tS v0.9.0

Post by trueBlue » 22 Aug 2018, 21:00

Testing in tS7.61B8.4

After successfully rendering scenes and using it, I Reset the Default Context.
C3DResetError.PNG
C3DResetError.PNG (8.6 KiB) Viewed 617 times
YafaRay4tS/Setup - Render XML button
1.) If you enable Use Custom Temporary Directory, the Yaf_render.cmd does not create the images to that directory.
2.) Can not use it more then one time without an error, unless you enable Delete XML file after render.

YafaRay4tS/Animation - Create XML files and begin batch render
1.) Creates images with Zero bytes
2.) XML files are not deleted.


Yaf_render.cmd (Images are bad, XML files are not deleted, and not created C:\Temp\ )
cd "C:\trueSpace761\tS\Image Folder\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/trueSpace761/tS/Image Folder/yaf_test_0000.xml" "yaf_test_0000"
Del "C:\trueSpace761\tS\Image Folder\yaf_test_0000.xml"
cd "C:\trueSpace761\tS\Image Folder\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/trueSpace761/tS/Image Folder/yaf_test_0001.xml" "yaf_test_0001"
Del "C:\trueSpace761\tS\Image Folder\yaf_test_0001.xml"
cd "C:\trueSpace761\tS\Image Folder\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/trueSpace761/tS/Image Folder/yaf_test_0002.xml" "yaf_test_0002"
Del "C:\trueSpace761\tS\Image Folder\yaf_test_0002.xml"
cd "C:\trueSpace761\tS\Image Folder\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/trueSpace761/tS/Image Folder/yaf_test_0003.xml" "yaf_test_0003"
Del "C:\trueSpace761\tS\Image Folder\yaf_test_0003.xml"
cd "C:\trueSpace761\tS\Image Folder\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/trueSpace761/tS/Image Folder/yaf_test_0004.xml" "yaf_test_0004"
Del "C:\trueSpace761\tS\Image Folder\yaf_test_0004.xml"


If you enable Use Custom Temporary Directory & Use Custom XML Export file (Images are good but not created C:\Temp\ )
Yaf_render.cmd
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/Temp/CustomTemp_0000.xml" "yaf_test_0000"
Del "C:\Temp\CustomTemp_0000.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/Temp/CustomTemp_0001.xml" "yaf_test_0001"
Del "C:\Temp\CustomTemp_0001.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/Temp/CustomTemp_0002.xml" "yaf_test_0002"
Del "C:\Temp\CustomTemp_0002.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/Temp/CustomTemp_0003.xml" "yaf_test_0003"
Del "C:\Temp\CustomTemp_0003.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/trueSpace761/tS/Image Folder/" -ics "sRGB" "C:/Temp/CustomTemp_0004.xml" "yaf_test_0004"
Del "C:\Temp\CustomTemp_0004.xml"


If you change the Output - Render File to C:\Temp\yaf_test.png (Images are good and created in C:\Temp\ )
Yaf_render.cmd
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/Temp/" -ics "sRGB" "C:/Temp/CustomTemp_0000.xml" "yaf_test_0000"
Del "C:\Temp\CustomTemp_0000.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/Temp/" -ics "sRGB" "C:/Temp/CustomTemp_0001.xml" "yaf_test_0001"
Del "C:\Temp\CustomTemp_0001.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/Temp/" -ics "sRGB" "C:/Temp/CustomTemp_0002.xml" "yaf_test_0002"
Del "C:\Temp\CustomTemp_0002.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/Temp/" -ics "sRGB" "C:/Temp/CustomTemp_0003.xml" "yaf_test_0003"
Del "C:\Temp\CustomTemp_0003.xml"
cd "C:\Temp\"
"C:\Program Files\yafaray_v3\bin\yafaray-xml.exe" -f "png" -op "C:/Temp/" -ics "sRGB" "C:/Temp/CustomTemp_0004.xml" "yaf_test_0004"
Del "C:\Temp\CustomTemp_0004.xml"

So the real problem here is, simple instructions on how to use it properly.
But there is still a problem with the Delete XML file after render.
1.) If you enable it, the Render XML button does not work as expected.
2.) If you do not enable it when batch rendering the XML files are not deleted.

3.) If you enable Use Custom Temporary Directory, the Yaf_render.cmd does not create the images to that directory. I do not know if this correct or not. I am not sure if I understand it's purpose other then for batch rendering. Meaning if it has other purposes.

I do know this though, if you were to enable Create XML files and begin batch render and not set the other requirements noted above, with a 1000 frame animation, you will have 2000 files to delete! :shock:
Attachments
C3DResetError.PNG
C3DResetError.PNG (8.6 KiB) Viewed 753 times
C3DResetError1.PNG
C3DResetError1.PNG (6.17 KiB) Viewed 753 times
C3DResetError.PNG
C3DResetError.PNG (8.6 KiB) Viewed 753 times

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

Re: Yafaray4tS v0.9.0

Post by clintonman » 22 Aug 2018, 21:53

trueBlue wrote:
22 Aug 2018, 21:00
Testing in tS7.61B8.4

After successfully rendering scenes and using it, I Reset the Default Context.
C3DResetError1.PNG
...
Not seeing it here.
1. installed
2. did 2 renders
3. reset default context - no error

My version text files has
"trueSpace 7.61 Beta 8 Unofficial Update

Revisions:
July 06, 2009
February 21, 2010
November 01, 2012
July 06, 2018"
Clinton Reese

http://clintons3d.com

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

Re: Yafaray4tS v0.9.0

Post by clintonman » 22 Aug 2018, 21:57

trueBlue wrote:
22 Aug 2018, 21:00
...
YafaRay4tS/Setup - Render XML button
1.) If you enable Use Custom Temporary Directory, the Yaf_render.cmd does not create the images to that directory.
2.) Can not use it more then one time without an error, unless you enable Delete XML file after render.

...
Correct, it can't render a file that doesn't exist. Have to disable Delete XML file after render
Clinton Reese

http://clintons3d.com

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

Re: Yafaray4tS v0.9.0

Post by clintonman » 22 Aug 2018, 22:04

trueBlue wrote:
22 Aug 2018, 21:00
..
YafaRay4tS/Animation - Create XML files and begin batch render
1.) Creates images with Zero bytes
2.) XML files are not deleted.
Batch Render.PNG

[...
I see it. Problem is that the "Yaf_render.cmd" never runs, so no real images and no delete xml files. Don't know where the 0 byte images are from.
Will check it out and correct. For v0.9.1 bug fix release.

Partial fix.
YafaRay4tS/endAnimation line 30:

Code: Select all

	//var commandstring = '%comspec% /C ' + CMD_File;
	var commandstring = '%comspec% /C "' + CMD_File + '"';
This makes it "work", but does not explain the empty image files.

Second part of fix.
YafaRay4tS/RenderFnSet - comment out code since it seems inappropriete to me to create text files to test for write permissions

Code: Select all

	// check for write priveledges
	//try {
	//	fso.CreateTextFile(Yaf_RenderFilename);
	//} catch (ex) {
		// failed -- so use temp render file directly
	//	Yaf_RenderFilename = Yaf_TempDir + 'yafaray.tga';
	//}
With no code fixes the workaround is to manually run the Yaf_render.cmd created in the folder
Clinton Reese

http://clintons3d.com

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

Re: Yafaray4tS v0.9.0

Post by trueBlue » 23 Aug 2018, 06:26

I downloaded your C3D Persistent Install v2 and copied your C3DReset.RsObj
Replaced the one I had with yours. Resetting the Default Context now works without an error.

Made a few changes to make the Render to File be like the trueSpace Render to File
I also applied your changes.

Things to try
Using the Render to File toolbar icon.
Render Animation button - Will not show any viewers. See RenderFrame,RsObj - line 122 and button script
Render button - Will not show any viewers and enables Use Render to File. See button script
Cancel button - Disables all viewers except the Internal & OptiDectector. See button script
Attachments
Yafaray Folder.RsObj
(870.64 KiB) Downloaded 12 times

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

Re: Yafaray4tS v0.9.0

Post by clintonman » 23 Aug 2018, 14:18

trueBlue wrote:
23 Aug 2018, 06:26
I downloaded your C3D Persistent Install v2 and copied your C3DReset.RsObj
Replaced the one I had with yours. Resetting the Default Context now works without an error.

Made a few changes to make the Render to File be like the trueSpace Render to File
I also applied your changes.

Things to try
Using the Render to File toolbar icon.
Render Animation button - Will not show any viewers. See RenderFrame,RsObj - line 122 and button script
Render button - Will not show any viewers and enables Use Render to File. See button script
Cancel button - Disables all viewers except the Internal & OptiDectector. See button script
I'm only doing bug fixes at this point, so if you're adding/changing things be sure to test it thoroughly before releasing it. I'll come back from time to time to help test your changes.
Clinton Reese

http://clintons3d.com

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

Re: Yafaray4tS v0.9.0

Post by trueBlue » 23 Aug 2018, 21:49

Thanks!
It started out as a Developers Edition for myself for testing purposes.
Trying to wrap my head around of what is going on behind close doors.
Changing the Trace and Error messages, for one to see the flow and two to make the Error messages user friendly by perhaps leading them to where the problem is and fix it.
Notice some messages and alerts are not being called.
Notice using the Render button and the Offline Render icons are different and the Offline Render icons have to be run twice at times in order for the Error message to show..
Also notice that some of the Error messages with an Abort, do not stop the writing/exporting of the xml files and or the Status messages showing Rendering... which does not happen.

As an example for the Trace and Error message:
Before
DevelopersEditionBefore.PNG
After
DevelopersEditionAfter.PNG
With no code fixes the workaround is to manually run the Yaf_render.cmd created in the folder
This seems to be working as expected without manually running the Yaf_render.cmd
Images are rendered and XML files are deleted.
Just not in the C:\Temp\ folder
If you can crack that nut, should be good to go!
Unless it is a requirement to change the Output - Render File to the C:\Temp\ folder, it all works as expected.

Try this button script in the Render XML button. Works every time.

Code: Select all

var Errors = Node.AccessFnSet("%THIS_NAME%" + '/ErrorsFnSet');
Errors.Clear();
Activity.Run("%THIS_NAME%" + "/VersionCheck");
Activity.Run("%THIS_NAME%" + "/ExportXML");
Node.Value("%THIS_NAME%", "Yaf_DeleteTempFiles") = 0
Activity.Run("%THIS_NAME%" + "/Render");
Node.Value("%THIS_NAME%", "Yaf_DeleteTempFiles") = -1

And for the Use Custom Temporary Directory maybe you could implement something like this

Code: Select all

var Yaf_TempDir = Node.Value(Space.CurrentScene() + "/YafaRay4tS", 'Yaf_TempDir');
var Yaf_UseCustomTempDir = Node.Value(Space.CurrentScene() + "/YafaRay4tS", 'Yaf_UseCustomTempDir');
if (Yaf_UseCustomTempDir == true) {
	Node.Value(Space.CurrentScene() + "/YafaRay4tS", 'Yaf_RenderFilename') = Node.Value(Space.CurrentScene() + "/YafaRay4tS", 'Yaf_TempDir')
}
And then after rendering restore the Yaf_RenderFilename

Code: Select all

Node.Value(Space.CurrentScene() + "/YafaRay4tS", "Yaf_RenderFilename") = Node.Value("/Yafaray Folder/YafaRay4tS", "Yaf_RenderFilename")

Post Reply