Jump to content

Bridges in road editor?


saindd

Recommended Posts

Is it possible to automatically create bridges using the mesh road editor? Look at this:


http://docs.garagegames.com/torque-3d/official/content/documentation/World%20Editor/Editors/images/RoadDecal_setup.jpg


Instead of just using the normal road mesh, use a bridge mesh.

Link to comment
Share on other sites

That'd require expanding on the tool.


That said, that does sound like it'd be pretty useful to do. By default the mesh road is procedurally created, it doesn't use model files or anything, so it'd have to be reworked.


I've seen a few things that roll the general idea though, it makes a road more of a small placement system, including support for fences, street lights, etc along the road's path.


The basic idea would be to have a 3d model of a road segment that has a bone at each end of it, and then the tool would spawn a bunch of the models and line them up, end-to-end similar to how it does the segments now.


Not complex as a theory, but it'd take some artwork and iteration to get it working.

Link to comment
Share on other sites

expanding on the idea: the option to choose would be cool also. which is mesh based and which is just a decal road and also what nodes are bridges and what nodes arent, u would then be able to create entrance and exit nodes that each have their own mesh, create a cross section node with its own separate decal and or mesh u get the idea

Link to comment
Share on other sites

I thought the mesh-based road could be replaced by a custom model. We can only change the texture, then? I'll try to make a small script to at least change the texture, based on a raycast going down, so i can discover if it's high enough and apply a "bridge" texture. Later i can learn how to do meshes... seems complex!

Link to comment
Share on other sites

It seems like it would be pretty hard to make the mesh road system just automatically substitute in a 3D model, because what are you going to do when the road is not perfectly straight and level? It would have to stretch one side or the other to make curves, unless you also made models to use at all the possible turning angles, and stretching one side of a straight section could easily come out less than perfect looking, I'd imagine.

Link to comment
Share on other sites

It seems like it would be pretty hard to make the mesh road system just automatically substitute in a 3D model, because what are you going to do when the road is not perfectly straight and level? It would have to stretch one side or the other to make curves, unless you also made models to use at all the possible turning angles, and stretching one side of a straight section could easily come out less than perfect looking, I'd imagine.

 

That's why I'd mentioned a mesh segment with the bones at the end. You'd rig the mesh to the bones, and you'd rotate the bones to align to the segment breaks.


If you look at the road geometry now, it's quads that have their edges aligned by breaks in the ribbon, what you'd do for this is have a mesh, and then rotate the end bones to align to the breaks we already calculate. This way they'll line up and still work with the spline curvature. The only issue would arise is if you had extremely tight turns, as the breaks get very small. Could probably have different length models and swap to the closest fit for a section-length.

Link to comment
Share on other sites

JeffR wrote:

That's why I'd mentioned a mesh segment with the bones at the end. You'd rig the mesh to the bones, and you'd rotate the bones to align to the segment breaks.

 

Ah, brilliant! Yeah, sorry, I missed that little detail. That would be perfect. Used with a set of models to encompass stages of the curves etc., picking the closest one, and then stretching as necessary. For things like bridges you could also have standard start and end models that don't scale, and then fill in the middle as necessary to get the length. More complex structures like suspension bridges might have to stay in as one unit, to capture the arc of the cables, but simpler bridges could have two ends and a variable length middle section.

Link to comment
Share on other sites

  • 4 months later...

Could hack together a bridge with armature, paint weights to be able to be moved a certain way, and then import it as a .DAE file. I would suggest doing that as it would be easier to maniuplate. You could also use the already made road textures to make it look more compatable, and create a colission plane to where you could drive over it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...