View Full Version : Discussion Adding Clearview 3D objects without AC3D
othmanskn
Apr 09, 2006, 08:49 PM
http://clearviewrc.com/docs/CVCollision.html
With this freeflight mode, it is easy to detect coordinates as seen by Clearview and program it into AC3D object files.
http://www.ac3d.org/ac3d/man/ac3dfileformat.html
With the object files supplied by Stefan for the Schoolfield, we can just edit the coordinates in order to adapt to our scenery.
I shall try to edit these files for my tg_aru scenery, and shall document the steps so that others will find it easy to do, without purchasing ac3d.
I find it easier to edit text files rather than edit with a graphic program. It should be more productive.
If someone can beat me to it, please report.
This will make Clearview user supplied sceneries the best in the Web world.
othmanskn
Apr 10, 2006, 12:08 PM
Successful.
I just use the controls.ac file from Farmfield.
Recommeded ones are the polygons with 6 and 5 surfaces.
5 surfaces for cars.
6 surfaces for leaves and trees, under 2 separate objects.
One surface for the fence.
I don't use the instruction method of taking coordinates for all vertices although I tried it for my car in the picture. It is too tedious.
I managed to discover the location function which is just an offset of all the points.
I make an square with zero as the centre for the horizontal plane. The height no change, i.e. from zero to the correct height.. The "loc" parameter will determine the height from the bottom of the object.
Problems:
1. When the coordinates are displayed, cannot access the settings menu, or switch to other PC functions.
2. No space between the data lines tolerated.
Some program editors, tried to reformat the text file so crashing Clearview. REvert to wordpad.
3. Don't understand "rot", rotation, parameter. It means that the rectange canot be rotated in order to get a better adjustment. Easier to use squares or preferably cylinders but I can only get spheres from Farmfield.
4. Trying to move around using PC PS2 compatible joystick is too difficult despite reducijg sensitivity to the lowest, which is 1%. Why can't it be lower than 1%?
5. When it crashed, there is no indicator at all. Clearview retained the previous objects but won't allow any changes. That is how I know that the file had crashed. Checking using wordpad text editor, the program appeared to be normal. Could be due to some invisible formatting characters that are put into the file.
6. I don't understand the way the surfaces parameters are treated. attempts to correct the empty faces of a 4 face, polygon, crashed the object loading function without any error message.
7. The order at which the vertices are writtten down is important. Otherwise we cannot get polygons because the surfaces will look funny. Cannot just copy the lower 4 coordinate to the upper coordinates.
8. Make sure the "kids" parameter be given the correct number of objects written down. Use "find" function to count.
Samples:
4 SURFACES:
OBJECT poly
name "fence"
crease 45.000000
numvert 4
10.26 0 -22.84
-6.78 0 -25.74
-6.78 10 -25.74
10.26 10 -22.84
....
kids 0
The rest I don't touch. I tried but got burned.
For this single face, it is best to take all four coordinates.
5 SURFACES: for cars
OBJECT poly
name "car"
crease 45.000000
numvert 8
-4.7 0 -11.7
-8.2 0 -12.6
-4.3 0 -13.5
-8.9 0 -16.5
-8.9 1 -16.5
-4.3 1 -13.5
-8.2 1 -12.6
-4.7 1 -11.7
...
kids 0
6 SURFACES:
The most versatile becuase it can put floating object in the air with all surfaces detecting collisions.
The tree objec, modelled using 6 surfaces maybe too much but my atttempts at 4 surfaces failed miserably.
OBJECT poly
name "leaves"
loc -9.8 4 -13.8
crease 45.000000
numvert 8
0 0 7
7 0 0
0 0 -7
-7 0 0
-7 4 0
0 4 -7
7 4 0
0 4 7
numsurf 6
SURF 0x20
mat 3
refs 4
5 0 0
2 1 0
1 1 1
6 0 1
SURF 0x20
mat 3
refs 4
7 0 0
0 1 0
3 1 1
4 0 1
SURF 0x20
mat 3
refs 4
6 0 0
1 1 0
0 1 1
7 0 1
SURF 0x20
mat 3
refs 4
4 0 0
3 1 0
2 1 1
5 0 1
SURF 0x20
mat 3
refs 4
7 0 0
4 1 0
5 1 1
6 0 1
SURF 0x20
mat 3
refs 4
0 0 0
1 1 0
2 1 1
3 0 1
kids 0
OBJECT poly
name "tree"
loc -9.8 0 -13.8
crease 45.000000
numvert 8
0.5 0 0
0 0 -0.5
-0.5 0 0
0 0 0.5
0 4 0.5
-0.5 4 0
0 4 -0.5
0.5 4 0
numsurf 6
SURF 0x20
mat 3
refs 4
5 0 0
2 1 0
1 1 1
6 0 1
SURF 0x20
mat 3
refs 4
7 0 0
0 1 0
3 1 1
4 0 1
SURF 0x20
mat 3
refs 4
6 0 0
1 1 0
0 1 1
7 0 1
SURF 0x20
mat 3
refs 4
4 0 0
3 1 0
2 1 1
5 0 1
SURF 0x20
mat 3
refs 4
7 0 0
4 1 0
5 1 1
6 0 1
SURF 0x20
mat 3
refs 4
0 0 0
1 1 0
2 1 1
3 0 1
kids 0
Zaragon
Apr 10, 2006, 01:55 PM
Its an awful lot easier if you use AC3D as it handles all the correct formatting of the required data file and checks for invalid polygons etc. You can even use it to create/convert models.
othmanskn
Apr 10, 2006, 07:51 PM
Its an awful lot easier if you use AC3D as it handles all the correct formatting of the required data file and checks for invalid polygons etc. You can even use it to create/convert models.
Only if you've ac3d. I have the demo version that will last only for 30 days and I can use it to create special objects but since I have no intention of buying it, I feel guilty.
Although using CAD is easier in many ways, there are instances when programming text files is much easier and more productive.
I've managed to learn how to program the rot matrix from this site:
http://www.euclideanspace.com/maths/algebra/matrix/orthogonal/rotation/index.htm
If I am desperate, I'd like to create shapes for cars and trees but right now I am trying to test conversion software from free 3D software to ac3d format, or at least give the coordinates for the vertices.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.