Modeling for OpenBVE in Blender 3D editor
+5
Quork
Dexter
Delsin
leezer3
SP1900
9 posters
Page 1 of 2
Page 1 of 2 • 1, 2
Modeling for OpenBVE in Blender 3D editor
Hi!
I readed topic about easy way export models from Blender
Guys! It is not easy way! I want introduce easy way - plugin for working with OpenBVE *.csv geometry in Blender. You can download it here
http://github.com/maisvendoo/blenderCSV/ (add https to this link, now I can't post external links in this forum)
It is my own project for OpenBVE. This plugin used by my team for creation russian routes for OpenBVE in my university.
Now you can create models in Blender and export it direcionaly to *.csv format. Look some sreens in Github
You can use it now. Enjoy! Also, I'll be glad to all bug reports from you.
P.S.: Later I write full user manual about this plugin. Watch this topic.
Moderative edit: I made the link clickable. I'll see into enabling you to post links later.
-Quork
I readed topic about easy way export models from Blender
Guys! It is not easy way! I want introduce easy way - plugin for working with OpenBVE *.csv geometry in Blender. You can download it here
http://github.com/maisvendoo/blenderCSV/ (add https to this link, now I can't post external links in this forum)
It is my own project for OpenBVE. This plugin used by my team for creation russian routes for OpenBVE in my university.
Now you can create models in Blender and export it direcionaly to *.csv format. Look some sreens in Github
You can use it now. Enjoy! Also, I'll be glad to all bug reports from you.
P.S.: Later I write full user manual about this plugin. Watch this topic.
Moderative edit: I made the link clickable. I'll see into enabling you to post links later.
-Quork
Re: Modeling for OpenBVE in Blender 3D editor
Will be useful, thanks!
Speaking of Russian routes, I'm curious which you've covered, as I'm planning to build one.
Speaking of Russian routes, I'm curious which you've covered, as I'm planning to build one.
Delsin- Posts : 313
Join date : 2016-08-20
Re: Modeling for OpenBVE in Blender 3D editor
Today we build fictional route "Arbatov-Chernomorsk" for study OpenBVE route's building technology. Techology must be adapted for russian railway standards and our requirements. But later we are planing build routes by North Caucasus Railway (for example our mainline: Bataisk - Likhaya, etc.)
We use OpenBVE as system for 3D visualization for our railway simulators (with advanced dynamics, real cabine etc.). For example, now we work with Velaro RUS "Sapsan" train simulator. You can see video and more info in our site (by link in my profile info). Sorry, this site is in russian, but you can use Google Translate
We use OpenBVE as system for 3D visualization for our railway simulators (with advanced dynamics, real cabine etc.). For example, now we work with Velaro RUS "Sapsan" train simulator. You can see video and more info in our site (by link in my profile info). Sorry, this site is in russian, but you can use Google Translate
Re: Modeling for OpenBVE in Blender 3D editor
Amazing stuff this, I think the Russian section of openBVE has been abandoned for a long time, most routes around that part of Europe come from Hungary. I have found a few routes from the old Moscow metro, they’re very basic but it’s good that more Russian routes are coming along
SP1900- Posts : 302
Join date : 2017-12-08
Age : 22
Re: Modeling for OpenBVE in Blender 3D editor
I 've seen routes for russian metro too, but I've never seen routes (and trains) for russian mainline railways. Maybe, my team is first, who try build such routes.
OpenBVE is not so popular in Russia. Reasons: weak dynamics model of trains and weak capabilies for locomotive customization. Russian locomotives has specific equpment, for example brakes equipment (brake valves model 394/395 and so on). Russian simmers like hardcore realism in locomotive control process. Today most popular in Russia is ZDSimulator from Ukraine developers, but it is no free and costs money.
I and my team use OpenBVE as vizualization system, but train dynamics is developed by ourselves
OpenBVE is not so popular in Russia. Reasons: weak dynamics model of trains and weak capabilies for locomotive customization. Russian locomotives has specific equpment, for example brakes equipment (brake valves model 394/395 and so on). Russian simmers like hardcore realism in locomotive control process. Today most popular in Russia is ZDSimulator from Ukraine developers, but it is no free and costs money.
I and my team use OpenBVE as vizualization system, but train dynamics is developed by ourselves
Re: Modeling for OpenBVE in Blender 3D editor
Very neat, I think that's the first time someone has imported CSV into a 3D editor
If you're improving train dynamics, then PRs to the main openBVE tree are always welcome-
http://github.com/leezer3/openbve
This version also supports obj files FWIW.
If you're improving train dynamics, then PRs to the main openBVE tree are always welcome-
http://github.com/leezer3/openbve
This version also supports obj files FWIW.
Re: Modeling for OpenBVE in Blender 3D editor
There are many thinks, that can be upgraded into OpenBVE. But, I see source code and work with it, and I think, code must be refactored very deep, before any idea about dynamics can be releasedleezer3 wrote:If you're improving train dynamics, then PRs to the main openBVE tree are always welcome
Re: Modeling for OpenBVE in Blender 3D editor
Where do we put the files? I put the directory in the scripts/addons directory but csv imports or exports do not show up in Blender options.
ecreek- Posts : 62
Join date : 2011-08-23
Re: Modeling for OpenBVE in Blender 3D editor
You must make this, for addon installationWhere do we put the files?
* Download last release of plugin from Releases section: github.com/maisvendoo/blenderCSV/releases
* Open Blender, go from main menu by path File -> User Preferences -> Add-ons
* Select "Install add-on from file"
* Choose plugin zip-archive in your filesystem
* Select checkbox for addon activation
* Press "Save user setting" for apply changes to next start of Blender
Go back to repository - I updated README.md file and appended installation guide with screenhots
Attantion! I updated repository. You can read full user guide for plugin in README.md file
Last edited by maisvendoo on Sun Aug 05, 2018 3:22 pm; edited 1 time in total
Re: Modeling for OpenBVE in Blender 3D editor
Thank You - it is working now.
ecreek- Posts : 62
Join date : 2011-08-23
Re: Modeling for OpenBVE in Blender 3D editor
Looks good I have no problems with reading Russian
I thought of Moscow-Mihnevo line (probably somewhat further) set in ~2002-2004 era, but no further details yet, I want to actually make something first. (coming with ER2 and EM2 trains, 2018 was the last year in service for the latter)
OpenBVE does miss the simulation of proper brake valves for now, but this may be coming soon, I think. And for a big serious simulator it almost definitely needs some modifications at least, I know that Japanese simulators use BVE technology a lot, so it's a good platform choice.
(speaking of Russian ("just a normal PC user" grade this time) train simulations, Trainz is the most popular in terms of Russian content, but what really kills it is terrible lighting system (slightly better in the later versions, but with more bugs. They never released a Trainz version that feels like a complete, stable product since 2010-2012), awful physics and sound engine. Proper driving experience comes ony thru heavily-scripted (that's what the Trainz equivalent of plugins is called) models completely overriding the default mechanics)
I thought of Moscow-Mihnevo line (probably somewhat further) set in ~2002-2004 era, but no further details yet, I want to actually make something first. (coming with ER2 and EM2 trains, 2018 was the last year in service for the latter)
OpenBVE does miss the simulation of proper brake valves for now, but this may be coming soon, I think. And for a big serious simulator it almost definitely needs some modifications at least, I know that Japanese simulators use BVE technology a lot, so it's a good platform choice.
(speaking of Russian ("just a normal PC user" grade this time) train simulations, Trainz is the most popular in terms of Russian content, but what really kills it is terrible lighting system (slightly better in the later versions, but with more bugs. They never released a Trainz version that feels like a complete, stable product since 2010-2012), awful physics and sound engine. Proper driving experience comes ony thru heavily-scripted (that's what the Trainz equivalent of plugins is called) models completely overriding the default mechanics)
Delsin- Posts : 313
Join date : 2016-08-20
Re: Modeling for OpenBVE in Blender 3D editor
Очень хорошо! ;-)Delsin wrote:Looks good I have no problems with reading Russian
This is a big and intersting thema for discussion.Delsin wrote:OpenBVE does miss the simulation of proper brake valves for now, but this may be coming soon, I think.
Update! Version 0.4.0 of Blender plugin are available!
Release notes:
- Supported commands Shear and ShearAll for import *.csv
- Fixed bug in MirrorAll command realization
Example of working Shear command
- Code:
CreateMeshBuilder,
Cylinder, 100, 0.3, 0.3, 1.0,
SetColor, 204, 128, 52, 255,
Shear, 1, 0, 0, 0, 1, 0, 0.5,
Re: Modeling for OpenBVE in Blender 3D editor
There seems to be a problem with importing files other than .bmp . I get an error message saying the file cannot be found with jpg files and png files. It seems to only import those parts of the model that are textured with bmp files.
ecreek- Posts : 62
Join date : 2011-08-23
Re: Modeling for OpenBVE in Blender 3D editor
So, can you show *.csv model code, which generate with error on screenshot? Now I see that script realy can't find file, but I has no such problems (I dont use *.bmp textures). I need in models, which generate this problems for full diagnostics
Re: Modeling for OpenBVE in Blender 3D editor
That model is rather large but here is a simple example -
- Code:
CreateMeshBuilder
AddVertex, -0.458, -0.5, 0
AddVertex, -1.2476, -0.5, 0
AddVertex, -1.2476, 0.5, 0
AddVertex, -0.458, 0.5, 0
AddVertex, -0.4658, -0.5, 0
AddVertex, -0.458, -0.5, 0
AddVertex, -0.458, 0.5, 0
AddVertex, -0.4658, 0.5, 0
AddVertex, 0.4283, -0.5, 0
AddVertex, -0.4658, -0.5, 0
AddVertex, -0.4658, 0.5, 0
AddVertex, 0.4283, 0.5, 0
AddVertex, 0.4426, 0.5, 0
AddVertex, 1.2476, 0.5, 0
AddVertex, 1.2476, -0.5, 0
AddVertex, 0.4426, -0.5, 0
AddVertex, 0.4426, -0.5, 0
AddVertex, 0.4283, -0.5, 0
AddVertex, 0.4283, 0.5, 0
AddVertex, 0.4426, 0.5, 0
AddFace, 0 , 1 , 2 , 3
AddFace, 4 , 5 , 6 , 7
AddFace, 8 , 9 , 10 , 11
AddFace, 12 , 13 , 14 , 15
AddFace, 16 , 17 , 18 , 19
GenerateNormals
LoadTexture, End platform signs.JPG
SetTextureCoordinates, 0 , -0.7021, -0.0103
SetTextureCoordinates, 1 , -0.998, -0.0103
SetTextureCoordinates, 2 , -0.998, -0.9967
SetTextureCoordinates, 3 , -0.7021, -0.9967
SetTextureCoordinates, 4 , -0.4576, -0.5996
SetTextureCoordinates, 5 , -0.4574, -0.5996
SetTextureCoordinates, 6 , -0.4574, -0.8926
SetTextureCoordinates, 7 , -0.4576, -0.8926
SetTextureCoordinates, 8 , -0.3535, -0.0168
SetTextureCoordinates, 9 , -0.6484, -0.0168
SetTextureCoordinates, 10 , -0.6484, -0.974
SetTextureCoordinates, 11 , -0.3535, -0.974
SetTextureCoordinates, 12 , -0.2998, -0.9902
SetTextureCoordinates, 13 , -0.0088, -0.9902
SetTextureCoordinates, 14 , -0.0088, -0.0266
SetTextureCoordinates, 15 , -0.2998, -0.0266
SetTextureCoordinates, 16 , -0.4288, -0.5996
SetTextureCoordinates, 17 , -0.4293, -0.5996
SetTextureCoordinates, 18 , -0.4293, -0.8926
SetTextureCoordinates, 19 , -0.4288, -0.8926
This csv will open in object viewer but will not import into Blender. It creates the same errors the previous example.
ecreek- Posts : 62
Join date : 2011-08-23
Re: Modeling for OpenBVE in Blender 3D editor
Your texture filename has whitespaces
Documentation to *.csv object format says that whitespaces are ignored by simulator's parser, is not it?
Upd:
But now I see in documentation
- Code:
LoadTexture, End platform signs.JPG
Documentation to *.csv object format says that whitespaces are ignored by simulator's parser, is not it?
Upd:
But now I see in documentation
that whitespaces ignored around the argument and command name... Hmm, it is my bug, I will try fixed it. But now you can temporary rename you textureWhite spaces around the arguments and around the NameOfTheCommand, and well as at the beginning and the end of the line, are ignored
Re: Modeling for OpenBVE in Blender 3D editor
The truth is spaces are problematic in general when it comes to file names. I suggest using dashes or underlines instead of spaces.
Re: Modeling for OpenBVE in Blender 3D editor
Yup, that's right. There's so many cans of worms opened up by white spaces...
Quork- Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: Modeling for OpenBVE in Blender 3D editor
Well I have never struck a problem with using them in OpenBVE or the tools.
ecreek- Posts : 62
Join date : 2011-08-23
Re: Modeling for OpenBVE in Blender 3D editor
I think, that is not big problem, to allow it in plugin code. It must support official *.csv specification, and I'll make this capabilityDexter wrote:The truth is spaces are problematic in general when it comes to file names.
Re: Modeling for OpenBVE in Blender 3D editor
Ok, ecreek, I fixed this bug. You must download new plugin's version from Github
This code is used for test
and import gives it
Here I used texture with space into name
Probleme source is this code in plugin
Now it look as
Now plugin parses argument as was writen in *.csv object's specification
This code is used for test
- Code:
CreateMeshBuilder,
AddVertex, 1, 1, 0,
AddVertex, 1, -1, 0,
AddVertex, -1, -1, 0,
AddVertex, -1, 1, 0,
AddFace, 0, 1, 2, 3,
SetColor, 255,255,255,
LoadTexture, texture test.png,
SetTextureCoordinates, 0, 1, 0,
SetTextureCoordinates, 1, 1, 1,
SetTextureCoordinates, 2, 0, 1,
SetTextureCoordinates, 3, 0, 0,
and import gives it
Here I used texture with space into name
Probleme source is this code in plugin
- Code:
def parseLine(self, line):
tmp = line.rstrip('\n').rstrip('\r').rstrip(' ').split(",")
return tmp
Now it look as
- Code:
def parseLine(self, line):
tmp = line.rstrip('\n').rstrip('\r').split(",")
for i, token in enumerate(tmp):
str = token.strip(' ')
tmp[i] = str
return tmp
Now plugin parses argument as was writen in *.csv object's specification
Re: Modeling for OpenBVE in Blender 3D editor
If you want a real headache:
https://github.com/leezer3/OpenBVE/issues/223
Unfortunately, Mackoy never really published a proper specification. BVE2 / BVE4 will parse all sorts of 'interesting' stuff.
TBQH though, I wouldn't be too bothered about 100% compatibility with importing, rather concentrate on making sure that export works as designed
https://github.com/leezer3/OpenBVE/issues/223
Unfortunately, Mackoy never really published a proper specification. BVE2 / BVE4 will parse all sorts of 'interesting' stuff.
TBQH though, I wouldn't be too bothered about 100% compatibility with importing, rather concentrate on making sure that export works as designed
Re: Modeling for OpenBVE in Blender 3D editor
I watched sources, when made "Shear" command for import. For other commands everything was clearleezer3 wrote:If you want a real headache:
I think to, that import not so important. But it can be usefull. We use most export functions in our work
Re: Modeling for OpenBVE in Blender 3D editor
This is a great tool for those of us who, like myself, struggled with building objects in a file format. I'm after building a few objects and everything seems ok so far, the one suggestion i have is, this is no big deal as it is easy enough to edit the file and delete SetColor, an option to disable SetColor would be convenient as it does affect the textures.
cilldroichid- Posts : 25
Join date : 2014-09-28
Page 1 of 2 • 1, 2
Similar topics
» My openBVE route editor
» OpenBVE Train Editor
» OpenBVE Motor Sound Editor won't open
» Help me fix this openbve plugin for blender
» Easy way to get your blender objects into OpenBVE
» OpenBVE Train Editor
» OpenBVE Motor Sound Editor won't open
» Help me fix this openbve plugin for blender
» Easy way to get your blender objects into OpenBVE
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum