Wings 3D Development Forum
YafaRay Plug-in - reviewing for Yafaray 3.0 - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Design & Development (https://www.wings3d.com/forum/forumdisplay.php?fid=6)
+--- Thread: YafaRay Plug-in - reviewing for Yafaray 3.0 (/showthread.php?tid=2053)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - tkbd - 07-31-2016

Is support Unicode for Logging/badge ?
I tried to string that contain UTF8 text in Title,Author,Contact Info,Comments and Custom icon path.

Wings3D output a following error.
Code:
Using GPU shaders.
Exporting  to: /Users/***/render/wpc_yafaray-1265-AUS4BO.xml
for render to: //Users/***/render/untitled.png
Mesh w_Cube1: triangulating...done
Mesh w_Cube1: exporting...done
Mesh w_Torus2: triangulating...done
Mesh w_Torus2: exporting...done
ERROR: Failed to export:
{'EXIT',{badarg,[{io_lib,format,
                         ["\t<logging_title sval=\"~s\"/>",
                          [[12454,12452,12531,12464,12473,51,68]]],
                         [{file,"io_lib.erl"},{line,168}]},
                 {wpc_yafaray,println,3,
                              [{file,"wpc_yafaray.erl"},{line,5685}]},
                 {wpc_yafaray,export_logging_badge,2,
                              [{file,"wpc_yafaray.erl"},{line,5636}]},
                 {wpc_yafaray,export,3,[{file,"wpc_yafaray.erl"},{line,3095}]},
                 {wpc_yafaray,'-do_export/4-fun-0-',3,
                              [{file,"wpc_yafaray.erl"},{line,660}]},
                 {wings_export,export,4,[{file,"wings_export.erl"},{line,35}]},
                 {wings_file,'-export_filename_1/2-fun-0-',3,
                             [{file,"wings_file.erl"},{line,96}]},
                 {wings_develop,time_command,2,
                                [{file,"wings_develop.erl"},{line,81}]}]}}
if fix this issue in wings3d plugin side.
use ~ts for UTF8 string instead ~s .
And Yafaray side support is also required(font and encodeing etc).
Probably,it will a bit hard work...

David,This is also another issue about a badge...

An default rendering image size of Yafaray plug-ins had become to 200x200.
So,In the case of such a small rendering size,an information text over an final image width.

(See left bottom image in the screenshot)
[Image: th_yafaray_badge_size_zpsvcudlm5n.png]

How about to fit the width of the final image to the width of the badge when the rendering width is shorter than the badge's.

Cheers!


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - oort - 07-31-2016

David,
I am using the official release of Wings3D 2.0.5. I am running it on Windows 7. Just to clarify, I can zoom out and see the whole image. It is just that when the image is first displayed the entire image with settings badge does not fill the image viewer window. I have to zoom out to see the rest of the image with the badge.

Thanks,
oort


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - micheus - 07-31-2016

To printout Unicode correctly we need to replace that ~s by ~ts.


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - micheus - 07-31-2016

(07-29-2016, 08:02 PM)david.bluecame Wrote: In fact, I think it's best to do this in the new YafaRay plugin preferences:
* Set the path to yafaray-xml (the one in v3.0.2-beta)
* You can leave the plugins path empty, as YafaRay v3.0.2 should be able to find them automatically (but make sure it's empty and no space marks are there!)
* You can leave the options field empty as well. YafaRay v3.0.2 should just work.
Wouldn't be better remove this field from the Plugin Preferences?

David, about that "Custom Icon" for badge: which type of images are accepted?
I'm adding the passes to preferences and other minor layout review. In this case, adding a button for select the image path.


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - david.bluecame - 07-31-2016

Hello,

It should allow the same image formats used for textures, as far as I know.

And yes, I agree, I will remove the plugin path altogether. I kept it for compatibility with older versions, but I agree that's probably not necessary as all YafaRay development will continue with v3.x onwards...


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - micheus - 07-31-2016

(07-31-2016, 04:25 PM)david.bluecame Wrote: And yes, I agree, I will remove the plugin path altogether.
I can include it to the change I did (as mentioned before) and make a pull request for your update.


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - david.bluecame - 07-31-2016

Hello,

Thank you, Micheus.

About the Unicode characters in the badge parameters, there is an additional problem. For YafaRay to read the XML file with Unicode, it must be internally encoded in UTF-8. However, the file exported by YafaRay plugin is in ISO-8859-1. From what I've read in the Erlang pages, it's not trivial to save it in UTF-8 as it would require replacing the file:write to io:fwrite functions to write in the xml.

http://erlang.org/doc/apps/stdlib/unicode_usage.html

You can take a look at section 3.11 Unicode Data in Files


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - micheus - 07-31-2016

Yeah. So, it seems we should keep the things simple and let it as it is. Don't you think?


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - oort - 08-01-2016

Since SSS has been removed, I agree that there is no need for the ability to set the plugins path anymore. I don't see myself using any of the older releases of YafaRay, with all of the improvements in the newest version.

Yes, a little late to post about that subject but wanted to confirm we are all on the same page... Smile
oort


RE: YafaRay Plug-in - reviewing for Yafaray 3.0 - david.bluecame - 08-01-2016

Hello,

Plugin path removed :-) https://github.com/DavidBluecame/wings/commit/700836eb29f61cadf2dc34e83997225f37e492e2

I will apply more updates and afterwards I will generate a new beam file for you to try.

Hello,

About the Unicode characters in the Parameters Badge, I found I can fix it with this change:
https://github.com/DavidBluecame/wings/commit/ea303575008a914b7fd53603704df593b408e675

We would need to test it in several OS to make sure it does not cause unexpected problems. Also, as I had to remove the "raw" option, the XML generation could be slower, so this needs to be tested.

In Fedora 24 I didn't need to change from "~s" to "~ts". The change above was enough to get the TXT/HTML and Params Badge showing the correct Unicode UTF-8 characters in the render result.