Jump to content


Track building basic tutorial


  • Please log in to reply
202 replies to this topic

#31 Bernd Nowak

Bernd Nowak

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,716 posts
  • Gender:Male
  • Sim interest:GPL

Posted Apr 05 2009 - 04:40 AM

View Postnpattinson, on Apr 5 2009, 12:14 PM, said:

View PostBernd Nowak, on Apr 5 2009, 10:13 AM, said:

Now, I need to find out why my brake marker is a barrier as soon as I assign a collision value in 123do to it :D
I'm not the right person to answer this, but isn't that what you wanted ? I would imagine 3dos are non-solid (the tactile equivalent of transparent - is there a word for that ?) by default, whereas if you set a collision value they become something you can run into.

Nigel

Hehe, but the object should not stretch to an unvisible barrier across the whole track section  :D  like a energy proection shield in a science fiction movie  :)

And I'm working a bit on the GRV at the moment. When I use the export from GPLRA it's basically the same phenomen I recall from my regrooving attempts of the ring. It's more or less a constant line. I'm working on this.

#32 npattinson - guest

npattinson - guest
  • Guests

Posted Apr 05 2009 - 04:50 AM

View PostBernd Nowak, on Apr 5 2009, 10:40 PM, said:

Hehe, but the object should not stretch to an unvisible barrier across the whole track section
Ah, I understand. I don't know anything about this, but it wouldn't surprise me if you needed  what I call a bounding box node in the collision 3do - without one of those it's hard to imagine how GPL would know how big to make the collision box. Opening a couple of collideable 3dos should tell you whether or not that's on the right track. However assuming you do need such a node I don't know how to add one.

Nigel

#33 Bernd Nowak

Bernd Nowak

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,716 posts
  • Gender:Male
  • Sim interest:GPL

Posted Apr 05 2009 - 05:57 AM

I have seemed to solve my groove problem by adding a groove.mip as well as adding this entry to mytrack.tex file:

4003 0 0 10.0 10.0 groove

Next thing will be to add some height infos and to resolve the gaps which will for sure arise :)

Will start working a bit on the AI but overall I have a good feeling about the guide. Remember this will be a beginners guide for newbies like me :) I have seen some nice advanced stuff.

At least till now everything is done via freeware tools which is good.

About the collison box thing. It's attached to a polygon which itself is attached to vertics. Would it be safe to assume that I need the vertics like nails which are needed to 'hold' the polygons ?

Another thing I will try is to create a 3D object in Blender, export it to ASE or 3DS and import it. What is the best choice: ASE or 3DS ?

Still interesting to get this thing going. When I'm done with most steps I will save it and begin with a fresh new one and try to be more straight forward :)

#34 Border Reiver - guest

Border Reiver - guest
  • Guests

Posted Apr 05 2009 - 08:04 AM

Collision boxes in objects must be confined. They are best thought of as volumes. With two polygons you can confine collision front and back, if you like, but not side to side or up and down, so you would get a plane of collision. If you want a cube, say, you must define six polygons and select all of these to define the volume they enclose to ensure that collision does not leak out. The directions these polygons face is also important. With texturing you only see one of the two sides, and with collision you have the same effect, but in the opposite direction. In the cube example, if it is textured correctly so that you see all of the outside faces, then selecting these for collision will also be correct as that will define the volume enclosed within the cube as being solid.

If you only define or select four of the six faces, collision can leak out along the undefined axis, and this is why you are feeling yourself hit a barrier across the track. In the worst case scenario this also leads straight to CTD as soon as the object appears.

To make more complicated objects with more complex collision like a bridge you need to define several collision volumes. In the bridge example the part of the bridge you drive across must be defined as a cuboid or you could never get on top of it, or indeed drive underneath it.

Making 3dos is basically about starting to see the world in cubes, cuboids, pyramids, wedges etc. and figuring out how combination of these when textured correctly can look like the object you are modeling and also react like them when you hit them.

Rob

#35 npattinson - guest

npattinson - guest
  • Guests

Posted Apr 05 2009 - 03:30 PM

View PostBorder Reiver, on Apr 6 2009, 02:04 AM, said:

If you want a cube, say, you must define six polygons and select all of these to define the volume they enclose to ensure that collision does not leak out.
This selecting to define the volume - is that something you do in one of the 3do editing tools ? That sounds like it might well be creating a bounding box as a result.

Nigel

#36 Border Reiver - guest

Border Reiver - guest
  • Guests

Posted Apr 05 2009 - 03:48 PM

View Postnpattinson, on Apr 5 2009, 10:30 PM, said:

View PostBorder Reiver, on Apr 6 2009, 02:04 AM, said:

If you want a cube, say, you must define six polygons and select all of these to define the volume they enclose to ensure that collision does not leak out.
This selecting to define the volume - is that something you do in one of the 3do editing tools ? That sounds like it might well be creating a bounding box as a result.

Nigel

Yes, that is in 123do. Effectively, as you say it is selecting which polygons bound the volume you are enclosing. In this way, you can enclose multiple volumes, leaving gaps between them, such as in my example above of a bridge which would have two side wedge like solid bits and a cuboid off the ground between them.

I know Phil also made tools for adding collision to objects, but I have to confess that all of the "hard core" programs like GPL Editor etc. scare the heck out of me once they start talking about nodes, flavours and so forth.

Rob

#37 MECH

MECH

    Double poly killer

  • Administrators
  • PipPipPipPipPipPipPipPipPipPip
  • 2,408 posts
  • Gender:Male
  • Location:Here ->
  • Interests:My Girlfriend
  • Sim interest:GPL

Posted Apr 06 2009 - 01:03 AM

View PostBernd Nowak, on Apr 5 2009, 01:57 PM, said:

Another thing I will try is to create a 3D object in Blender, export it to ASE or 3DS and import it. What is the best choice: ASE or 3DS ?

I use ase files for converting it to 3do with the program ase23do.
After the conversion you need to clean it up with 3doclean.
from the readme:
This utility will strip unused data from the following sections of a 3do file.

- SXYZ which contains the verticy data
- PLAN which contains the plane data
- NORM which contains the normals data
- STRN which contains the strings data


If you have cleaned it up you can use 3doconvert to add normals and specular lighting with shine.
3doconvert can also add display classes but i think these are only used by car 3do's  :)

How the process works for use with 123do i don't know coss i can't get it working on my system.
I believe 123do also has some import function :shrug:

#38 npattinson - guest

npattinson - guest
  • Guests

Posted Apr 06 2009 - 01:11 AM

View PostMECH, on Apr 6 2009, 07:03 PM, said:

If you have cleaned it up you can use 3doconvert to add normals and specular lighting with shine.
I often get confused between dynamic shaded polygons, which is what normals represent, and specular lighting. But in both cases I think you only use these on cars - they're a bit of a performance hit.

View PostMECH, on Apr 6 2009, 07:03 PM, said:

3doconvert can also add display classes but i think these are only used by car 3do's  :)
But these are used in all 3dos. For TSOs you can use them to distinguish crowds from grandstands and things like that. If you get them wrong the various graphics selection options don't work properly.

Nigel

#39 Bernd Nowak

Bernd Nowak

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,716 posts
  • Gender:Male
  • Sim interest:GPL

Posted Apr 06 2009 - 01:21 AM

View PostBorder Reiver, on Apr 5 2009, 11:48 PM, said:

...

I know Phil also made tools for adding collision to objects, but I have to confess that all of the "hard core" programs like GPL Editor etc. scare the heck out of me once they start talking about nodes, flavours and so forth.

Rob

Same here :D

I will give it a try and report back.

#40 Bernd Nowak

Bernd Nowak

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,716 posts
  • Gender:Male
  • Sim interest:GPL

Posted Apr 06 2009 - 02:17 AM

Did some more checking.
Attached is a zip file containing 2 3DO cubes.

cubecb.3do just the cube without collision box.

cubecben.3do same cube with collision box.

But I can drive through the cubecben.3do  :(

Somehow it's a mysterium. I read all pages here: http://www.vanwall.e....uk/gplediting/ but no word how collision box works.

I have attached the 123do project files too.

Attached Files



#41 ginetto

ginetto

    GPL track editor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPip
  • 2,736 posts
  • Gender:Male
  • Location:Lombardia, Italia
  • Interests:Mountain
  • Sim interest:GPL

Posted Apr 06 2009 - 05:17 AM

In 123do > Set Collision Volumes window, you need to select the 3 or 4 or 5 or 6 polygons at the same time then click add; after that you choose the kind of collision type :)

#42 Border Reiver - guest

Border Reiver - guest
  • Guests

Posted Apr 06 2009 - 05:23 AM

View PostGinetto, on Apr 6 2009, 12:17 PM, said:

In 123do > Set Collision Volumes window, you need to select the 3 or 4 or 5 or 6 polygons at the same time then click add; after that you choose the kind of collision type :)

Or even more than 6 if you have very complicated shapes that still enclose single volumes. :)

Where you have separated volumes you can also create these multiple volumes in 123do within a single 3do file, for instance selecting polygons 0-5 as volume one which you assign collision to, and then polys 6-11 as the second volume with the same or a different collision type for that volume.

Rob

#43 ginetto

ginetto

    GPL track editor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPip
  • 2,736 posts
  • Gender:Male
  • Location:Lombardia, Italia
  • Interests:Mountain
  • Sim interest:GPL

Posted Apr 06 2009 - 05:57 AM

Yes Rob, I was trying to explain how to make it work, my error at the beginning was because I added a polygon and assign the collision type , then add the second polygon and assign the collision... and so on, this was always a failure and I got mad thinking about how this could work until Phil Neville told me to select all the polygons together and add them all in the same line :)

But after seeing the  examples Bernd posted is not his case;
Bernd, your error is that you didn't draw the polygon correctly, some of them face inside the cube and some outside.
You need to draw them so that they all face outside otherwise the collision is not included in the box but spread around the universe :P

Edited by Ginetto, Apr 06 2009 - 06:02 AM.


#44 Bernd Nowak

Bernd Nowak

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,716 posts
  • Gender:Male
  • Sim interest:GPL

Posted Apr 06 2009 - 06:02 AM

Adding a collison box to each polygon adds a nice effect :)

But according to 123do cubecben should have all enabled. I made a cube first you to try. As it's a standalone file do I need to rerun trk23doz after making changes ? I can't believe because I would think that trk23doz makes only a reference what external 3DOs are listed in the TSO (with long/lat).

Ah, I saw your response Ginetto ! I will check it :)

Edited by Bernd Nowak, Apr 06 2009 - 06:03 AM.


#45 ginetto

ginetto

    GPL track editor

  • Administrators
  • PipPipPipPipPipPipPipPipPipPip
  • 2,736 posts
  • Gender:Male
  • Location:Lombardia, Italia
  • Interests:Mountain
  • Sim interest:GPL

Posted Apr 06 2009 - 06:04 AM

No, you don't need to rerun trk23doZ you just need to give the same name to wichever 3do and they will appear at the point of origin you assigned in the TSO

EDIT: this cube with collision has the 3 wrong faced polys fixed, it should now work... ( I hope... :P )

Attached Files


Edited by Ginetto, Apr 06 2009 - 06:12 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Sim Racing Links