Jump to content
Sign in to follow this  
Vcz

Polyline object ? (railway)

Recommended Posts

Hey guy's.

I have a question for you, is there possible to create a polyline with object ; Like the rail A2 object ?

I spend some hours to try making a railway but honestly it's a real nightmare, even more with a 822km² map. :D

When i see the DayZ standalone Chernarus+ i think there is a way to do it. The new railway fit very well, even with the elevation of the terrain (my biggest problem with my railway).

Share this post


Link to post
Share on other sites

Would it be possible to use the road .paa files and repaint them to look like railways? Then you'd use the same procedure for polylines and just define the railway .paa files isntead of the road ones.

Really not sure if that'd work at all though.

Share this post


Link to post
Share on other sites
Would it be possible to use the road .paa files and repaint them to look like railways? Then you'd use the same procedure for polylines and just define the railway .paa files isntead of the road ones.

Really not sure if that'd work at all though.

Yeah i think it will work.

But it will be just a flat texture on the ground without the model. :(

Share this post


Link to post
Share on other sites

It could be done with scripting perhaps, with some trial and error ofcourse but I'd be willing to fool around with it a bit. The Chernarus railway should provide enough testing material.

I'm already forming a rough version of it in my head right now so if you're willing to give it a shot, let me know, usually when this happens I end up making it anyhow :)

- edit

Alright, I gave it some thought and scribbled down what I think should work.

What the script will need:

1. The names and dimensions of each railroad piece.

2. An array of zero'ed coordinates including altitude (you can get these by mapping it out using waypoints in a mission) and the piece you want used at every coordinate.

The script calculates the vector between each current coordinate and the next.

The script checks the length of the current piece against the distance to the next coordinate. If they're too far apart,

it will auto-fill the remaining distance with the current piece.

In theory, that should be enough. It will need a bunch of tweaking to get it to work properly but I'm going to give it a shot over the weekend.

Edited by BadLuckBurt
Added my evil masterplan

Share this post


Link to post
Share on other sites
Hey guy's.

I have a question for you, is there possible to create a polyline with object ; Like the rail A2 object ?

I spend some hours to try making a railway but honestly it's a real nightmare, even more with a 822km² map. :D

When i see the DayZ standalone Chernarus+ i think there is a way to do it. The new railway fit very well, even with the elevation of the terrain (my biggest problem with my railway).

well terrain builder is like v4 with some features stripped and that was one of them.. I think if u make a polyline and right click the feature is actually there but it doesn't do anything...the railways do have snap points in them I think to make placing the a bit easier at least

Share this post


Link to post
Share on other sites
It could be done with scripting perhaps, with some trial and error ofcourse but I'd be willing to fool around with it a bit. The Chernarus railway should provide enough testing material.

I'm already forming a rough version of it in my head right now so if you're willing to give it a shot, let me know, usually when this happens I end up making it anyhow :)

- edit

Alright, I gave it some thought and scribbled down what I think should work.

What the script will need:

1. The names and dimensions of each railroad piece.

2. An array of zero'ed coordinates including altitude (you can get these by mapping it out using waypoints in a mission) and the piece you want used at every coordinate.

The script calculates the vector between each current coordinate and the next.

The script checks the length of the current piece against the distance to the next coordinate. If they're too far apart,

it will auto-fill the remaining distance with the current piece.

In theory, that should be enough. It will need a bunch of tweaking to get it to work properly but I'm going to give it a shot over the weekend.

Sure i'm interested, any solution is welcome. Let me know if i can help you. skype or something.

well terrain builder is like v4 with some features stripped and that was one of them.. I think if u make a polyline and right click the feature is actually there but it doesn't do anything...the railways do have snap points in them I think to make placing the a bit easier at least

Yeah the feature is already here, "Add (fill new object)" but it does'nt work atm. It just put a very ugly kind of texture path on the ground, but no objects.

I didn't understand why they have stripped this features. :(

Edited by Vcz

Share this post


Link to post
Share on other sites

I'm saving the real work for tomorrow evening but I couldn't resist tossing a few of those railroad pieces into TB just now. They don't seem to align to slopes properly when you place them directly in there. Is that a problem you ran into as well?

