Changing handedness?

"How can I set Moray to use the same handedness as POV-Ray? How can I set POV-Ray to use the same handedness as Moray?"

The answer to the first question is: You can't.

But you can change the handedness in POV-Ray. By default POV-Ray uses a left-handed system. You can change it to right-handed by adding the following keyword to the camera definition:

  right <-4/3,0,0>

Now you can use coordinates like in Moray, with x pointing to the right, y pointing "inside" the screen and z pointing up.

This keyword also controls the aspect ratio of the image.

Moray objects get mirrored in POV-Ray

"When I use an object created with Moray directly in POV-Ray, the object is mirrored. What can I do?"

This is a direct consequence of the right-handedness of Moray and left-handedness of POV-Ray. You can convert Moray-generated objects to POV-Ray default handedness with these transformations:

{ MorayObject
  scale <1,1,-1>
  rotate x*90

Importing POV-Ray files

"How can I import my Pov-Ray scenes into Moray so I can work on them in there?"

The general answer is: I'm sorry but you can't.

There is a utility called pov2mdl which comes with Moray which converts POV-Ray 2.2 files to Moray mdl format, but it can't be used to convert files with new features of POV-Ray 3.x and newer.

How do Moray UDOs work?

(Answer by Johannes Hubert)

UDOs are User Defined Objects. A UDO file can contain several such objects, but for the sake of this answer let's assume that there is one object in the UDO.

Actually you will always have a pair of files: One UDO file and one INC file. Both are supplied by you (if you write them by hand) or some application that can export to Moray UDO format. They are not generated by Moray.

The UDO file contains a description of how the object should look in Moray. It is essentially a bunch of vertices and lines connecting them, telling Moray how to render the wireframe of the object. In Moray you can scale, rotate, translate and texture this "object" as you wish.

When exporting from Moray, the second file, the INC file, comes into play: It contains the description of the same object in POV-Ray scriptlanguage. It can contain *everything* POV-Ray understands. At the place in the scene where you used the UDO, Moray simply exports an include-statement for this INC file, and then applies all the transformations you did to the object.

A problem many beginners have with UDOs, is the filename of this INC file:

Let's say that you have a car-object, defined by a UDO (exported for example with sPatch). You call the object "car", and when exporting you get the filepair "car.udo" and "". You now want to look at your car and therefor create a simple Moray scene which you call "car.mdl". This is where the trouble comes from: When exporting, Moray creates a file "car.pov" and a file "" (and probably some other files). Thus the "" from Moray overwrites the "" that was exported with the UDO.

The solution: Give your UDO a filename different fromt the MDL! For example: car_udo.udo, and car.mdl.

Copyright © 2003