New Yafray exporter. (UPDATE) Yable-0.30-3 is out

Hello everyone!

I think that is time to let my exporter to see the light!

I began to write this exporter firstly to take confidence with the python API and to play with shaders parameters with the help of an interface.
But time after time the project began to grow until now…

It is an editor/exporter this is why I preferred to keep separated the blender settings from the ones to be exported.
I called it Yable, it stands for “yet another blender exporter” it is a continuosly work in progress, so check the site to know more.
Now it is in a quite stable state of development.

Further enanchements:
-Uv Exporting (on the way);
-Better coding style (OO);
-Total Gui restyling (Have you heard about MHGUI?);
-Whatever comes into my mind.

On the site you will find some info on how to use Yable, it is not complete but it helps.
I hope that this script like others will all the blender user to appreciate the growing quality
of the Yafray renderer…
:smiley:

Have I forgot something…yes, the links:

http://www.kino3d.com/~yable/
and:
http://www.coala.uniovi.es/~jandro/noname/
Maybe in the future the link will change, so monitor the YAfray HomePage or this thread to know some news.

Happy Blending!!

Andrea

Nice job. The image you made using yafray and yable made me interested in it… I’m gonna test it when I’ve got time.

btw : ever thought about coding it in the source ?

You already know what I think, but I’ll say it again, nice work Andrea!

To hannibar: The hemilight is now better, to get the same imagequality as in that picture, you now need quite a bit less than the 800 samples Andrea used, which also means that it is faster now.
Jandro also added better anti-aliasing as well as other optimizations to the code. I’m not sure when it will be released though.

Looks like a nice script but for some reason I seem to be having a problem… probably stems from the fact that I barely know how to use yafray and don’t actually understand all of the settings I used when I exported :stuck_out_tongue: Anyways when I try to “yafray firsttest.xml” it loads the mesh files, then on Sphere.001.xml.gz it says “Exception: STATUS_ACCESS_VIOLATION” and something about a stack trace o_O If anyone knows what this means and/or what to do to fix it… please let me know :slight_smile: thanks

Thanks hannibar … what you want to say with this? Well It could be the late hour or the fact that English is not my language … What source you mean, Yafray?

btw : ever thought about coding it in the source ?

To rivwanderer:

“Exception: STATUS_ACCESS_VIOLATION”

So, it happens when yafray execute?
I really don’t know … it is the first time I see this advert.

But I’m sure that Jandro (the guy who wrote yafray) follow this thread so maybe he’s got an idea
of what’s happening…if you want you can send me via private email your xml along with the tar.gz meshes so I can test it … (but please I’m one of the last with a slow connection so stay under 1mega :wink: ).

But let me sppend some words about what yable can export:
-all meshes, until now it export ALL layers. So if you got subdivision mesh they will be exported without the “subdivision” so provide to convert them to meshes if you want to see
the “sudivided meshes” in your xml scene;

-yafray doesn’t like void meshes…I mean meshes with no point. In that case yable will export it making yafray crash. I have to fix it;

-yafray doesn’t like as well points belonging to meshes that are, how to say, appended … I mean, points that doesn’t share edges with other points … in the xml file they have the following description:
<p x=“nan” y=“nan” z=“nan”/> very nice, isn’t it?

So, some crashes of yafray are due to the fact that yable does not do a good cleaning of the mesh. In some cases I had to clean myself the meshes in blender and than updating the mesh while exporting.

You already know what I think, but I’ll say it again, nice work Andrea!

Thanks, I know but It is a pleasure to hear it from you.

Thanks hannibar … what you want to say with this? Well It could be the late hour or the fact that English is not my language … What source you mean, Yafray?

[quote]
btw : ever thought about coding it in the source ?

[/quote]

Sorry, I wasn’t very clear about that. I meant the blender source. It would be nice to see yafray well integrated in blender for example.

After exporting I got this error by yafray when trying to render the exported scene.

C:\yafray&gt;yafray c:\yafray_export\yafray_test\myscene.xml
Gramar loaded, starting parser ...
Loading file C:\yafray_export\yafray_test\Meshes\Bolleke.xml.gz
      6 [main] yafray 1656 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION

  28875 [main] yafray 1656 open_stackdumpfile: Dumping stack trace to yafray.exe
.stackdump

the yafray.exe.stackdump says

Exception: STATUS_ACCESS_VIOLATION at eip=004C2330
eax=0022FB10 ebx=100537E0 ecx=2E6C6D78 edx=000000A1 esi=004C51B0 edi=00000000
ebp=0022EF20 esp=0022EE7C program=C:\yafray\yafray.exe
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame     Function  Args
0022EF20  004C2330  (0022FCE0, 000000A1, 00000000, 004BC1DD)
0022F180  004BCBC8  (0022FCE0, 00437310, 0022FEB0, 004403B9)
0022FEB0  00440A2E  (00000002, 10040328, 10040278, 00000001)
0022FF30  61005B8E  (610C29AC, FFFFFFFE, 000007E4, 610C28D0)
0022FF90  61005E2C  (00000000, 00000000, 00000000, 80576C70)
0022FFB0  0047EBA2  (0043736C, 037F0009, 0022FFF0, 77E5EB69)
0022FFC0  0040103C  (0079005C, 00660061, 7FFDF000, F4080CF4)
0022FFF0  77E5EB69  (00401000, 00000000, 78746341, 00000020)
End of stack trace

After a few experiments I’ve come to the conclusion that yafray can’t read the object files generated by the script. (I replaced the objects by a standard yafray sphere for example, and it worked, it rendered) But as long as I use meshes generated by the script, it gives these kind of errors?

edit : nevermind here

when i get the selected object (any mesh) to abjust the material settings script crushes and here is what blender says :


Traceback (most recent call last):
  File "c:\Program Files\Blender\Python\yable-beta05.py", line 798, in bevent
    worked = getSelectedObject()
  File "c:\Program Files\Blender\Python\yable-beta05.py", line 1432, in getSelec
tedObject
    blcolors = retrieve_colors(selectedname)
  File "c:\Program Files\Blender\Python\yable-beta05.py", line 1182, in retrieve
_colors
    obcolor[2]=[mt.mirR, mt.mirG, mt.mirB]
SystemError: error return without exception set

.

I get the same error…

Traceback (most recent call last):
  File "yable-beta05.py", line 798, in bevent
    worked = getSelectedObject()
  File "yable-beta05.py", line 1432, in getSelectedObject
    blcolors = retrieve_colors(selectedname)
  File "yable-beta05.py", line 1182, in retrieve_colors
    obcolor[2]=[mt.mirR, mt.mirG, mt.mirB]
SystemError: error return without exception set

I am running it under Blender 2.23…

wow…yable is not bugfree!!
YeaH…I got the same problem too. :-?

The problem is that the last test I have made (after adding the retrieve function) I used only publisher2.25 …

the problem comes from the line:

line 1182: obcolor[2]=[mt.mirR, mt.mirG, mt.mirB]

the Python API of Creator2.23 call these fields in a different way.

If you want you can modify the above line in the following way:

		
if BL_VERSION&lt;=223:
        obcolor[2]=[mt.MirR, mt.MirG, mt.MirB]
else:
	obcolor[1]=[mt.specR, mt.specG, mt.specB]

check the indentation…

I’m so sorry for the inconvenience…now I upload the modified version at the usual link.

http://www.kino3d.com/~yable/

Ah!

I AM NOT BUGFREE:

In the above post I made a mistake!!! :frowning:
The correct code is:

				if BL_VERSION&lt;=223:
				
					obcolor[2]=[mt.MirR, mt.MirG, mt.MirB]
				else:
					obcolor[1]=[mt.mirR, mt.mirG, mt.mirB]

Sorry again

Oh… hehehe, thanx… will correct that…

To hannibar:

It seems that you run windows, well I haven’t made any test on it.

I’d like to know if others running yable on windows got the same problem…let me know.
On my own I’ll test yable on windows tomorrow.

Andrea

Got it to
running yable-beta05 on Windows 98

Gramar loaded, starting parser ... 
Loading file C:\yafray_export\yafray_test\Meshes\Bolleke.xml.gz 
      6 [main] yafray 1656 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 

  28875 [main] yafray 1656 open_stackdumpfile: Dumping stack trace to yafray.exe 
.stackdump 

YAFRAY.EXE.stackdump says:

Exception: STATUS_ACCESS_VIOLATION at eip=004C2330
eax=00EBF858 ebx=100537C8 ecx=3130302E edx=000000A1 esi=004C51B0 edi=00000000
ebp=00EBEC68 esp=00EBEBC4 program=C:\YAFRAY\YAFRAY.EXE
cs=015F ds=0167 es=0167 fs=72FF gs=0000 ss=0167
Stack trace:
Frame     Function  Args
00EBEC68  004C2330  (00EBFA28, 000000A1, 00000000, 004BC1DD)
00EBEEC8  004BCBC8  (00EBFA28, 00437310, 00EBFBF8, 004403B9)
00EBFBF8  00440A2E  (00000002, 10040AE8, 10040278, 610705EB)
00EBFDA8  61005B8E  (610C29AC, FFFFFFFE, 00000014, 610C28D0)
00EBFE08  61005E2C  (00000000, 00000000, BFFC9490, 00EBFF68)
00EBFE28  0047EBA2  (0043736C, 037F0500, 00EBFF78, BFF8B537)
00EBFE38  0040103C  (00000000, 81745798, 00CB0000, 72666159)
00EBFF78  BFF8B537  (81745918, 81745798, 00000008, 00000000)
 142636 [main] YAFRAY 1802459 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
 143487 [main] YAFRAY 1802459 handle_exceptions: Error while dumping state (probably corrupted stack)

material bug fixed ok .Script “runs” now in Creator2.23 as well as in Publisher2.25

I found a way to render anyway.
When you open the object file in note pad or another simple text editor, you can copy paste everything from that file in the .xml between these two tags.
<mesh>

</mesh>

It works, but it isn’t ideal. At least it has given me the oppertunity to do some tests.

It seems that some of you got problems with the include tag.
I think that I will add a feature that will disable it just to avoid this annoying problem to
continously copy&paste the object info…I will let you know when done.

andrea

On http://kino3d.com/~yable you can find a new version of yable…I added a button called “!inc” which disables the include tag. In this case you will get a single and monolithic xml.
I have also modified the point precision (i used %.10f to export points coordinates, now back to %f).
Andrea

I see there is a bug in yafray that only happens on windows with the include tag. Well, I have to say that we don’t test windows version :slight_smile: We only compile it, try to render and give it away.

I’ll take a look at that bug and at the void mesh bug.

!inc button
script works nice
and yafray renders scene without problems
in Windows98

mm … maybe a save settings button ?