[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kpovmodeler-devel
Subject:    Renderman Exporter
From:       <david () david-williams ! info>
Date:       2004-10-12 20:16:01
Message-ID: 27871002$1097610775416c3617309e30.01984376 () config14 ! schlund ! de
[Download RAW message or body]


Hi all,

Firstly I would like to reassure you that the RenderMan exporter I
talked about has not been forgotten and is slowely progressing, I've
just ben busy finishing university and starting a new job. I have been
making some progress but have encountered some problems due to the
architecture of the  exporter framework which I thought were worth
mentioning here.

Essentially RenderMan requires things to appear in a certain order, for
example first you must define the global settings and camera and lights
must be declared before the objects they are to light. This is
different from POV-Ray which allows you to define elements in the scene
in any order. Now, it seems to me that when I call the serialize()
method on a node I have no control over the order in which children are
visited and so it is difficult to enforce constraints such as those
mentioned above.

My function for exporting the base Scene node therefore first searches
through the first level of the tree for a camera and exports that
before deleting it, then does the same for lights, and then exports the
geometry as normal. This hybrid approach is slightly messy and I can
see it getting worse when trying to export materials on objects.

So, I think I should refactor my code so that rather than calling
serialise() at all I simply visit the nodes I want in the order I want
them. While I could do this all within my exporter, it seems that some
of the functionality should be bult into the export framework. Perhaps
it would be appropriate for each node in a Scene to have a function
such a findChildOfType() or findAllChildrenOfType(). I can of course
add such functionality myself, but wanted to make sure it was
appropriate and that I hadn't missed some better way of achieving my
aims.

Hope that all makes sense,

David

List archive and information: https://mail.kde.org/mailman/listinfo/kpovmodeler-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic