> For the complete documentation index, see [llms.txt](https://support.rendered.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.rendered.ai/application-user-guides/tutorials/creating-and-using-graphs/graph-best-practices.md).

# Graph Best Practices

The Rendered.ai platform exposes a rich interface to manipulate graphs for generating a wide variety of datasets. While generated images and videos have virtually infinite randomness, the graph parameters provide for the control one needs when addressing specific computer vision training and validation issues. These guidelines for graph editing help users get the most from Rendered.ai channels.

#### Graph Basics <a href="#graph-basics" id="graph-basics"></a>

A basic graph performs three functions - object creation, scene composition, and scene rendering. Most channels are built with a set of objects of interest so the graph will have one or more nodes that create those objects. Objects of interest are important because they are used for generating object annotations. Another node creates the scene and places objects of interest in it. The scene may require other components such as a background image and a sensor. Finally, a simulator node renders the output of the scene into a synthetic image.

The following is a basic graph that performs these three operations.

<figure><img src="https://3091318601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbPMRyh7BHNPMVqv2031A%2Fuploads%2F0TMbhH3rFIQ2sv5cIGsb%2FSimple%20Graph.png?alt=media&amp;token=0b610f3c-e89a-4d94-ab31-3e940d4ef976" alt=""><figcaption><p>Simple Graph</p></figcaption></figure>

In the above graph, the *Yo-yo* node creates a yo-yo generator that is passed to the *RandomPlacement* node. The *RandomPlacement* node creates a scene and makes a cloud of yo-yos because it calls the *Yo-yo* generator 25 times and places the objects randomly in the scene. The drop object node takes the Yo-yo's and drops them into a container that is on a floor. The *RenderNode* then renders the scene.

<figure><img src="https://3091318601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbPMRyh7BHNPMVqv2031A%2Fuploads%2FoAINhxzaxAWYpaMCuoIB%2FSimple%20Graph%20Image.png?alt=media&amp;token=0d07e1de-7617-4cfb-bf9c-c0f02ce70527" alt=""><figcaption><p>Rendered Scene</p></figcaption></figure>

#### Generators: Objects and Modifiers <a href="#generators-objects-and-modifiers" id="generators-objects-and-modifiers"></a>

Though not required, channels developed by Rendered.ai use generators for objects. An object generator is a factory that provides new instances of the objects as many times as the code requests one. The Ana generator class has a weight that can be used in a placement node. By using object generators instead of manually adding objects, a scene can be built procedurally based on the structure of the graph.

Object modifiers are generators with children and make changes to the children generators. For example, the *ColorVariation* modifier adds a call to the color method to it’s children.

<figure><img src="https://3091318601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbPMRyh7BHNPMVqv2031A%2Fuploads%2F1RXjFi6b0KcLaxkrRbq3%2FColor%20Variation%20Modifier.png?alt=media&amp;token=f4e84917-4ec4-4f18-9f6c-0c66a54ae9e2" alt=""><figcaption><p>Color Variation Modifier</p></figcaption></figure>

<figure><img src="https://3091318601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbPMRyh7BHNPMVqv2031A%2Fuploads%2FdEkG2yhaJ9W9VlGwLmjf%2FColor%20Variation%20Image.png?alt=media&amp;token=878a32c5-070a-4c2f-a783-3218e2c96bc2" alt=""><figcaption><p>Image With Color Variation</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.rendered.ai/application-user-guides/tutorials/creating-and-using-graphs/graph-best-practices.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
