X-Particles and Cycles 4D: Adding Geometry
Cycles 4D can render mesh objects and splines which are generated by X-Particles, and how to do that is explained on this page.
Simple geometry generation
X-Particles can generate polygon objects using its Generator object. But for simple geometry you don't need to use that if you are using Cycles 4D.
You first need to add a cyInstance tag to the emitter. Having done that, simply drag the polygon object(s) to generate into the Objects list in the tag, like so:
If you play the animation, the objects will be generated and rendered, but you will not see the objects in the viewport, only when rendered (e.g. in the real-time preview).
Note that Cycles 4D will choose randomly between the objects in the tag's Objects list.
Note: Cycles 4D will not render object hierarchies. That is, if you have a sphere which is the parent of a cube, and you drag the sphere into the object list of the tag, only the sphere will be rendered. If you want the actual hierarchy, make the sphere a child of a Connect object and drag the Connect object into the tag.
Generating splines
You can generate splines in the same way, just drag them into the list. The spline to be generated must have a Cycles 4D Curve tag or it will not be rendered.
Generating lights
It is not possible to generate lights using the cyInstance tag. You can generate them using an X-Particles Generator object, but they are not visible in the scene although they will add illumination.
However, it is very easy to generate visible lights if you use a mesh light. Simply create an object such as a sphere or some other polygon object (or spline), create an Object material with an Emission shader in it and apply it to the sphere. Then drag the sphere into the Objects list of the tag. If you do this you can access the particle colour for the light, and obtain results like this very simple scene:
There are no lights in this scene other than that emitted by the particles.
Adding materials
From the basic rendering page, if you want to render the particles themselves you should attach a Cycles 4D object material to the emitter. But if you want to add materials to the generated objects, the material must be added to the object, not the emitter.
Here is the cube rendered with a Color Ramp driven by the particle age. The node tree is the same one used in this example on the accessing particle data page:
The X-Particles Generator
You can still use the X-Particles Generator object to generate the objects. However, there are some issues with doing this. Since the Objects list in the cyInstance tag will be empty, Cycles 4D will render the particles. To stop them being visible and obscuring the generated objects, you will need to reduce the size multiplier in the tag to as low as possible (0.01%).
Secondly, if you use a material where some part of it is driven by a Particle Info node, such as the age-driven color ramp above, this will not work. You can still use other nodes such as diffuse, glossy, etc. but you cannot drive the material with particle data. The same applies to the X-Particles Sprite object.
The Generator will, of course, support object hierarchies, so this is an option if you really need the hierarchy and don't want to, or can't, use the Connect object.
For this reason it is recommended to use the cyInstance tag to generate geometry where possible.
Object size
If you generate objects using the cyInstance tag, the size of the resulting object is governed by two things: the particle radius and the Size Multiplier field, and any variation, in the tag. The particle radius can use variation and is affected by the Scale modifier in the usual way in X-Particles. The size multiplier is exactly that - it multiplies the radius by the field value, which can be keyframed, but of course it affects all particles irrespective of group or any other parameter.
If you use the Generator object to produce objects, this is completely unaffected by the size multiplier and the object size is controlled entirely by X-Particles itself.