W.I.P. Pinwheel Circuit

Discussion in 'Tracks' started by John Harding, Aug 11, 2021.

  1. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    17
    Likes Received:
    27
    Intro
    Firstly a quick intro as I’m a newbie here. I’ve been a fan of motorsport since the 90s (mostly F1) and I grew up within about 5 miles of Donington. A friend and I used to cycle to the track as children and watch the BTCC back in its heyday, and lately it’s been really pleasing to see it’s resurgence both in reality and in the sim community of course. I finally bought a wheel in May this year (only a G29 but still), alongside AC, ACC etc. It’s been really fun uncovering this world in the past few months, like a good game of minesweeper :)

    Anyway, I had some time available towards the end of July, and instead of getting out of the house I decided to try and design and make a track for the first time, following the excellent initial guide by @luchian of course. Much joy was had when my spawn objects first worked ;)

    Workflow
    I have good knowledge of Rhino and Grasshopper, so have been using these to model an initial track idea, however my knowledge of textures and shaders is pathetic to be honest, so I’ve been learning a lot in the past two weeks from this forum, and by following a ‘learning by doing’ approach. Indeed thanks to @maruto who has given me some vital tips about working with Rhino, because objects do not have defined origins like in Blender and Max, so some workarounds are required.

    Here is my current workflow which I’ve now switched to, and will grow of course over time:
    [​IMG]

    The track itself, named Pinwheel (inspired by the village in Ether One), is designed around F1 cars, 26 pit boxes and 5.6 km long; about the length of COTA. I spent quite a bit of time getting a layout that seemed challenging and fun, with multiple lines through corners and banking. Indeed, I’m still not sure myself what the best way is around the current layout, which I think is a good thing. I have tried to prioritise the experience of driving and racing at the track as a whole before going into more detail, I’m just about at a place where I’m happy with the layout now to start working on the finer details.

    An isometric view of the track showing elevation change and as yet unnamed corners:
    [​IMG]

    Meshes:
    [​IMG]
    [​IMG]

    The philosophy of this track is not to have too many advertising hoardings, instead use natural materials where possible. It will be a new venue rather than having the atmosphere of a historic track, so getting detail in there will be subtle but still important. The physical track mesh is relatively smooth, with subtle bumps and a few more pronounced ones especially going over the bridge movement joints.

    Texture wise, the track is a complete disaster at present, I’m basically learning as I go along. Trees, kerbs, fences, etc. are currently horrendous in terms of textures/shaders. For example I have a couple of Monza textures which will be replaced. I’m just learning how to blend at the track edges, using masks, etc. but it’s a steep learning curve for sure. Yesterday I figured out how to get my normals and groups working for the ksTrees via Blender, but haven’t updated everything yet (as you can see in the video!). Grandstands, buildings, pylons, bridges, etc. are mainly low poly large wooden blocks at the moment:
    [​IMG]

    Here is a video of a lap (note: textures are placeholders and not finished at all, kstrees not updated, Monza track surface currently, etc.!). Lap time is around 1:30 in the Lotus Stage 1 (some AI have done below this, but I can’t!):





    I’m aware it’s not really the done thing to come up with fantasy tracks, especially not based on a real place, but personally I really enjoy coming up with things from scratch hence my first project having creative licence seemed to make sense. Once I’ve got a better understanding of the process (especially with regards shaders), my next project will be different as I’m making many mistakes.

    Current todo list:
    • Textures: Kerbs, transitions, track surface, etc. All by following the excellent knowledge shared on this forum. Understanding the use of masks and normal maps.
    • ksTree and ksGrass workflow, getting it right from Rhino > Blender > ksEditor, and following the excellent advice from @luchian and @LilSKi in this thread.
    • Improve AI spline (currently some AI seem to like to ram the sausage kerbs!).
    • Joining elements properly and working on LOD values to improve DIP.
    • Move grid and starting line back, but struggling with the cross-over nature of the track here.
    • Many more!...
    Anyway, I will keep updating progress here, and upload a kn5 soon for some much needed feedback if anyone is interested in giving it a whirl. My aim is to help fellow newbies, especially those that might be using Rhino and Grasshopper as there are not many of us out there using that workflow.

    Thanks all,

    John.
     
  2. luchian

    luchian Administrator Staff Member Pilot RLR

    Joined:
    Jun 3, 2014
    Messages:
    2,931
    Likes Received:
    1,430
    Hi John, welcome.

    I'm always happy to read stories of people starting in modding. Even more so, hearing that the information on the forum is useful in this sense. The project looks quite advanced, and the layout seems fun. In my opinion, doing a fantasy track is not that much easier than doing an actual track, because it requires design decisions as well, decisions that need to make sense from a civil engineering pov :).

    Good luck and keep us posted.
     
    Jordan Nixon and John Harding like this.
  3. AccAkut

    AccAkut Active Member

    Joined:
    Sep 4, 2017
    Messages:
    120
    Likes Received:
    103
    Really impressive track, and one well thought out and worded first post. Welcome to the community!
     
  4. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    17
    Likes Received:
    27
    Update (September 2021)
    A quick progress update on where I have got to on the track during the past month. A few late evenings spent learning some more things, making textures, etc. All objects I’m trying to make myself from scratch where possible, so it’s taking a while but I’m really enjoying it. There was a week in August when I was getting a little frustrated with slow progress, making poor decisions which I then had to reverse, but otherwise it’s been good fun.

    Workflow Changes
    Workflow is still similar to before, however I have started using Max to generate animations of wind turbines (see here). One thing that is rather tricky is knowing which fbx version works between software, and whether the z is pointing up. Trial and error has worked well so far, and then just saving the export settings for next time. The blender 100x scale of course being one of these. I anticipate a separate fbx for grass and a few other things, but I’ve found having too many different files can get confusing and difficult to visualise things as a whole as decisions are made (this is just personal taste).

    [​IMG]

    Now that the majority of the fundamentals are now done, I’m using Grasshopper less and less and more editing meshes directly which will continue, as the track currently feels too artificial. For anyone else using Grasshopper, I am using the ‘Human’ plugin to visualise the texture mapping directly, it's ok but it aint using Blender or Max for sure and the texture editing is quite limited in Rhino in comparison. I’d be more than happy to share the file, although granted I know us Rhino Grasshopper people are a rarity. Here is the main model, with other ones for redoing kerbs, placing trees, bumping the physical mesh, etc. I'll probably return to this for any future tracks.

    [​IMG]

    One further thing to mention in terms of workflow here is that I am finding the Intel dds exporter much easier to work with than the Nvidia one, also as suggested by @luchian a couple of years back here: https://assettocorsamods.net/threads/intel-texture-works-plugin-dds.1712/ . It’s just much simpler all round for getting BC3 textures that seem to work well without all the faff.

    Trees
    Since the last update, I have spent some time trying to get trees to work properly, using the excellent thread (link) as my guide. One thing about working in Rhino is that unfortunately objects do not have a defined origin location, and therefore upon fbx export it basically sets everything to 0,0,0. After importing to Blender, these are individual Y-tree meshes then need their origins defining. Luckily I found a little python script from user 'batFINGER' (good name) that will do that for objects such as trees, placing the origin at the base of each tree as advised in order to get the kstree shader to work:

    https://blender.stackexchange.com/questions/42105/set-origin-to-bottom-center-of-multiple-objects

    import bpy
    from mathutils import Matrix, Vector

    def origin_to_bottom(ob, matrix=Matrix()):

    me = ob.data
    mw = ob.matrix_world
    local_verts = [matrix @ Vector(v[:]) for v in ob.bound_box]
    o = sum(local_verts, Vector()) / 8
    o.z = min(v.z for v in local_verts)
    o = matrix.inverted() @ o
    me.transform(Matrix.Translation(-o))
    mw.translation = mw @ o
    for o in bpy.context.scene.objects:
    if o.type == 'MESH':
    origin_to_bottom(o)
    #origin_to_bottom(o, matrix=o.matrix_world) # global

    Thank you Batfinger.

    So I was then able to get the Blocktransform import to the editor to work, although as well as being individual items I had to make sure that all the trees were not part of any nested hierarchy, or whatever the term is in Blender. As someone that doesn’t use the software, this little point to set up trees like this upon export cost me a good few hours! So this structure worked fine in the end:

    [​IMG]

    In terms of the textures themselves, I’m trying to avoid reusing Kunos things so I bought some trees from gobotree.com for £12 (10 high quality downloads). Some were fine, it's really hard to find pine trees on the web and luckily they have some, however the alpha channels on some of these were a little off, meaning that some of the trees have a ‘silver lining’ around them which doesn’t look too great to be honest, especially when the sun comes out:

    [​IMG]

    As mentioned previously, I’m really not great with textures so if anyone has any ideas on how to get rid of this I’d be extremely grateful! At present therefore I currently have a mix of bought trees and Kunos trees, the latter I hope to remove at some point.

    Kerbs
    Previously I just had a flat kerb with some bad texture mapping. I decided to mesh the kerb with raised elements as per this thread. The kerbs are flat adjacent to the track, and taper up to a ridge at the outer edge. Note that there is also physical kerb that isn’t rendered, so this is just for visuals. You can see some Kunos tyre marks running over the kerb, just above. Another tip here (I think somewhere buried in the forum) is to set the tyre groove object to “transparent=true”, otherwise it overrules the groove and/or kerbs themselves when using the blend shader. To be honest, I’m still not happy with the kerbs as they appear a little flat, the hover on the tyre marks is noticable, also the transitions are poor. Work to do. Note that low poly armco also ;)

    [​IMG]

    Pits
    Some time spent on modelling and designing the basic setup. I have decided not to go for a giant structure but something more modest, the circuit is an up and coming venue rather than being an established one. Again, the textures need substantial work, with plywood placeholder at the moment and lines clashing with the track. I'm quietly pleased with this area though, and with the addition of some people things will start to take shape here.

    [​IMG]

    Being a Civil Engineer :)
    One of the fun things about making a track from essentially nothing is that you can create a new world. The danger here is that you end up with a series of objects that don’t really relate to each other. Since starting the project, I’ve developed a thought that the track should have an energy generation type of theme, and hence the site is given a narrative as the site of a former coal mine, which has been transformed to renewable energy. So I modelled a mining tower based on a photograph from Bernd and Hilla Becher (can you guess which one). You can read more about them here: https://www.artsy.net/article/artsy...ouple-turned-industrial-architecture-fine-art .

    [​IMG]
    (ignore the trees, just a rhino render!)

    Next Steps
    I would definitely like to understand the multilayer shader and be able to have a much more natural set of textures around the track. I don’t know what I’m doing here with colour masks, so next update I aim to talk through my learning a bit more to help other newbies. Also grass of course, which will be a load of meshes made in grasshopper no doubt. I also need solar panels, lighting under the bridge, new track textures, tree walls, grandstands, people… ok enough to keep me busy.

    As a final point, I would like to move the grid and starting line back, I have been struggling with the cross-over nature of the track here, and I still don’t know what to do as per this post. I’m kind of resigned to thinking there is no solution, and indeed it will be quite a short run to the first corner, probably not FIA compliant, but still I guess Spa isn’t much better and that’s quite a decent track so I’ve heard.

    Thanks again to everyone on the forum, as you can see I am relying heavily on the knowledge shared by others. I therefore hope these posts might help a future newbie.

    John.
     
    Last edited: Sep 2, 2021
    maruto, luchian, AccAkut and 3 others like this.
  5. luchian

    luchian Administrator Staff Member Pilot RLR

    Joined:
    Jun 3, 2014
    Messages:
    2,931
    Likes Received:
    1,430
    :lol: I love reading this kind of updates. Funny and educative as well. Reminds me a 'bit of @Prototype 's posts when he was working on Kyalami.

    Nowadays, it's less and less common to struggle with modeled grass. You can generate it directly in CSP, and looks great.

    Anyway, great progress, great reporting, "sub'ed" :D

    PS: you actually made me go look at the intel plugin post "Has it been couple of years already?!". Turns out it has. :eek:

    PPS: also, I love the idea of themed track. And this story with old-new energy: awesome!
     
    John Harding likes this.
  6. luchian

    luchian Administrator Staff Member Pilot RLR

    Joined:
    Jun 3, 2014
    Messages:
    2,931
    Likes Received:
    1,430
    Oh, about your problem with the overlapping track: I had the same issue when working on my parking test level. I did not find a solution on how to have spawn points overlapped. Back then it was definitely not possible. Nowadays, maybe still not. But CSP miracles happen everyday..
     
  7. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    17
    Likes Received:
    27
    Ah, yep, I was thinking it might be one of those things that is so uncommon there just isn't a workaround, that probably confirms it. Thanks for the kind words above on progress. I wondered about the grass and whether to go fully grassfx, but still yet to really decide as it's kind of nice to decide on what flowers and plants to include. Perhaps there is a way to mix both (part procedural, part bespoke), but I need to look into it further.

    PS: Yes, time really does go that fast! I've found the time warp effects of 3d modelling also doesn't help matters ;)
     
    luchian likes this.
  8. luchian

    luchian Administrator Staff Member Pilot RLR

    Joined:
    Jun 3, 2014
    Messages:
    2,931
    Likes Received:
    1,430
    Had similar thoughts here. You can actually do a lot with grassfx. See here and here.

    Having said that, if you'd like to model manually, then by all means, you should :nerd:.
     
    John Harding likes this.
  9. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    17
    Likes Received:
    27
    Update (October 2021)
    Introduction
    Now that the ‘honeymoon period’ of creating a track is kind of over, the early enthusiasm has admittedly wavered slightly. I’m guessing this happens with all first timers, so this past month has been a lesson in perseverance which I continue to this day. My routine at present is to get back from work, get a fresh coffee and then work a couple of hours each evening after dinner until my wife gets fed up with the sound of my keyboard. I’ll try to summarise what I’ve been up to in the past 4 weeks; my intention with these posts is to share progress, clarify my own thoughts as well as offering a future resource to first time mods.

    Test Track
    Whenever I wanted to test a modelling or texture idea out, due to the increasing file size it was taking far too long to load the Pinwheel circuit - there are now too many objects and it made the iterative process too slow. So I thought it would be useful to create a secondary small track to test out ideas and also rekindle the early fun of designing something. Using the same Grasshopper scripts, I could quickly create a small circuit in the form of a Trefoil knot (I am a sucker for cross-over tracks clearly). It has enable me to learn more about shaders and texture mapping in Rhino, which it turns out is not that simple! It has been very handy indeed, maybe I’ll work on it further later and publish it. In short, for anyone using Rhino, unwrapping the texture mesh and using the flow command to reorientate the mesh is the way to go if you need your mapping to align with the track edge. This is handy for things like gravel traps that need raking in the particular direction for example.

    [​IMG]
    Plan of ‘Trefoil’ mini circuit for testing out ideas.

    Solar Power
    As mentioned in the previous post, the theme of the track is around power generation (old and new), so I’ve incorporated a small solar farm at two track locations. The idea is that these theoretically power the lights that run at night, although whether they generate enough kWh for that is, er, questionable! However along with the wind turbines it should be enough, I await the energy calculator feature in CSP ;). The frames were simple enough to make, with the texture just a cheapo solar panel on Amazon, which I think looks quite good if I may say so! It turns out Pinwheel City is in the Northern Hemisphere.

    [​IMG]
    Solar farm (one of two on the track).

    Tecpro
    Last time I just had a single layer Armco wall all around the circuit, so some time has been spent on improving the look and feel of this. As any modder will know, the unglamourous task of tweaking vertices to fill in gaps takes time. I also set about modelling some Tecpro barriers to place in specific places. They’re ok I guess, nothing to write home about but I spent quite a bit of time laying these out and then jiggling (technical term) vertices so they have a more realistic feel to their placement. Again, Grasshopper was invaluable as I could create a notional curve, with the barriers then placed along these in a jiggled manner, something now done also with the fences to give a more natural feel. As recommended elsewhere on this forum, the physical barrier ‘wall’ itself is not rendered, sitting just in front of the Tecpro.

    [​IMG]
    Tecpro barriers being modelled with some randomness and then deployed.

    Multilayer shaders
    Thanks to the excellent guide https://assettocorsamods.net/threads/photo-quality-road-surface.834/#post-3602 the track surface has been improved (it’s not yet perfect, but at least better than it was). It’s still the Kunos Monza main diffuse texture unfortunately albeit with my own stones. I intend to release this track free of course, so I might just stick with it as it seems to work, or else take some photos of my local road. My original intention was to have all 3d models and textures my own (no downloads from Turbosquid) which has been achieved almost everywhere, so I would like to continue this although it means more work.

    [​IMG]
    Track surface. The Zepter ad just reminds me of Monaco and Hill’s ’97 Arrows – that’s why it’s there.

    In terms of the landscaping, this has again been a bit of a steep learning curve. Using the Objects Inspector, I have been learning quite a bit from Laguna Seca in terms of using mapping channels. I know that for many of you this is bread and butter, but as someone completely new to how this all works understanding how to use the RGBA channels in a mask image is challenging! I’m also finding it difficult because my track is built from complete scratch, not even using an existing landscape from google maps, so I have no real diffuse map to work with. It doesn’t help that Rhino doesn’t display dds textures correctly either, but probably something most of you Blender users won’t have to worry about.

    [​IMG]
    laguna-seca-terrain-4k image from Kunos (left) and my terrible first go at something (right). Alpha not shown.

    [​IMG]
    Using the alpha channel to make some paths on the infield.


    Lighting
    I’ve also spent some time learning how lighting works with CSP. The documentation is great, taking the newbie through things step by step: https://github.com/ac-custom-shaders-patch/acc-extension-config/wiki/Tracks-–-Lights . This is predominantly a circuit for single seaters, hence the lighting needs to be quite bright (but not too bright!). I spaced my initial light fixtures roughly at 80m centres, with 180 degree spots which seems to work quite well. Some background light pollution enables landscape silhouettes to be seen at night, which looks great for the whirling wind turbines.

    [​IMG]
    Trackside lighting is quite bright to allow single seater cars to race at night.

    MESHES = tracklights
    ACTIVE = 1
    SPOT = 180
    SPOT_SHARPNESS = 0.2
    RANGE = 150
    RANGE_GRADIENT_OFFSET = 0.05
    DIRECTION = NORMAL
    COLOR = 1.6, 1.6, 1.6, 15
    SPECULAR_MULT = 0.5
    SINGLE_FREQUENCY = 0
    DIFFUSE_CONCENTRATION = 0.9
    CONDITION = NIGHT_SMOOTH
    FADE_AT = 400
    FADE_SMOOTH = 100
    SHADOWS_STATIC = 1
    SHADOWS_HALF_RESOLUTION = 1
    SHADOWS_CLIP_PLANE = 0.3
    CLUSTER_THRESHOLD = 3

    Grass
    Turns out Luchian is of course right and GrassFX can do things I didn’t know possible meaning that I have for the most part abandoned creating 3d grass myself and got stuck into what GrassFX can do. Again, the wiki has been very helpful. I have adapted the standard highlands example a little, however one aspect that I can’t seem to change is to keep a plant a permanent shape, some of my dandelions get very wide and I’m really struggling to find a way to keep them all the same size (see image bottom right)! I will probably post a question on the forum later about this. With regards the track edge, this is still a work in progress however I am using a ‘strip’ technique on the edges which may or may not survive now that I’m getting the hang of the multilayer shader https://assettocorsamods.net/threads/blending-method-for-grass-sand-dirt.164/. Creating a 1m skirt mesh alongside the visual track mesh has proved invaluable in terms of plugging gaps and creating a smooth finish around corners before layering up more detail.

    [​IMG]
    First tentative steps into using GrassFX. Not very good yet ;)

    [​IMG]
    Using 1m skirts each side of the visual track mesh (left) before layering on extra detail (right).

    Track Extension
    Due to the long track length, I am also planning a single alternative layout that skips the central bridge crossing, and halves the lap time for less powerful cars. This is shown on the image below, although I am yet to drive this and will be tweaked no doubt! The plan below shows this in relation to the rest of the track objects, more on this in the next post I would presume.

    [​IMG]
    Plan map showing proposed extension and mesh segments

    Optimisation
    Keeping 100fps on my system has been a bit of a constraint I would like to keep. Remembering the days of owning a BBC Micro and seeing what programmers could do with 32k, I am not a fan of bloatware. A less glamourous time consuming task has therefore been making the DIP value run as low as possible in practice mode, which seems to be usually less than 1000 still in most parts of the track thankfully. This I’m achieving by splitting up the main track elements (fence posts, Armco, Tecpro, etc.) into 6 distinct zones on the track (see image above, S1-S6), for which I join my meshes. So for example, all the fence posts are joined into 6 mesh groups, each with around 4000 faces. Then these have LODOut values of around 400-600 at present which seems to work ok, however there is some finessing to do still as some elements pop into existence (in the distance), but generally this change made a HUGE improvement to the DIP (cutting 1500 to 1000 in many places). Again, not a fun job but I can highly recommend that any new modder spends time working on this, probably earlier in the process than me.

    Next Steps
    People! Life! Input! Still the track has no trackside life as such. The grandstands have nice new glulam beam roofs, but no people in them, which is sad. Many trackside objects need some detailed attention, such as adverts, the bridge textures, the church, etc. Still no tree walls done as yet, and for the trees themselves I would like to move away from the Kunos trees I am using – I have a mix of my own pines and some from the Nordschleife which is not ideal.

    [​IMG]
    New roofs for the grandstands made, sadly no spectators!

    So that’s where I am at today, thanks again for all the help that has been provided on this forum - a fantastic resource to someone like me. My wider aim is to release 0.1 before Christmas, probably late November all being well. Depends how annoyed my wife gets with my mechanical keyboard :)
     
    Last edited: Oct 19, 2021
  10. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    608
    Likes Received:
    220
    Wow, great read again and progress!
    The problem on testing with more and more objects: maybe make 2 or 3 KN5's, which you put in "models...ini", i.e. trees in one KN5, road in another...this way you can test only some parts of your track...
    Edit: oh i see you already have multiple kn5s ... edit models.ini :)
     
    John Harding likes this.
  11. luchian

    luchian Administrator Staff Member Pilot RLR

    Joined:
    Jun 3, 2014
    Messages:
    2,931
    Likes Received:
    1,430
    Indeed! :eek: Very inspirational :). I really like these grouped updates, it's like following the posts of a game dev.

    I think that the side of the road method is "old" nowadays, there are smarter ways with multilayer shaders, but it will do for the moment. Good luck and keep it up John!
     
  12. John Harding

    John Harding Member

    Joined:
    Aug 5, 2021
    Messages:
    17
    Likes Received:
    27
    Thanks both! Yes the roadside is quite poor at the moment, will probably return to it at some point soon, needs a bit of an overhaul now that I've learnt a little more. I'll keep at it :)
     
    luchian likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice