[TOOL] ai route visualizer v0.12

Mazay

Member
PHP ai route visualizer

Shows routes from .scne file on html page. Generates .obj model file that can be imported to Blender and 3dsmax for editing. Obj file units and route naming is matching to Bgo exporters so routes can be again exported back to .scne.

Note: Ai Route Visualizer is no longer updated. To view alternative routes etc. use Blender SCNE Importer instead.


Features:

Obj exporting:
- Exports .obj model with routes and checkpoints.
- Compatible with bgo exporting tools.

Route visualization:
- Converts ai_route.scne into SVG image.
- Click on image to view coordinates.
- Coordinates and dimension are kept (1 unit = 1 pixel)
- Comes with PHP so it works out of box.

Problems:
- Alternative routes will be ignored



Download Here


How to use:
Paste your ai_route.scne into input_file folder and run Generate SVG Image.bat
SVG image should be generated and opened in browser.


Credits:
Breckfest.exe is bundled inside and all credit about that awesome tool goes to Errol:
[TOOL] Breckfest v1.5.0 - BMaps made tasty
 
Last edited:

Devin

Member
Re: [TOOL] Buggy PHP ai route visualizer WIP

Someone could just publicly host it on a web server :p
Mine is currently in use, but I'll see what I can do. Just an idea though :D
 

Mazay

Member
Re: [TOOL] Buggy PHP ai route visualizer WIP

I was thinking of that also, but it would need bit work to have upload function in place. Be free to edit/improve it.

I was also thinking to make it run in php commandline to write directly svg in file so no server is needed.


But yeah there it is the way it is :p


Edit: Made it to run from commandline and included php so it's now little easier to use.
 

Purple44

Well-Known Member
Team Bugbear Member
Re: [TOOL] Buggy ai route visualizer WIP v0.02

Got to try out the ai route visualizer today Mazay. Program was a big help for me being able to visually see the checkpoints and sector points to make sure the are whaer you want them. :D :D :D :D

Here what the checkpoints and splines look like on the small stadium banger oval I was working on today:



Not sure Mazay if that your program pointing last spline to the middle 0,0? Seen this happen on couple the oval tracks I took a look at. They other tracks I look at, did not do this.

I did run into an issue when I tried to have browser take top half of screen and Bagedit the bottom half. With browser screen at fullscreen and I did not scroll the window, coordinates are accurate. but if scroll the window, even in full screen, then X coordinate get off.





It something people should be aware of when using the ai route visualizer.

Thanks for getting the checkpoints to load into ai route visualizer. :D I got one more request, don't know how tough it be to do it. It would help a lot if I could take a pic of track from above and load pic into ai route visualizer. So I get better idea where the checkpoints are on the track and would help in making better guess of what coordinates to use for an object if I could see where I'm going to put object.

Again, a BIG thanks for the ai route visualizer Mazay. Program definitely help me out. Now just need to figure out how to get checkpoints to play nice with spline points! :p
 

RickyBobby

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.02

This was VERY helpful, as I wanted to expand 2 or 3 AI sectors on the big figure 8. Could not have done it without this tool. Thank you!
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.02

Purple44 said:
Not sure Mazay if that your program pointing last spline to the middle 0,0? Seen this happen on couple the oval tracks I took a look at. They other tracks I look at, did not do this.
...
I got one more request, don't know how tough it be to do it. It would help a lot if I could take a pic of track from above and load pic into ai route visualizer.
That's just my code bugging out. Should be better now. It can end up drawing all kinds of spiderwebs. :p

I added simple html background image. Put in folder background_image.png. It works, somehow.
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.06

Updated. v0.06:

Little less hardcoded and opens lot more files including valer.scne
 

Purple44

Well-Known Member
Team Bugbear Member
Re: [TOOL] Buggy ai route visualizer WIP v0.06

Mazay said:
Updated. v0.06:

Little less hardcoded and opens lot more files including valer.scne
WHAT???? I can open a track file now!! :D

Thank Mazay again for the visualizer tool. :D


Edit: I just give v6 a test and it work with the valer.scne track file. :)
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.07

Updated. v0.07:

Exports routes as .obj model. Works with 3dsmax and Blender.
Useful for positioning stuff on existing maps etc.

 

Purple44

Well-Known Member
Team Bugbear Member
Re: [TOOL] Buggy ai route visualizer WIP v0.07

