[WIP] rFactor2 export scripts for Blender 2.80+

Discussion in 'Third Party Content' started by Traveller, Dec 6, 2020.

  1. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    New Year's Eve update... Code update complete, the heavy lifting is done. The last two items added brought back functionality done away with when the switch to node based materials was made. That code was found, put back in and modified from the old material system to the node based system. I've posted the current scripts to the Discord group for testing. I'm working on the .blend update code while waiting for their feedback.

    So, looking forward...finish the .blend update code and implement changes from any feedback. Send that out to the group for testing and finish the release notes. Make any last minute changes needed and send that out for testing. Then release after no more changes needed. Release will be announced via a new thread. FYI, current development is on Blender 3.3.1.
     
  2. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    New Year's Day night update... .blend update routine written and works as expected on my test car and track .blends. Sent the new package out to the Discord group. Awaiting feedback now. Will work on release notes while waiting.
     
  3. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    249
    Likes Received:
    310
    @Traveller Is there anymore news on when this may be released? I don't want to sound impatient, I was just wondering if it is still progressing.
     
    dradecki likes this.
  4. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    I almost posted an update last week or so... It is progressing. I added a late idea on my part, really trying to look to the future. You should spot it in the screen shots below. One of my testers threw some ringers at me for the update_blend() routine during what I thought was the last round of testing. Shows what I get for daring them. I worked on them, then thought of some ringers myself. I hope to have those taken care of tonight or tomorrow, then send it out for another round. Hopefully the last one.

    Attached are two sneak peak images. One with the various parts of the scripts' UI visible at the startup of Blender, and one after Initiate_Scene('GEN') has been executed.


    Edit: I see something that needs to be taken care of.
     

    Attached Files:

    Last edited: Apr 11, 2023
    Emery, Leonardo1962, dradecki and 4 others like this.
  5. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    249
    Likes Received:
    310
    Thanks for the update, it looks good. What is the "look to the future" part, I can't spot it. Maybe I'm not looking in the right place, though it does sound intriguing. Can't wait to try it out when released.
     
  6. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    Cameras in this case. I added them back in January. There is now a difference between SCN and GEN besides those three bytes. Those cameras are the reason for the hold up now. I haven't got update_blend working 100% correctly with them.
     
    Emery and DiggerHawk like this.
  7. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    249
    Likes Received:
    310
    I did notice the camera bit, but I didn't want to look stupid if there was something more obvious I had missed, honest.
     
  8. Frederick Alonso

    Frederick Alonso Registered

    Joined:
    May 29, 2020
    Messages:
    397
    Likes Received:
    2,648
    Not directly a script for rF2 but I'm working on some node controls to create non tiling PBR maps directly out of Blender. I was so bored of AI tools (even expensive ones) never resulting in what I wanted. So as test I show what I did make with a 128 pixel very bad texture candidate, tiled and rotated with soft blending tricks on the edges. [​IMG] [​IMG]
    You cannot spot issues on just one diffuse and bump map without nothing else.
    Will need further tweaking and a screencast from myself to guide people thru my node controls.
    Time is what I come too short but maybe it triggers others to go wild in Blender ;)

    The plane in Blender is 12 meters in size, square and this is exported to a 8K tga. Then scaled back to 4K and setup with a terrain shader with scale 2 instead of 1.
     
    haunetal1990, Corti and FuNK! like this.
  9. Philip00

    Philip00 Member

    Joined:
    Jan 19, 2012
    Messages:
    116
    Likes Received:
    48
    H all,
    I would like to ask some help regarding the script.
    Some reason I cant enable in the prefences tab, I got the following error:
    upload_2023-6-20_14-42-32.png

    Can someone help me what do I do wrong?
     
  10. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    @Philip00 I don't use Blender, but i think that @Traveller did say that he currently is updating the Scripts to the newer Blender Versions.
    So i think, that your Problem is one of the Things that shall be fixed too.
     
  11. Philip00

    Philip00 Member

    Joined:
    Jan 19, 2012
    Messages:
    116
    Likes Received:
    48
    Thanks @redapg I hope so as I tried to use older version (2.80) but I got the samer error unfortunately
     
    Last edited: Jun 20, 2023
  12. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    249
    Likes Received:
    310
    I'm using script version 210711 with Blender 2.93 successfully if that helps. I haven't switched to the newer Blender versions (3.0+) because that would require a newer version of the script which isn't available yet. I think version 2.8 may be too old for this script, I have a copy of blender 2.79 which uses version 0.7.8 of the scripts for instance.
     
    Philip00 likes this.
  13. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    The magic number error is a Python version mismatch, if I remember correctly. The Blender version the scripts were made with is in the __init__.py. I thought that was made visible in the Preferences window. Since it is not, Blender versions will be included in the description of the scripts. Example below.
     

    Attached Files:

    Mauro likes this.
  14. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    Where we're at... I believe we are close to release. I know I've posted that before, and it seems the lyrics of the old song applies a lot to this project, "you know the nearer your destination, the more you're slip-slidin' away." However, I think this time is different.

    The hang up right now is I have a tester who has a straight crash to desktop of the game with a specific GMT. This is a GMT that is part of a set, and there are seemingly no issues with the others of the set. We've talked over Discord and he is investigating the issue. At the very least it will be a lesson learned of what not to do in Blender. More usefully, hopefully I'll be able to code against whatever the issue is so it doesn't happen in the first place. There are no indications of a problem during export, yet the game crashes.

    The scripts are currently being developed on Blender 3.6.0 and may work with as early a version as 3.1.0.
     
  15. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    249
    Likes Received:
    310
    It's great news that release is close.
    In regards to the rF2 crash to desktop with a particular GMT, could it be that it contains two or more materials with the same name? I have noticed this myself in the past and it is a sure way of crashing to desktop when loading a car. The GMT will export fine but rF2 will not like it.
    If it is something that you have already suggested that's fine but I wanted to mention it, just in case.
     
    Gilles Benoit likes this.
  16. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    Release link provided to the testers for final checks.
     
    tuki, Emery, DiggerHawk and 3 others like this.
  17. Frederick Alonso

    Frederick Alonso Registered

    Joined:
    May 29, 2020
    Messages:
    397
    Likes Received:
    2,648
    I give away some Blender Projects, might get people going. [​IMG]

    I have Kymiring and Falkenbergs Motorbana https://discord.gg/wYVMhZrsM6 Files are on my server.

    Also Falkenbergs Motorbana is available, for that one I want credits and eventually can help on collaboration. It was a tutorial track I did from scratch. Only one section needs better elevation on T3 - T5 part. [​IMG]

    https://discord.gg/wYVMhZrsM6 Files are on my server.
     
  18. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    Emery likes this.
  19. ratonmalo

    ratonmalo Registered

    Joined:
    Nov 16, 2023
    Messages:
    1
    Likes Received:
    0
    Hi all, I been following the cool stuff here.
    I was wondering if the rFactor2 export scripts allows import rFactor2 .MAS environments into Blender? Thanks!
     
  20. Traveller

    Traveller Member

    Joined:
    Oct 7, 2010
    Messages:
    863
    Likes Received:
    486
    No, concerning importing, or even opening, MAS files.
     

Share This Page