[Plugin] Eneroth Railroad System (v 0.1.21)
-
Hi Pascal
I've never tried making such small tracks but I can look into it. It'd be helpful to see the file. The mouse wheel doesn't work as long as the web dialog is focused and I don't think I can do much about it.
The signal system is quite old and will be replaced completely. Some signal types can show both left, straight and right will some only can show straight and turn so it's a bit complicated but the new system will contain one model only and the hidden property will be changed on the lights/arrows instead of replacing the component.
I have planned for some time to make the track properties dialog work on multiple tracks but haven't been sure how to do it. I'll keep working on this.
I've actually tested to follow with a fixed camera by changing the source code temporarily and it would be quite easy to implement technically but I'm not sure where to put the options in the UI. The Drive Train dialog wouldn't work when you follow a rolling stock without having the tool activated.
The Balise ideas are great! I'll defensively look into it.
Christina
-
Hi Christina,
Thanks for your answers. Take your time. I take the opportunity I'm on vacations to play !
Yours
Pascal -
Here is the track that makes strange result with short tracks.
custom track directory
Yours
Pascal -
Pascal: I've updated the Add Track Tool to avoid the problems with the control vector pointing the wrong way. The Lego tracks should work after you've replaced the file in the plugin with the one attached .
I've also been working on adding the new references in the balise code. last_run and last_train is really simple but I was wondering how you imagined the custom data. It's quite hard to save it between sessions if it contains other classes than what can be written as attributes (trains for instance). Is it enough to save the custom data within the session only?
Btw: I really love the idea of making Lego trains
Edit: The scale of the arrows in the switch tool and height of the coupling points in the coupling tool are still adapted for trains at the scale 1:1. However it now all should function even if not visually pleasing at other scales.
-
@eneroth3 said:
I've also been working on adding the new references in the balise code. last_run and last_train is really simple but I was wondering how you imagined the custom data. It's quite hard to save it between sessions if it contains other classes than what can be written as attributes (trains for instance). Is it enough to save the custom data within the session only?
There is no problem for me if the balise states/variables are not saved from one session to the other. Maybe I would prefer if the code typed into advanced animation dialog could be saved, it would be great.
In fact Iโm looking for the best way to prevent from collisionsโฆ I did not found yet the ideal way.
Maybe I missed another wish, a function or track property that will return if another train is already on the same track ? or a kind of special balise that can act as a signal based on where trains are.
I have used last_run and last_train to reduce speed of current train and accelerate the previous one if time between 2 trains is too small. This is already a cool way to regulate traffic, but It looks to be insufficient when two different tracks merge into one. If you have any idea. -
"This video is private"
/me wants LEGO!
-
-
-
I can hardly believe my eyes when seeing the video. It's really cool!
I think I can add the settings for how to follow a rolling stock in the advanced animation settings. I don't want to clutter the context menu since it makes it a lot more time consuming to find in it when drawing.
By 'Translate camera', do you mean moving the camera relative to the train but without rotating and by 'Rotate around selection' the current behavior?
I can add a reference called session_data to the balises where user can store any data they like during a the Sketchup session.
Btw, custom signals have been added for the next version:).
-
Hi Christina,
Thanks for the fix for small tracks. It works great.
I played a little bit with the SU camera target and eye attributes and put the code to be executed between frames.
Here is a sample of what can be obtained with that :Itโs very simple code, but hardcoded, and no idea of any user interface.
I will try at least to โpackageโ some functions so they can be called easily from railroad at each frame call.
Basically Iโm thinking of :- Follow selection
- Rotate around selection
- Zoom in / Zoom out
- Translate camera
With any train that can be selected as any other object.
If others want to play and add more detailed/fun rolling stocks, here is the basic Lego pack used in this video to unzip in the Plugins directory (simple track + locomotive and freight):
ene_railroad.zip
Yours
Pascal -
A fantastic plugin, but it does have something that bothers me. I like to use a limited number of toolbars and only open them up when I need them. Your toolbar, no matter which way you close it, will always reopen on startup unless you have actually disabled the plugin. Could you look at removing this behavior.
-
@box said:
A fantastic plugin, but it does have something that bothers me. I like to use a limited number of toolbars and only open them up when I need them. Your toolbar, no matter which way you close it, will always reopen on startup unless you have actually disabled the plugin. Could you look at removing this behavior.
The plugin should run toolbar.restore within a 0 timer t avoid some bug (apparently called 2902434) but for some reason my code uses .show instead . It'll be fixed for the next release but you can manually change it an line 1248 in main.rb now if you want to. I think this was the solution for a bug in SU 8 which doesn't support the plugin so it's probably not needed at all.
-
Thanks, it was only a tiny thing in an otherwise superb plugin.
-
WELCOME BACK <joke> JCE (sound like jaycey)</joke> Eneroth3.
i have find some bugs and eastereggs in your plugin.
more about this via PM.
dean
-
@eneroth3 said:
By 'Translate camera', do you mean moving the camera relative to the train but without rotating and by 'Rotate around selection' the current behavior?
Hi Christina,
Easier to explain with sample. Here are some functions I used, to be called at each frame.
Feel free to integrate/customize/mix as you want within your plugin.Here is the ruby file:
camera_animation.rbAnd samples:
rotate around
target
follow
Pascal
-
So, you created the animations in your videos with your own animation script?
Have you published it anywhere other in that comment here? GitHub? -
@tt_su said:
So, you created the animations in your videos with your own animation script?
Yes for the cameras, not for the trains that are moved by Christina's Railroad plugin.
@unknownuser said:
Have you published it anywhere other in that comment here? GitHub?
No. Its only few lines of code, that could/should be optimized... and adapted to custom needs. If any of the good developers that are here wants to improve it to make a more complete library it may be great...
In fact I think those features are really missing to SU. -
@ppoublan said:
If any of the good developers that are here wants to improve it to make a more complete library it may be great...
I'd encourage GitHub to publish code where you invite collaboration and enhancements from the community.
-
I have just downloaded the Railroad plugin, but there are no selections in the "Add Track" box. Is there a link to other components?
-
Pascal: The animations look great and I really like the 0.95 ratio thing to make it smoother. It looks just as filmed with a real stadicam. I think this library could grow and be used for much more than the train simulator. I agree with Thomthom about putting it on Github for more people to work on, then I can also add a link to it from the documentation of my plugin .
@leolouie said:
I have just downloaded the Railroad plugin, but there are no selections in the "Add Track" box. Is there a link to other components?
That's really odd. What Sketchup version are you using? 2013+ is needed.
Advertisement