I started first by trying to model an RBS with Blender. I quickly realized that doing anything in Blender takes quite a time commitment and has a steep learning curve. I tried evaluating some other 3D modeling programs but every package seemed too difficult to use to build an RBS for my apparently little brain.
I realized quickly that whenever I made a virtual 3D model, I would need to be able to easily build it and modify it. Well, modifying a rolling ball sculpture has consequences such that any change made higher up will affect a portion of the track lower down. Being a computer programmer kind of guy, I thought it would be interesting to try to make a virtual model programmactically which would give me the freedom of making something which could be very accurate and forgiving as far as modifying the model.
Remove these ads by
Signing UpStep 1: Use VRML to Create a simple 3D Virtual Model
VRML allows you to describe a 3D scene by using primitives like cubes, spheres, extrusions, meshes, etc. There's options for placing an object or a group of objects in xyz space as well as the ability to scale and rotate them. VRML is fairly easy to learn and use. Since it has been around a while, there's plenty of example code on the web so google to your heart's content.
To create a VRML file, you simple create a file using notepad or your favorite text editor and create it with a ".wrl" extension.
On the first line you put:
#VRML V2.0 utf8
Then you put your code for your shape or shapes. For an RBS I basically use Extrusions for everything. Here's an example of a RBS Rail:
Transform {
translation 0 0 0
children Shape {
appearance Appearance {
material Material {
diffuseColor 0.757827 0.771796 0.771797
ambientIntensity 0.5
specularColor 0.708205 0.708205 0.708205
emissiveColor 0.000000 0.000000 0.000000
shininess 1
transparency 0.000000
} # end material
} # end appearance
geometry Extrusion {
beginCap TRUE
endCap TRUE
creaseAngle 0
solid TRUE
crossSection [
0.00150000 0.00000000,
0.00121353 0.00088168,
0.00046353 0.00142658,
-0.00046352 0.00142658,
-0.00121353 0.00088168,
-0.00150000 0.00000000,
-0.00121353 -0.00088168,
-0.00046353 -0.00142658,
0.00046352 -0.00142659,
0.00121352 -0.00088168,
0.00150000 0.00000000
] # end cross section
spine [
0 0 0,
0 0 -0.01,
0 -0.01 -0.02,
0 -0.02 -0.02
] # end spine
} # end extrusion
} # end shape
}
You can end with this code but it's not really necessary usually:
NavigationInfo{
type "EXAMINE"
} # end NavigationInfo
So what does it all mean?
The first line identifies a VRML file.
The "geometry Extrusion" section defines the extrusion with endcaps, a circular crosssection of xy points, which gets extruded across 4 xyz points.
The "Shape" section defines attributes about the shape which surrounds the geometry Extrusion section.
The "Transform" section defines either where to move the object xyz or scale or rotate the object. Several Transforms can surround other transforms. So, for example the inside transform can be for rotation, there could be another that surrounds that transform that could be for scale, and another transform which surrounds both of the others which could be for xyz translation.
The "NavigationInfo" section is for some VRML viewers to know what to do. You can go into examine mode, or go into flythrough mode, there may be other modes you could do, I don't know them all.








































Visit Our Store »
Go Pro Today »




Thanks for posting!