Mazay said:
Updated. v0.07:

Exports routes as .obj model. Works with 3dsmax and Blender.
Useful for positioning stuff on existing maps etc.


But we still can't load Bugbear stock tracks into Blender or 3Ds Max yet? correct?
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.07

Yeah we can't load full stock tracks, only the route.
Still the route alone gives hint of positions.

Here I loaded route in Blender, added wall, exported .scne and added this as subscene in Bagedit:

 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.08

Updated. v0.08:

  • Obj route conversion works now in precision. Routes can be imported and exported without visible changes. (Obj>Blender>Scne)
  • Larger tracks load properly.
  • Last sector of route no longer bugs
 

RickyBobby

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.08

I have a little issue with the blender import-export on some tracks.

Problem: I open the .obj file in blender, export it to .scne, the sectors then have a reversed order. Most tracks work fine I think, but some get reversed.

Once the sectors are reversed, they stay that way - meaning, when I open and export the already exported version a second time, it stays that way and won't be reversed again. damn it, could have been so easy ;)

Can I avoid that somehow? Can I add something like "otherway = true" in blender? (don't know how.)

original Speedway1 Figure8 (left) / opened in blender and exported to .scne (right)


original Speedway2 Figure8 (left) / opened in blender and exported to .scne (right)


original tarmac2 (left) / opened in blender and exported to .scne (right)
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.08

That's interesting. My code just uses the order sectors are found in .scne.

From Bugbears track_modding.doc:
In 3DS MAX, select the #ai_route_main object (the “Blue Sectors” of the Main Route).
In the context menu that pops up, select “Properties”
The “Object Properties” window pops up. Select the “User Defined” tab.
In the “User Defined Properties” field, add the line: “otherway = true” (without the hyphens)

This will force the Sectors to go the other way, fixing the issue.
I think Blender equivalent would be to go to object menu and add Custom property:
Name: CustomData
Value: otherway = true


Haven't tried this by myself, but tell me if it works :)
 

RickyBobby

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.08

Mazay said:
I think Blender equivalent would be to go to object menu and add Custom property:
Name: CustomData
Value: otherway = true
Actually, I tried that before the first post and got an error from build_asset.bat. I was sure it didn't work. Now I tried it again and got the same error, but this time the .scne file has been generated. I guess it worked the first time I tried, I probably just didn't see the .scne file, only the error text file and assumed it didn't work. So.. yeah it works.


This is the error message btw:
src\btoolcore\BgoImporter.cpp(426) ERROR : #ai_route_main : custom data has illegal key otherway

Maybe interesting side notes:
- If I import the once exported file again and export it without "otherway = true" it will be reversed again this time.
- In game, the raceline mystery anomaly appears again (with the tweaks in .tcat). That's most likely a BugBear issue, as Andrei suspected.

Editing sectors is now quick and easy to do with this tool! Thanks a lot. Perfect for my current needs :)
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.08

I did some testing, reversed sectors in .obj and it seems this sector order does not have any effect to order which ends up to .scne.
it's all mystery how the order is chosen. So for now it's best just to add "otherway = true" when route needs reversing.

I am curious how do you use the tool. Do you copy the sectors from resulting .scne with BagEdit to get everything in one file?

I still plan to add checkpoints and startpoints to make editing even easier.
 

RickyBobby

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.08

Mazay said:
Do you copy the sectors from resulting .scne with BagEdit to get everything in one file?
Yes. Wouldn't know any other way atm. I use the AI_visualizer to convert .scne to .obj, edit in blender, export to .bgo with the bgo-exporter, use build_asset.bat to get new .scne file with the sectors, then copy those sectors into the trackXY.scne file. Just to have it all in one file. I guess it would work with the generated .scne file as an extra AI_route.scne file, that would be one copy&paste action less. I don't mind the 2 extra clicks.
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.09

Ok, good to know. I had problems with copying in BagEdit, but it was not recently when I tried that.

The extra ai_route.scne way won't work atm., because it seems routes, checkpoints and startpoints have to be in same file.
 

Mazay

Member
Re: [TOOL] Buggy ai route visualizer WIP v0.09

Updated. v0.09:

Checkpoints included in .obj file.
Works now also with _split _loop and _alt1 checkpoints.
 
Top