Objects - problem with vertices
5 posters
Page 1 of 1
Objects - problem with vertices
Could someone tell me what the problem is with below object definition?
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0 ;0
AddVertex,0.743,0,0 ;1
AddVertex,0.764,0,0 ;2
AddVertex,0.7795,-0.000400684,0 ;3
AddVertex,0.7275,-0.000400684,3 ;4
AddVertex,0.743,0,3 ;5
AddVertex,0.764,0,3 ;6
AddVertex,0.7795,-0.000400684,3 ;7
AddFace,0,4,5,1
AddFace,1,5,6,2
AddFace,2,6,7,3
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0 ;0
AddVertex,0.7175,-0.0143,0 ;1
AddVertex,0.7275,-0.000400684,3 ;2
AddVertex,0.7175,-0.0143,3 ;3
AddVertex,0.7795,-0.000400684,0 ;4
AddVertex,0.7895,-0.0143,0 ;5
AddVertex,0.7795,-0.000400684,3 ;6
AddVertex,0.7895,-0.0143,3 ;7
AddFace,1,3,2,0
AddFace,4,6,7,5 ; error: nonexisting vertex
SetColor,122,122,122
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0 ;0
AddVertex,0.743,0,0 ;1
AddVertex,0.764,0,0 ;2
AddVertex,0.7795,-0.000400684,0 ;3
AddVertex,0.7275,-0.000400684,3 ;4
AddVertex,0.743,0,3 ;5
AddVertex,0.764,0,3 ;6
AddVertex,0.7795,-0.000400684,3 ;7
AddFace,0,4,5,1
AddFace,1,5,6,2
AddFace,2,6,7,3
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0 ;0
AddVertex,0.7175,-0.0143,0 ;1
AddVertex,0.7275,-0.000400684,3 ;2
AddVertex,0.7175,-0.0143,3 ;3
AddVertex,0.7795,-0.000400684,0 ;4
AddVertex,0.7895,-0.0143,0 ;5
AddVertex,0.7795,-0.000400684,3 ;6
AddVertex,0.7895,-0.0143,3 ;7
AddFace,1,3,2,0
AddFace,4,6,7,5 ; error: nonexisting vertex
SetColor,122,122,122
liquid_- Posts : 26
Join date : 2012-05-15
Re: Objects - problem with vertices
Hi, what are you tying to produce, all that you have written produces a single line in object viewer, have you looked at object construction on the forum
mobile1- Posts : 136
Join date : 2011-08-22
Re: Objects - problem with vertices
1) Try to use a maximum of 3 decimal places (millimeter accuracy) unless absolutely necessary to use more.
2) You are missing the "SetColor" command after the first set of AddVertex + AddFace, it has to be defined separately for each set.
2) You are missing the "SetColor" command after the first set of AddVertex + AddFace, it has to be defined separately for each set.
Last edited by Derryck on Wed Sep 19, 2012 11:24 am; edited 1 time in total
Re: Objects - problem with vertices
- The object is syntactically correct.liquid_ wrote:Could someone tell me what the problem is with below object definition?
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0 ;0
AddVertex,0.743,0,0 ;1
AddVertex,0.764,0,0 ;2
AddVertex,0.7795,-0.000400684,0 ;3
AddVertex,0.7275,-0.000400684,3 ;4
AddVertex,0.743,0,3 ;5
AddVertex,0.764,0,3 ;6
AddVertex,0.7795,-0.000400684,3 ;7
AddFace,0,4,5,1
AddFace,1,5,6,2
AddFace,2,6,7,3
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0 ;0
AddVertex,0.7175,-0.0143,0 ;1
AddVertex,0.7275,-0.000400684,3 ;2
AddVertex,0.7175,-0.0143,3 ;3
AddVertex,0.7795,-0.000400684,0 ;4
AddVertex,0.7895,-0.0143,0 ;5
AddVertex,0.7795,-0.000400684,3 ;6
AddVertex,0.7895,-0.0143,3 ;7
AddFace,1,3,2,0
AddFace,4,6,7,5 ; error: nonexisting vertex
SetColor,122,122,122
- Omissing the SetColor statement is like setting SetColor,255,255,255 (white surface)
- The first CreateMeshBuilder section, corresponding to three adjacent and coplanar surfaces, can be semplified with the same visual result by defining a single surface with this alternative code:
- Code:
CreateMeshBuilder
AddVertex,0.7275,-0.000400684,0
AddVertex,0.7795,-0.000400684,0
AddVertex,0.7275,-0.000400684,3
AddVertex,0.7795,-0.000400684,3
AddFace,2,3,1,0
So the problem depends only on what you mean in practice reproduce, but I can't figure what it can be.
Re: Objects - problem with vertices
tof63 wrote:
- Omissing the SetColor statement is like setting SetColor,255,255,255 (white surface)
Sure, but then it really depends on what he is creating (perhaps it is a packet of chlorinated lime, who knows), as not many things are brilliantly white in real life. By the way, good to see you around, Luigi.
Re: Objects - problem with vertices
The values simply don't make sence. You should always use a maximum of 0.0x value, anything more is silly and a waste of time, same with your coordinates, always go to point 3, (o.xxx) nothing more is needed.
mrknowitall- Posts : 824
Join date : 2011-07-09
Age : 31
Location : W. Yorkshire
Re: Objects - problem with vertices
I think the problem was in wrong character written to the file around vertex 6. When I looked at the file on Linux there wasn't new line character there.
Anyway, thanks a lot for help.
You may be right saying that too much accuracy is waste of time but Object Bender does the same thing: evaluates new coordinates with full accuracy.
For those who were wondering what I was doing I attached the file. It's the most beautiful rail I've ever seen on BVE railroads. Of course, some may say it was also wasting the time but I wanted to get some practice in making objects from vertices and faces.
Anyway, thanks a lot for help.
You may be right saying that too much accuracy is waste of time but Object Bender does the same thing: evaluates new coordinates with full accuracy.
For those who were wondering what I was doing I attached the file. It's the most beautiful rail I've ever seen on BVE railroads. Of course, some may say it was also wasting the time but I wanted to get some practice in making objects from vertices and faces.
- Attachments
liquid_- Posts : 26
Join date : 2012-05-15
Re: Objects - problem with vertices
Copyng and pasting to/from the forum hid the problem to us.tof63 wrote:So the problem depends only on what ...
My best congratulations!
You have learned well the BVE object language writing its code in an elegant way, in contrast to those who complain the absence of a visual program to build objects...
Re: Objects - problem with vertices
It was also hidden to me as Windows displayed the contents correctly.tof63 wrote:Copyng and pasting to/from the forum hid the problem to us.
Well, it's not very easy but makes a lot of fun though.tof63 wrote:My best congratulations!
You have learned well the BVE object language writing its code in an elegant way, in contrast to those who complain the absence of a visual program to build objects...
liquid_- Posts : 26
Join date : 2012-05-15
Similar topics
» HS2: Objects needed
» Objects - using the texture
» Standard objects
» Two Switch objects
» Randomize objects
» Objects - using the texture
» Standard objects
» Two Switch objects
» Randomize objects
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|