Bus Scripting (1 Viewer)

JDCustard

Founder of JDDEV
Aug 4, 2016
147
7
204
Hello, is there any kind of template for the bus structure. I just want to get some parts showing in omsi first, thanks.
Here is what I have so far:
******************************************************************
Bodywork
******************************************************************
[mesh]
PP_body.o3d

[illumination_interior]
-1
0
1
2
 

Advertisement

JDCustard

Founder of JDDEV
Aug 4, 2016
147
7
204
I'd recommend changing the [illumination_interior] section to 4 -1s or removing it entirely. I suspect you have no interior lights defined yet, so telling Omsi which of them to use to light that mesh is only going to cause it great confusion.
I found the problem, it was due to a problem with the bus file and is now showing in the game, also, do you have to reference the materials used in the model file?
 

whistlehead

Alias Mr Hackenbacker
UKDT
Add-on London Team
Dec 10, 2015
1,714
41
3,549
You only reference the materials used if you're modifying them in some way - for instance, if you're making "textureName.tga" transparent, you would add under the mesh:

Code:
[matl]
textureName.tga
0       <---------------- Number of texture instance - where a texture is used in more than one material, the materials are numbered sequentially from 0 upwards in order of use

[matl_alpha]     <-------------- Says you want an alpha mode on this material
2                <------------------- Type of alpha mode you want, in this case graded with the alpha channel of the texture

Otherwise though, there's no need :)
 

JDCustard

Founder of JDDEV
Aug 4, 2016
147
7
204
You only reference the materials used if you're modifying them in some way - for instance, if you're making "textureName.tga" transparent, you would add under the mesh:

Code:
[matl]
textureName.tga
0       <---------------- Number of texture instance - where a texture is used in more than one material, the materials are numbered sequentially from 0 upwards in order of use

[matl_alpha]     <-------------- Says you want an alpha mode on this material
2                <------------------- Type of alpha mode you want, in this case graded with the alpha channel of the texture

Otherwise though, there's no need :)
I would like to thank you two for helping me! Such a great community here. But I have another question and likely more in the future but on the object, a side of the mesh is see through in omsi and again not in other programs, it can be a bit glitchy sometimes can't it:)
 

whistlehead

Alias Mr Hackenbacker
UKDT
Add-on London Team
Dec 10, 2015
1,714
41
3,549
By default Blender shows each face as having two sides, wheras OMSI only displays the 'principal' side, as it were. On the right hand toolbar in the 3D window, under "Shading" there's a toggle called "Backface culling". If you turn this on, it'll show you the faces as they will appear in OMSI:
0LHsrJDCb2ZNmQghE1uoIQ7Cj2XL0CpZ.png


Then in edit mode on the left hand toolbar, you have buttons to "Flip" and "Recalculate" the normals of the faces in the mesh, i.e. which way the faces are facing:
0LHsrJDCb2ZNmQghE1uoIQ7Cj2XL0CpZ.png


Normally, using "Recalculate" will get you the solution you need because it'll make all the faces which are connected to each other point in the same direction. Where this falls down is if you're modelling things like ceilings separately from walls, because blender thinks "Hmm, this is upside down, better turn it the other way out" - and then you have to flip the direction of the faces manually.

Finally, remember to ctrl+A and apply scale in object mode, as if you've applied a negative scale at any point that can cause lighting issues in-game. If doing so turns things inside out, just use the unify or flip direction buttons to fix it.

And thanks very much, we try our best :)
 
Last edited by a moderator:

Advertisement

JDCustard

Founder of JDDEV
Aug 4, 2016
147
7
204
By default Blender shows each face as having two sides, wheras OMSI only displays the 'principal' side, as it were. On the right hand toolbar in the 3D window, under "Shading" there's a toggle called "Backface culling". If you turn this on, it'll show you the faces as they will appear in OMSI:
xCjxW5QJRYtk2xPSoulFxY3p4QeRrEq5.png


Then in edit mode on the left hand toolbar, you have buttons to "Flip" and "Recalculate" the normals of the faces in the mesh, i.e. which way the faces are facing:
xCjxW5QJRYtk2xPSoulFxY3p4QeRrEq5.png


Normally, using "Recalculate" will get you the solution you need because it'll make all the faces which are connected to each other point in the same direction. Where this falls down is if you're modelling things like ceilings separately from walls, because blender thinks "Hmm, this is upside down, better turn it the other way out" - and then you have to flip the direction of the faces manually.

Finally, remember to ctrl+A and apply scale in object mode, as if you've applied a negative scale at any point that can cause lighting issues in-game. If doing so turns things inside out, just use the unify or flip direction buttons to fix it.

And thanks very much, we try our best :)
Thank you so much, and for now I have one more question before I can crack on with everything. So materials right, is it better to have everything as textures as if I set some things as colors it won't show up in omsi right? I assume that is how repaints work then?

Hopefully I can start bringing more content to the community.
 
Last edited by a moderator:

whistlehead

Alias Mr Hackenbacker
UKDT
Add-on London Team
Dec 10, 2015
1,714
41
3,549
For OMSI, it's always better to make materials using a texture. For repaints you'll want to make a nice repaint template, which is explained here:



Remember that to make it easier for people doing repaints, when making the exterior template you'll want to line everything up as best as you can - take a look at the C400 template to see what I mean

For more tutorials, the ones I always point people to are here: 44090 Digital Models | Tutorials The first two are for Blender 2.49b, but are very comprehensive, the third one you can ignore because it's for Trainz, the fourth one takes the content from the first two in less depth and applies it to the current version.
 

JDCustard

Founder of JDDEV
Aug 4, 2016
147
7
204
For OMSI, it's always better to make materials using a texture. For repaints you'll want to make a nice repaint template, which is explained here:



Remember that to make it easier for people doing repaints, when making the exterior template you'll want to line everything up as best as you can - take a look at the C400 template to see what I mean

For more tutorials, the ones I always point people to are here: 44090 Digital Models | Tutorials The first two are for Blender 2.49b, but are very comprehensive, the third one you can ignore because it's for Trainz, the fourth one takes the content from the first two in less depth and applies it to the current version.

Thank you so much for everything, think I know how I am going to do things now. I have decided to go for a Plaxton Primo as its more uncommon so don't want to do a popular bus first because them buses have to be perfect. Thanks.
 

whistlehead

Alias Mr Hackenbacker
UKDT
Add-on London Team
Dec 10, 2015
1,714
41
3,549
Looks like it might be a triangulation error, OMSI doesn't like faces with more than three sides. If you select things and hit ctrl+T in Blender, that should sort it.

Also, are you sure you've got the right cab? A Primo has a cab like this:
Kg0Aa1lIyYWfgYAju-EFMVY5xEWhx02Z.jpeg

(I presume that the parcel tape is standard issue...)

What you're doing looks more like a Centro with a VDL cab:
Kg0Aa1lIyYWfgYAju-EFMVY5xEWhx02Z.jpeg
 
Last edited by a moderator:

Advertisement

This thread is more than 7 years old.

Your message may be considered spam for the following reasons:

Users who are viewing this thread