Notice: Array to string conversion in /var/www/wiki.sourcebinder.org/includes/Setup.php on line 304

Warning: Parameter 1 to Language::getMagic() expected to be a reference, value given in /var/www/wiki.sourcebinder.org/includes/StubObject.php on line 58
Creating a 3D torus and rotate it with mouse - SourceBinder Wiki

Creating a 3D torus and rotate it with mouse

From SourceBinder Wiki

Jump to: navigation, search

This tutorial shows you how to create a simple 3D object in SourceBinder.

There're a couple of 3d engines integrated into SourceBinder like Papervision or Away. Let's say you use Papervision in this composition.

1. First step is to put a PapervisionRenderer node into the canvas. Double click on an empty area and select this node, then connect it to the Output node.

3dtut1.jpg


2. After that, put a torus in place. Select the Torus3D node and connect it to the PapervisionRenderer node. When you drag the connection to the PapervisionRenderer node, a list of attributes appear. These attributes are the input attributes of this node. In this case, the output type is Vertices3D, this is coming from the Torus3D node. The renderer node has 2 inputs that have this type (meshes and pushMesh), hence, SourceBinder can't decide which is the right so you have to choose. Select the meshes input.

3dtut2.jpg

3dtut3.jpg


3. Put a material onto the torus. Let's say, you'd like Gouraud one, so, select the GouraudMaterial node and then connect it to the Torus3D node

3dtut4.jpg


4. It's getting better and better. Make the torus bigger a bit. Double click on the Torus3D node and set the scale 20.

3dtut5.jpg

3dtut6.jpg


5. Put a camera into the game. You need a Camera3D node and then you've to connect it to the PapervisionRenderer node When you drag the connection to the renderer node you're asked which attribute you'd select, choose the camera

3dtut7.jpg


6. Make it move Double click on the Camera3D node and select the hover attribute.

3dtut8.jpg


congratulation, it's done. Here you can find this composition.

Personal tools