BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Modeling for OpenBVE in Blender 3D editor

+5
Quork
Dexter
Delsin
leezer3
SP1900
9 posters

Page 1 of 2 1, 2  Next

Go down

Modeling for OpenBVE in Blender 3D editor Empty Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Sat Aug 04, 2018 7:24 pm

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
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by Delsin Sat Aug 04, 2018 9:54 pm

Will be useful, thanks!
Speaking of Russian routes, I'm curious which you've covered, as I'm planning to build one. Cool
Delsin
Delsin

Posts : 313
Join date : 2016-08-20

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Sat Aug 04, 2018 10:41 pm

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 Smile
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by SP1900 Sun Aug 05, 2018 12:28 am

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
SP1900

Posts : 302
Join date : 2017-12-08
Age : 22

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Sun Aug 05, 2018 12:39 am

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
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by leezer3 Sun Aug 05, 2018 12:04 pm

Very neat, I think that's the first time someone has imported CSV into a 3D editor Smile

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.

leezer3

Posts : 1977
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Sun Aug 05, 2018 1:23 pm

leezer3 wrote:If you're improving train dynamics, then PRs to the main openBVE tree are always welcome
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 released
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by ecreek Sun Aug 05, 2018 1:52 pm

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

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Sun Aug 05, 2018 2:13 pm

Where do we put the files?
You must make this, for addon installation

* 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
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by ecreek Sun Aug 05, 2018 2:58 pm

Thank You - it is working now.

ecreek

Posts : 62
Join date : 2011-08-23

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by Delsin Sun Aug 05, 2018 7:53 pm

Looks good Very Happy I have no problems with reading Russian Wink
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
Delsin

Posts : 313
Join date : 2016-08-20

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Sun Aug 05, 2018 9:06 pm

Delsin wrote:Looks good Very Happy I have no problems with reading Russian Wink
Очень хорошо! ;-)

Delsin wrote:OpenBVE does miss the simulation of proper brake valves for now, but this may be coming soon, I think.
This is a big and intersting thema for discussion.

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,

Modeling for OpenBVE in Blender 3D editor B7013
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by ecreek Tue Aug 07, 2018 4:36 am

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.Modeling for OpenBVE in Blender 3D editor Image110

ecreek

Posts : 62
Join date : 2011-08-23

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Tue Aug 07, 2018 4:53 am

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
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by ecreek Tue Aug 07, 2018 5:24 am

Modeling for OpenBVE in Blender 3D editor End_pl11
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

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Tue Aug 07, 2018 6:30 am

Your texture filename has whitespaces
Code:
LoadTexture, End platform signs.JPG
Plugin's parser ignores whitespaces in lines of model's scripts. You can rename your texture file without 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
White spaces around the arguments and around the NameOfTheCommand, and well as at the beginning and the end of the line, are ignored
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 texture
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by Dexter Tue Aug 07, 2018 9:55 am

The truth is spaces are problematic in general when it comes to file names. I suggest using dashes or underlines instead of spaces.
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by Quork Tue Aug 07, 2018 10:00 am

Yup, that's right. There's so many cans of worms opened up by white spaces...
Quork
Quork

Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by ecreek Tue Aug 07, 2018 10:42 am

Well I have never struck a problem with using them in OpenBVE or the tools.

ecreek

Posts : 62
Join date : 2011-08-23

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Tue Aug 07, 2018 10:54 am

Dexter wrote:The truth is spaces are problematic in general when it comes to file names.
I think, that is not big problem, to allow it in plugin code. It must support official *.csv specification, and I'll make this capability
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Tue Aug 07, 2018 1:45 pm

Ok, ecreek, I fixed this bug. You must download new plugin's version from Github

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

Modeling for OpenBVE in Blender 3D editor B7910

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
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by ecreek Tue Aug 07, 2018 1:55 pm

Thank you.

ecreek

Posts : 62
Join date : 2011-08-23

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by leezer3 Fri Aug 10, 2018 11:55 am

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 Smile

leezer3

Posts : 1977
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by maisvendoo Fri Aug 10, 2018 9:22 pm

leezer3 wrote:If you want a real headache:
I watched sources, when made "Shear" command for import. For other commands everything was clear
I think to, that import not so important. But it can be usefull. We use most export functions in our work
maisvendoo
maisvendoo

Posts : 14
Join date : 2018-08-04
Age : 42
Location : Russia

http://vk.com/crikrgups

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by cilldroichid Sun Aug 26, 2018 8:18 pm

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

Back to top Go down

Modeling for OpenBVE in Blender 3D editor Empty Re: Modeling for OpenBVE in Blender 3D editor

Post by Sponsored content


Sponsored content


Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum