Wings 3D Development Forum
POVRay plugin - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://www.wings3d.com/forum/forumdisplay.php?fid=12)
+--- Thread: POVRay plugin (/showthread.php?tid=24)

Pages: 1 2


POVRay plugin - Kagehi - 11-16-2012

Not sure if this was working previous to 3.6 or not, but I just had some issues with it... I took a poser model, converted it to obj, imported that into Wings3D, then tried to render via POVray.

Now, I ran into two problems. One was an object that was "missing":

object{ wl_0_Ambient
}

I get an error loading the file manually, and trying to render. However, a bigger problem seems to be that the parameters are wrong for running POVRay. It seems that, if you do not supply, in 3.6, a +i to your input file name, POVRay will assume that the file contains INI settings, not scene data, then complain that you passed it information that you shouldn't, specifically:

"Only /EDIT and /RENDER may be passed to previous instance"

I refer to this post, where someone else was talking about the same problem:

http://news.povray.org/povray.newusers/thread/%3C405ab37b$1@news.povray.org%3E/?ttop=240712&toff=900

I think, the only problem is just the missing "+i", for the input filename. Minor issue, but, it means that you can't use the POVRay export, or fix it, unless you set dialogs for the plugin to "on", instead of "auto", and use the revealed "export" option instead of the "render" option.

But, even then, there is still the odd missing object I mentioned. I have no idea if that is generated by Wings3d, or its something that Poser failed to export properly, or what, but.. it does prevent even an export from rendering, unless you comment out the lines.


RE: POVRay plugin - oort - 11-16-2012

Kagehi,
I just tried rendering a sphere with PovRay 3.6 and it worked fine. Are you exporting a file and then rendering from within PovRay? Try to use File > Render > PovRay.

If that is not an option, hopefully Micheus can help you. He has done a little bit of work on the PovRay plug-in if I remember right.

Since you are working with Poser models, I wonder if you have tried using PoseRay? PoseRay Site

oort


RE: POVRay plugin - micheus - 11-16-2012

Kagehi, can you provide some scene file for testing? (debug)

Have you tried to render directly on external Pov-Ray the file exported by the Render option? It used to be named <project_nam>_export.pov

One problem that I have experienced is the render fail because of the texture file path doesn't match - the plugin stores the entire path, instead of a relative path. When I move the project from a machine to an other I always get the error "No image rendered". I intend to fix this someday. Smile


RE: POVRay plugin - Kagehi - 11-16-2012

I did use the "render" option. I assumed that the problem was that the flag is missing, since its passing the file name for the POV file, without the +i in front of it, I might be wrong. This was just a quick test. All I did was export one of the standard Skeletons, from Poser and obj, making no changes, other than pulling the arms down to the sides, instead of pointing straight out, then imported from there. I haven't used Poseray at all, so, I figured I would use something familiar. lol

I think I have, however, figured out two things:

1. I was trying to run this against an open, single instance, copy of POVRay (do to running the scene manually, when I got an error the first time). I need to either turn single instance off, or leave it closed, for the thing to work right.

However, I do think I found why its generating an actual error when trying to render, and those two lines where not commented out. The last lines in the scene are "lights". The missing one in the scene seems to be an ambient light. POVRay doesn't define ambient as a light source, but it appears that Wings3D is exporting an object reference to such a light, but ***is not*** exporting a definition block for the ambient source (since it can't), the result is an error, caused by the fact that the resulting light source was never defined, so the name its been given doesn't reference any object that actually exists in the scene file. Woops!

This is probably easy enough to confirm, even without the huge file I was playing with. If it finds an ambient light, it either needs to ignore it, or use the correct definition for it, which isn't a light source, and thus, shouldn't have an "object" block for it anyway, never mind having one, and not having the #define for it. That definitely *is* a bug.

Hmm. Though.. Other possibility, I was looking at it from the Z direction, and had "tab smoothing" on, so... Maybe Wings3D is generating that ghost light, as a result of trying to show the scene from where you are viewing, when there are no lights, and no camera defined?


RE: POVRay plugin - micheus - 11-16-2012

(11-16-2012, 04:52 PM)Kagehi Wrote: The missing one in the scene seems to be an ambient light. POVRay doesn't define ambient as a light source, but it appears that Wings3D is exporting an object reference to such a light, but ***is not*** exporting a definition block for the ambient source (since it can't), the result is an error, caused by the fact that the resulting light source was never defined, so the name its been given doesn't reference any object that actually exists in the scene file. Woops!
That definitely *is* a bug.
Thanks for find it.
It exports lights as objects was my addition (at old forum).
I added it for make possible to use the "Light Groups" operation on Pov-Ray 3.6


RE: POVRay plugin - Kagehi - 11-17-2012

Hmm. And since POVRay treats ambient as either a global_settings, or an object attribute, not a light.. Wink


RE: POVRay plugin - micheus - 11-19-2012

I already fixed it and also I made changes to export relative paths of images used for texture (pigment/normal). It would be available on next release.

The update can be found here.


RE: POVRay plugin - Kagehi - 11-20-2012

Hmm. Guess I can try and see. lol I am using the one that has the CarveCSG stuff in it (though, some of the quirks of that thing are driving me totally nuts), so the "version" looks like 1.4.1.2012-05-22---22-53.

I would guess that this is 1.4.1.53?


RE: POVRay plugin - micheus - 11-21-2012

The important thing you should verify is the Erlang version used.
Go to the Erlang console and check it you see that version information on the top: Erlang R15B01 (erts-5.9.1) (at least that)


RE: POVRay plugin - sandman - 12-19-2012

Hi micheus,

I have found a small bug in the POVRay exporter, in which infinite light objects are misnamed.

The easiest way to generate the bug is to create a new wings model, with no custom lighting, and simply use View | Two Lights. When you export your scene to POVRay, open the file and go to the end. The light names are given as:


object{ wl_0_Infinite1
}
object{ wl_1_Infinite2
}

When they should be:

object{ wl_1_Infinite1
}
object{ wl_2_Infinite2
}


I hope this helps- I imagine that it is a quick and easy fix, as it looks like a simple fencepost (off by one) error. (Alternately, the declarations at the beginning of the file could be altered to match what's at the end). I am using the 1.5.0 beta (alpha?) but I think I remember seeing this awhile back the last time I used the POVRay exporter.

Thanks.