Hi Jacob,
To follow up on this: indeed, for Chrono::Vehicle I opted to
implement an alternative way for POV-Ray rendering. Unlike the
approach in Chrono::Postprocess, where a POV-Ray script is
generated for each desired frame, with the approach adopted in
Chrono::Vehicle, you generate one data file for each desired
frame. These data files can then be processed (one at a time or
in batch) by a single, common POV-Ray script. This approach is
more flexible and more scalable.
Note that we plan on eventually redesigning the POV-Ray support in Chrono::Postprocess.
Coming back to Chrono::Vehicle, rendering with POV-Ray is a
topic that is currently not properly documented anywhere, so let
me try to fill in some of this gap here.
What you need to do is simply invoke the utility function WriteShapesPovray(), once for each desired render frame, passing it a file name that encodes the frame number. Because the way the POV-Ray script is written (see below), I suggest you generate these file names such that the resulting data files are all placed in a sub-directory POVRAY of the output folder (just like it's done in our demos). Running the simulation will then generate one data file per render frame. These are ASCII output files that are actually independent of POV-Ray (they simply contain system body states, joint information, and information of the visual assets at the particular simulation time for which they were generated).
With Chrono::Vehicle, in the directory src/demos/vehicle, we distribute a POV-Ray script (renderZ.pov) that can be used (maybe with some minor modifications) to render the scene using one of the above data files, or else a sequence of such data files. To use it, copy it from the Chrono source directory to the output directory, at the same level as the POVRAY directory that contains the output data files. Then make any required modifications to the script. With one exception, most of these are at the top of the script (under the section "OPTIONS"). You can experiment with them, but the more important ones are:
I realize this work flow is not that streamlined and requires a bit of tweaking and user intervention. As I mentioned, when we get a chance we will work on improving this through Chrono::Postprocess.
Finally, as Mike mentioned, the time stepping of a vehicle system is performed through the wrapper Advance() functions, so there's no need (indeed, it's an error) to also explicitly call DoStepDynamics() on the underlying ChSystem of a vehicle object. That is done in ChVehicle::Advance().
I hope this helps and that you manage to generate the renderings
you want. Do not hesitate to ask for further clarifications.
Regards,
--Radu
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To post to this group, send email to projec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.