[WIP] Chapman Track Creator

Discussion in 'Track Modding' started by TChapman500, Dec 10, 2013.

  1. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Thanks. I would like to be directed to this NR2003 forum.
     
    Mystical likes this.
  2. Mystical

    Mystical Registered

    Joined:
    Dec 18, 2017
    Messages:
    3
    Likes Received:
    2
    TChapman500 likes this.
  3. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
  4. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Time for another weekly update: I'm creating a DLL that I'll be able to use to test DLL support for the simulators (at the same time I'm implementing support for said simulator). I'll be testing it as I finally implement the mesh generator. I may be able to implement the mesh generator AND the grid generator at the same time. The first step will be to test to see if the track editor can call the appropriate functions from the DLL in order to initialize support for any simulator. The second step will be to see if it can initialize the renderer. I've also re-implemented the original event system that I made as my "updated" system doesn't work.
     
    SPASKIS and Mystical like this.
  5. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    First post updated.
     
    Mystical likes this.
  6. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Guess it's time for another weekly update. This week, I went to a dedicated web hosting service to host my site on. The link is on the first page and here. This will be the official website for the Chapman Track Creator. I have been having problems sending emails from the site, so I've spent most of the week trying to fix that to no avail. So not much work has been done on the track editor. I have however, been working on the mesh generator today. By the end of today, I hope to have enough of the mesh generator done that at least the track's wireframe can be rendered. And I still need to add in the code that looks for and loads the simulator-specific DLL files. Without this feature, the track editor won't be able to support any simulators.
     
    SPASKIS likes this.
  7. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,384
    Already signed up. I didn't receive the confirmation email but I could normally login and look around the forum structure.

    I wanted to say hello and introduce myself but I couldn't find any appropriate thread or subforum so I didn't dare to use any of the existing threads. I understand that some of them should be locked since it is only you who is supposed to post (for example the weekly update one).

    Cheers
     
    Corti likes this.
  8. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Actually, I deliberately left most of the threads unlocked. Upon seeing your post, I added an "Introductions" forum, but the "General Discussion" forum could have been used for introducing yourself. Check your PM, Spaskis.
     
    Corti and SPASKIS like this.
  9. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    It's been a busy week this week. Early on in the week, I got the editor to load a DLL file that implements simulator-specific support. There's only one problem: When I implemented the DLL in a manner that simulates how another user would implement a DLL, the track editor simply refused to compile. I'm currently working on a solution to that problem. And I was so close to being able to implement the 3D graphics engine!

    On another note, I started to move my website to a new host today. One that will allow stuff like activation emails through to those who register with the site. If you were to visit the site right now, you'd get a 404 error and a "not secure" warning. Once the site is back up, I'll resend the activation emails on any accounts that are still inactive (once I confirm that the new settings are working). The site should be back up on or before Monday.
     
    Corti and SPASKIS like this.
  10. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Got the emails on my website working now. There should be no more issues. All users with inactive accounts have been sent a reactivation reminder email so that they can activate their accounts.
     
    Corti, SPASKIS and Oddonis like this.
  11. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    I think I finally solved the problem with the editor's API, and I've published an early version of the API on GitHub (link on the official page). I'm currently working on (a) making the mesh generator feature-complete, (b) making a grid generator and (c) getting the track editor to utilize all of the functionality of the API. The New Project dialog box has been updated because the previous version was malfunctioning for some unknown reason. For those who decide to use the API in it's very early state, it should technically work with the track editor, but that's not guaranteed.

    Also, everything about my website is working as it should. I even added a forum specifically for feature requests. I also added a development area that I can accidentally knock down without losing data on the main site. This will probably be the last post that updates you on that website as it has a forum for such discussions. Probably starting next week, I'll start posting updates on the official forum for the CTC in the appropriate thread.
     
    Corti and Oddonis like this.
  12. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    This week was spent debugging a few quarks of the MFC framework that was causing the track editor to misbehave. The good news is that it was just a single line of code that mapped a message to a function that the track editor was never going to use. This line of code is placed there for every "MDI" project using the MFC framework. That single line of code (and the corresponding function) has been removed.

    It pleases me to report some very good news concerning the compiler that I'm using. Visual Studio 2017 recently got an update that fixed a problem that forced me to use VS2015. So now I don't have to use two different compiler versions on this project. Oh, and I finally got the old version of the track editor working again after trying desperately to figure out what was wrong with the new version. It's coming to the point where I could just delete the old version and it wouldn't affect the project at all. I've kept it all this time more as a reference in case something goes wrong. But now, because the new version has all of the features of the old version, I almost don't need the old version anymore.

    The API got a major update as well. There are now more functions and more options to configure. Plus there's a brief tutorial on how to use the API on the GitHub page. I also have been using NR2003 to test the API functionality and it appears to be working perfectly.

    The Chapman Track Creator now has multi-threaded rendering implemented. That said, I'll be implementing a way for the track editor to update and send the generated mesh data over to the DLLs to be rendered. Now that the API seems to be working fairly well, I have been adding stuff to the UI to allow the user to change how the track is presented to them. Also on the topic of mesh generation, I've made a few changes to the event system that will make it easier for me to get the various objects to communicate with each other. I guess I should also implement a way for users to add stuff via the viewport now that the new rendering system is working. But first, I'm going to finish-up the mesh generator.
     
    Corti, Juergen-BY and Nibiru like this.
  13. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    I haven't been working that much on the track editor this week. I've been busy with other stuff. But I have learned something interesting this week: With the spin control provided by the win32 API, clicking the up button decreases the value and clicking the down button increases the value. Go figure. All this means is that I had to swap a couple of operations to get the correct behavior. I'm hoping to get a little bit more done before the end of the day.
     
    Corti likes this.
  14. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    The grid generator is complete and is waiting to be tested. The mesh generator is going to take a bit longer though as I was still trying to figure out how the various objects would communicate with each other. I have figured it out and am working on implementing it. I have also figured out how the track editor will send the generated geometry data over to the rendering engines and have been changing the API to accommodate this.

    For the track's wireframe, the vertex list can be updated for all of the sections at once with no performance impact for highly-detailed segments. At least not on the side of generating and updating the list. Hopefully not on the side of rendering either. There will probably not be a performance impact on the surface vertex list generation either as both are simply a list of integers describing their position along the segment and I only need a total of one list for the wireframe and one list for the surface vertices. Wall vertices may be a different story, especially for the catch fences, but I think I can at least optimize the walls just as much until you try to curve them.
     
    Corti, SPASKIS and Nibiru like this.
  15. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    I've been rather busy with other stuff the past couple of weeks. So I haven't worked on the editor at all last week, and only the past day this week. I'm was hoping to be able to test the grid generator, but the DLL I'm using doesn't have all of the correct code in place. That should be an easy fix though.

    By the way, I've made quite a few changes to my website, so I've updated the links on the first page of this thread.
     
    Corti likes this.
  16. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    I finally got enough of the API done to test the grid generator. It works perfectly. The grid can be rescaled, and the overhead camera can be zoomed and moved just like in Sandbox. I've been trying for a little while now to fix an issue with the diamond being in the wrong place when the camera is moved, but other than that, everything is working perfectly. A screenshot is posted below. I'm hoping to be able to get that last kink out of the display by the end of the day, then next week I can work on displaying the track wireframe.
    Generator_Shot_2.png
     
    Corti, VirusGR42, Hazi and 3 others like this.
  17. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    I'll be a few more days before you see the first sign of any track geometry as I put the code for sending the geometry to the renderer in the wrong place. In addition, I forgot to code the renderer to do something with the geometry data given to it. Oops! So I'm correcting that now.

    By the way, the data given to the renderer is not the actual geometry. Generating the actual geometry on the CPU would get too expensive after a while. So instead, the renderer is given the data it needs to generate the geometry in the vertex shader (which is run on the GPU). The data given to the renderer doesn't have to be updated as often, and updating that data it is very cheap.
     
    qusimano, Hazi and Nibiru like this.
  18. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    The project got side-tracked for a few weeks while I ran some experiments with other things (bad idea) and lost track of what I needed to do next for the track editor. I spent most of this week trying to implement a way for the track editor to render X Sections (which controls the elevation profile/track banking of individual segments). This has been a little bit more difficult than I thought it would be because I misplaced the code that would generate the data to be used by the rendering DLLs. I've been trying to rectify that. I was hoping to post a preview of the X Sections being rendered, but that's going to have to wait a bit longer.

    I also haven't been able to test the rendering system that I do have because every time I update the SDK's LIB and header files, I end up making more changes that require further updates. I'm aiming to be able to get some tests in during this upcoming week, including screenshots. One of the things I'm not so sure about, is how the track editor is going to respond to the X sections being created before the paths. And I ran into a problem with track sections in general and the event system, so I'm going to have to rethink how section data is sent to the renderer.

    One thing I have realized is that I may have gone about representing these objects in a relatively inefficient manner, but it's too late to change it. The good news is that if my rework of section rendering works out the way I think it will, it won't really matter. But there are areas where the code is looking like it could be greatly optimized and such optimizations would speed-up development in the long run. I may try making those optimizations in addition to the section rendering code this week if I have enough time left.
     
    Corti, SPASKIS and VirusGR42 like this.
  19. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Progress Report Time:
    A lot of the problems mentioned in the previous post have been rectified. And as it turns out, I don't need nearly as many events as I thought I did to get the X Sections to render correctly. So the events connected to section properties changing are mostly irrelevant right now. Anyways, here are the test results:


    [ERROR]

    After optimizing the rendering code so that I didn't have to go through multiple segment loops, I finally got the X Sections rendering. There's just one slight problem: The length of the X Sections is 3 times the length of the segment, which didn't update properly when I changed the segment properties.

    [ERROR]

    The solution to that problem was fairly simple: Give the shaders that render the sections the correct parameters rather than the incorrect parameters. So now they render correctly. There are a few more things I need to tweak in order to make sure that I can change the color of the sections, but everything is working perfectly so far.

    The next item on the list is to get the segment selection boxes working correctly so that you can see which segment is selected and which section on that segment is selected. And then I need to put in some code that allows you to select and insert sections and segments from the viewport. I also need to add code to render other types of sections and to render straight F and W sections on curved segments. Another thing I need to do: Add code to update the rendered geometry for straight segments that are modified. Oops!
     
    Last edited: Apr 22, 2018
    bravotangosix and Corti like this.
  20. TChapman500

    TChapman500 Registered

    Joined:
    Nov 6, 2010
    Messages:
    226
    Likes Received:
    110
    Sorry about not updating this thread for so long. I've just made a video trying to explain how I want the editor to work.
     
    I_Bellett, fab06, Guimengo and 3 others like this.

Share This Page