Sandbox Learn
Register Log In

Loki3D

Sandbox

Learn


Register

Log In

Tutorials

Basics: Geometry

The first thing you'll need to do is create a Graph. A Graph contains the scene you're creating, and references to other assets such as textures or models. From your account Graphs page, click the New Graph button.

New Graph

Editor

Creating a new Graph will open the editor for the graph.

Editor

The scene graph has a camera node by default. The camera views the scene and without it nothing will be rendered. A scene should have at least a camera in it.

Add A Sphere

Right-click (or long-press on touchscreen) on the Graph Panel and the node creation menu is displayed. Select Geometry / Shapes / Sphere to create a Sphere node. Create Sphere
A Sphere Node is a type of Geometry Node, which in this case creates a sphere mesh. The sphere is rendered with the default material. Sphere Node
With the sphere node selected, the Inspector Panel is presented where you can change the properties of the sphere.

Sphere Properties

Loki3D is a procedural system, meaning nodes compute their outputs as needed. Select the Sphere node and the Inspector for it will be displayed. Changing the properties of the Sphere node will regenerate the sphere geometry based on the new values.

Sphere Properties

Add An Object To Move The Sphere

The sphere is selectable and rendered, but it's not movable. This is because it has geometry, but it doesn't have a transform. To be able to move the sphere, you'll want to create an Object node.

Right-click on the graph panel and the node menu is displayed. Select Scene / Object to create an Object node.

Create Object

Objects are nodes that control the rendering of geometry. They have transform properties, such as position and scale, and can take a connection to geometry and optionally a material. Moving an object does not affect the Geometry, so that will not need to be updated. Instead, the Object transform just affects the drawing of the geometry and where it is in the scene.

Connect To Sphere To The Object

Click-drag from the Geometry output socket on the Sphere node and drop the connection line onto the Object node. If there is only one possible connection socket on the object, it will automatically connect. Otherwise, it will ask you which input you want to connect to.

Visually, nothing will have changed because the sphere was already rendering. But now if you select the sphere in the Scene viewport, or select the Object node, you will get a Move manipulator.

Object Manipulators

When an object node is selected, the object will be highlighted in the Scene Panel, and manipulators will be available to interactivly move, rotate, or scale the object.

Manipulators

Deform The Sphere

Geometry nodes can not only create geometry, but they can also modify geometry. Right-click on the Graph Panel and select Geometry / Modifiers / GeoNoise. The GeoNoise node deforms geometry using a noise function.

GeoNoise node

As it is, there sphere hasn't changed because the noise node hasn't been connected yet. Click-drag from the geometry output socket of the Sphere node and drop it onto the Noise node. Then click-drag from the geometry output socket of the Noise node and drop it onto the Object node.

Animating Noise

The sphere is now deformed, in a blobby sort of way, but it's static and not very interesting. We'll animate some of the properties of the noise deformer. Select the noise node and you can try changing some of the properties to see how the deformation changes. Try using the slider control on the Offset x property. The deformation of the sphere changes as you do this.

The Offset property of GeoNoise is a Vector3, which means we can connect a Vector3 node output to it. Right-click on the graph panel and select Core / Value / Vector3 to create a Vector3 node, which produces a Vector3 output than can be connected to the GeoNoise Offst. Click-drag from the vec3 output port of Vector3 to the Offset input port of GeoNoise.

It's still not animated, so right-click on the graph and select Core / Util / Time. Now click-drag from the s output port of Time (seconds) to the x input port of Vector3. Now the Vector3 x value will be set to the current time, and the that sets the Offset property of the GeoNoise, changing its value every frame.

Scaling Time

You can speed up the animation by scaling time. The time node has a scale property that does this for you. Select the time node and change it's Scale property to 2. Now if you play the scene, the deformation will be happening twice as fast.

Adding Other Modifiers

Next we'll modify the vertex colors of the sphere, make it a little more interesting. Right-click on the graph and select Geometry / Modifiers / Geometry Color. Click-drag from the Geometry output port of GeoNoise to the Geometry input port of GeoColor. Then click-drag from the Geometry output port of GeoColor to the Geometry input port of Object, which will replace its previous connection. Select the GeoColor node, and in the Inspector Panel, change Type to Bounding Box. Now the sphere will be colored with vertex colors, which are calculated from the bounding box of the geometry.