I hope that when I do it in Arma itself they will otherwise this is gonna be harder than I thought (and yeah, I already figured it'd be hard :D).

And thanks, if I need your help I'll let you know. First I'll have to dig up my measuring script to get the dimensions of each railroad piece. I was working on a database a few months back that had all objects of A2, OA and A3 categorised, linked to ammo types etc. and the bounding box measurements of all objects but due to a major brainfart, that database has been rendered inoperable :P

I'm going to rebuild it though, I want to make a town / base generator with it.

Share this post


Link to post
Share on other sites

They don't align the way you are thinking because you can't bend the railroad track...if that makes sense?

Share this post


Link to post
Share on other sites

I tried them on a terrain that is virtually flat, it has a few 0.5m bumps in it and the straight rails-piece just clipped into that.

To add to it, I was kind of expecting them to behave the same as buildings which do align to the slopes you place them on.

And yes, I think I know what you mean by not being able to bend the railroad track, it'll take some calculations to figure out how to rotate and offset bent pieces to form a continuous curve.

---------------------------------------------------------------------------------------------------

I've been looking at the config files for Arma 2 and it seems those railway pieces were never available as classes but only referenced in the WRP. I'm gonna try to load them in as houses using a separate PBO later today, no idea if that'll work.

Edited by BadLuckBurt

Share this post


Link to post
Share on other sites
I'm saving the real work for tomorrow evening but I couldn't resist tossing a few of those railroad pieces into TB just now. They don't seem to align to slopes properly when you place them directly in there. Is that a problem you ran into as well?

I hope that when I do it in Arma itself they will otherwise this is gonna be harder than I thought (and yeah, I already figured it'd be hard :D).

And thanks, if I need your help I'll let you know. First I'll have to dig up my measuring script to get the dimensions of each railroad piece. I was working on a database a few months back that had all objects of A2, OA and A3 categorised, linked to ammo types etc. and the bounding box measurements of all objects but due to a major brainfart, that database has been rendered inoperable :P

I'm going to rebuild it though, I want to make a town / base generator with it.

They don't align the way you are thinking because you can't bend the railroad track...if that makes sense?

Yes the fact the railway does'nt align to slope is the main problem i have encountered.

I tried them on a terrain that is virtually flat, it has a few 0.5m bumps in it and the straight rails-piece just clipped into that.

To add to it, I was kind of expecting them to behave the same as buildings which do align to the slopes you place them on.

And yes, I think I know what you mean by not being able to bend the railroad track, it'll take some calculations to figure out how to rotate and offset bent pieces to form a continuous curve.

---------------------------------------------------------------------------------------------------

I've been looking at the config files for Arma 2 and it seems those railway pieces were never available as classes but only referenced in the WRP. I'm gonna try to load them in as houses using a separate PBO later today, no idea if that'll work.

Nice idea, i did not figured this out.

I got around this by creating Elements of 5m or less for sloped areas.

http://cloud-4.steampowered.com/ugc/27337903937044472/CD294AC1409F63C5BB6CA61AB3494395AECA2F89/

Congrats', it look really nice ! So you place it manually, i mean you just spawn the object and then place it correctly with bulldozer without any line* tools or scripts ?

(*Like polyline)

Edited by Vcz

Share this post


Link to post
Share on other sites

Thats right, just using the snap function of visitor. For this you just have to define the snap points in the memory Lod.

Share this post


Link to post
Share on other sites
Thats right, just using the snap function of visitor. For this you just have to define the snap points in the memory Lod.

Thanks for the answer.

So, i try to find an object with snap point but i don't find any of them.

Does snap point was an another stripped feature from Terrain builder or i am doing something wrong (Placing the object then i click on toggle snapper) ?

I have try with a lot of object, like fence, walls, rail ect.

https://manuals.bisimulations.com/vbs3/3-4/devref/Default.htm#VisitorNG/Object_Snapping.htm%3FTocPath%3D6%2520Terrain%2520Manual%7CObjects%7C_____6

Edited by Vcz

Share this post


Link to post
Share on other sites

AFAIK memory point snapping only functions on mlod/unbinarized models. All the stock Arma 3 assets are binarized and so are unlikely to snap together effectively, even if they did have appropriate memory points before binarization.

B

Share this post


Link to post
Share on other sites
AFAIK memory point snapping only functions on mlod/unbinarized models. All the stock Arma 3 assets are binarized and so are unlikely to snap together effectively, even if they did have appropriate memory points before binarization.

Thanks for the answer. Well this is a lot of barrier to railway... :(

Is there a way to unbinarize assets ? i'm quite new to modeling.

Share this post


Link to post
Share on other sites
Thanks for the answer. Well this is a lot of barrier to railway... :(

Is there a way to unbinarize assets ? i'm quite new to modeling.

No. Bis have released their entire content from a2 back to ofp I believe. However a3 is not included. You could ask bis for specific models. It has been done before. But being so new they prob would say no at this point.

Share this post


Link to post
Share on other sites
Would it be possible to use the road .paa files and repaint them to look like railways? Then you'd use the same procedure for polylines and just define the railway .paa files isntead of the road ones.

Really not sure if that'd work at all though.

Yeah i think it will work.

But it will be just a flat texture on the ground without the model.

This WILL work, but it WILL be just a flat texture on the ground...

2D_Railway_small_zps5d9ee8b5.jpg

B

Share this post


Link to post
Share on other sites
This WILL work, but it WILL be just a flat texture on the ground...

Yeah i think i gonna give up the 3d railway idea for now. And making this.

Can I ask how you done this , as it give me some idea just no idea how to change the textures

Thanks

By creating a railway.paa the same way as road.paa and use the same procedure (polyline) for road but with the new railway.paa.

Share this post


Link to post
Share on other sites

One fried HDD later (yay backups). The flat railroads remind of the old 3D games :D but I hope I can come up with something that works. I wonder, would the flat texture take an animated one?

Share this post


Link to post
Share on other sites

If you have a relatively flat terrain, why dont you use a track model with high embankment? Just make the embankment bigger then usual, so that the sides of the embankment clip into the terrain instead of the track. In many parts of Germany the embankments sit very high. That way it can also serve as cover for infantry for example, and vehicles will notice it when driving over it. That way you do not just have a visual effect from the trackmodel, but also a gameplay impact.

Share this post


Link to post
Share on other sites

Hey guy's i come back with some news.

So i've made a new railway, the same way as road.

It work and that's how it look like in game (do not look at the strange clutter & surfaces color, it's my satmap with premade road to follow with polyline) :

2678482014121000001.jpg

At this point everything is ok, except rvmat i have just copy/past an existing one.

Doe's this matter ? If yes, how can i generate new one for this road especially?

Then there is the map, with main road, road and the railway (the little white line).

2003162014121000002.jpg

Everything is ok too, but the railway line is white, i want it black.

Is there a way to change this color without touching the configmap in Dta/xxx.pbo ?

I've got another problem concerning arma 2 import object, but i will create a new thread for this, please take a look at : http://forums.bistudio.com/showthread.php?186499-How-to-import-arma-2-buildings-amp-objects-into-arma-3-map-properly&p=2836209#post2836209

Edited by Vcz
added link

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×