Author Topic: [v0.05] Blender BGO Exporter  (Read 15503 times)

Dummiesman

  • *
  • Posts: 107
IMPORTANT NOTE : The doesn't support the full BGO3 spec as of yet. This is not in a complete state but is still being actively worked on. If you encounter bugs or issues with the exporter directly, please use this thread and I can try to provide support

Blender BGO Exporter
This is a BGO3 exporter I created for Blender users to be able to create mods for Wreckfest.




The Example Vehicle .blend File

The .blend file isn't a 1:1 copy of body.max from the vanilla game, due to the lack of standardization between Blender and Max with exports/imports of intermediate formats , however, it's very close to being a 1:1 copy. This .blend file contains what you need to get started in modding the game with vehicles.

Things in this .blend file are sorted into layers.
LAYER 1: Main visible LOD, as well as dummies
LAYER 2: LOD1
LAYER 3: LOD2
LAYER 4: Physics data
Note that all layers will export, even past layer 4.

CustomData
This field is set in the custom object properties section



Textures
In the textures tab, the actual datablock name will always be preferred to filename if the filename does not exist.

If a texture does not end in .tga, or has an invalid name, the exporter will select a default red common texture.


Upcoming/planned features
-Support for double sided materials via custom property

A Final Note
Gotta give a shoutout to the Bugbear team, specifically Janne, for motivating me and assisting me with issues I ran into!

Plugin Download
Version 0.05, released May 30th, 2016 : BGO_Blender_Exporter_005.zip
Blender Examples, updated May 30th, 2016 : Wreckfest_Blender_Examples.zip

AI Generator Version 0.0.2, released June 1st 2016 : AIPathGen002.zip

Enjoy! Hope to see some new content being created with this :)
« Last Edit: June 02, 2016, 06:43:55 AM by Dummiesman »

The Very End

  • *
  • *
  • Posts: 1846
Thank you :)  Hopefully someone will create awesome things with this. Next project should be objects / tracks ;)

Devin

  • *
  • Posts: 343
This is just awesome! I currently don't have a machine with NCG on it available, but once I do, be prepared for F1s, CARTs and some other vehicles :D

PsychOXRat

  • Posts: 287
If only I knew the layout of Blender, or could actually use it :P need to scale my model down that worked fine in max as for some reason Blender makes the model 46 metres long, So if I can't figure out why the Max exporter doesn't like textures, I'll have to use this after learning how to

System Specs: Intel i7-7700K CPU, 16GB RAM, Nvidia GTX970 from GALAX

Dummiesman

  • *
  • Posts: 107
If only I knew the layout of Blender, or could actually use it :P need to scale my model down that worked fine in max as for some reason Blender makes the model 46 metres long, So if I can't figure out why the Max exporter doesn't like textures, I'll have to use this after learning how to

Use OBJ to export to Blender from 3dsmax.

Janne Suur-Näkki

  • *
  • *
  • Posts: 1550
So awesome so see that your hard work paid off. Thanks for sharing!
INTEL i7-4790K @ 4.8GHZ || EKWB WATER COOLING || NVIDIA TITAN BLACK || GIGABYTE G1.SNIPER Z97 || NEXUS RX-8500 || 16GB CORSAIR VENGEANCE || 500GB SAMSUNG 850 EVO SSD || 4TB HDD || ASUS PROART PA279Q || ASUS PROART PA248Q || 3DCONNEXION SPACEPILOT PRO || NI KOMPLETE AUDIO 6 || WINDOWS 8.1 PRO

Orbotnive T

  • *
  • Posts: 486
Thanks a lot Dummiesman. Now to try and find out how to begin finding out how to create/set up vehicles :D

It's not the modelling although not saying that's easy for me, it's what considerations to keep in mind toward the breakable parts and deformation while creating that I wonder about personally.





Devin

  • *
  • Posts: 343
If only I knew the layout of Blender, or could actually use it :P need to scale my model down that worked fine in max as for some reason Blender makes the model 46 metres long, So if I can't figure out why the Max exporter doesn't like textures, I'll have to use this after learning how to

Use OBJ to export to Blender from 3dsmax.

He already has it in blender, he just can't figure out how to rescale it in there :P I gave him an FBX which is out of scale. The same thing happened when he used 3ds max, but there he knew how to rescale it :P

I actually recommend .FBX for getting a 3ds max project to blender, as in my opinion it offers the best compatibility while OBJ keeps losing materials, smoothing groups etc for me. I prefer FBX for getting stuff from max to blender, and blender has excellent support for the format.

Dummiesman

  • *
  • Posts: 107
I actually recommend .FBX for getting a 3ds max project to blender, as in my opinion it offers the best compatibility while OBJ keeps losing materials, smoothing groups etc for me. I prefer FBX for getting stuff from max to blender, and blender has excellent support for the format.


You've been getting better results than me then. From body.max > fbx > Blender


Anyways, getting a bit off topic :P


Woo already found bugs!
- Exporting textures won't work with a mixed, or uppercase .TGA extension

Will be pushing out a fix in a bit. After attempting to fix the lights game crash.
« Last Edit: April 30, 2016, 10:43:37 PM by Dummiesman »

Dummiesman

  • *
  • Posts: 107
Pushed a fix for the game crashing with default lights file (Had invalid materials indexes on some bmeshes in the blend file.. 'cause Blender API lets you do that), as well as a fix for TGA files not registering with a capitalized or mixed case extension.
« Last Edit: May 01, 2016, 12:46:05 AM by Dummiesman »

PsychOXRat

  • Posts: 287
:/ I would have used this to hopefully fix texture issues I've had, but Blender is just too different from Max for me to use and I just got annoyed of looking at it for ages and getting nowhere
System Specs: Intel i7-7700K CPU, 16GB RAM, Nvidia GTX970 from GALAX

Devin

  • *
  • Posts: 343
I actually recommend .FBX for getting a 3ds max project to blender, as in my opinion it offers the best compatibility while OBJ keeps losing materials, smoothing groups etc for me. I prefer FBX for getting stuff from max to blender, and blender has excellent support for the format.


You've been getting better results than me then. From body.max > fbx > Blender



It has been the other way around for me, OBJ gave me similar results :P
FBX:


OBJ (exported from blender, re-imported later, also messes up object names but at least doesn't lose smooth group info like max exports):


Anyway, you're right, sorry for off-topic!

So, how does transparency etc. work? I've seen the blender plugin you made for Midnight Club (was it that game? Don't even remember :P) and for transparency, I could simply set blender's transparency value. How does it work in NCG? Also, how does reflection work? I'm guessing it uses the Alpha value of the texture, but how exactly do I set a flag for the game to know that it's supposed to apply a reflection to it?

Dummiesman

  • *
  • Posts: 107
So, how does transparency etc. work? I've seen the blender plugin you made for Midnight Club (was it that game? Don't even remember :P) and for transparency, I could simply set blender's transparency value. How does it work in NCG? Also, how does reflection work? I'm guessing it uses the Alpha value of the texture, but how exactly do I set a flag for the game to know that it's supposed to apply a reflection to it?


Transparency works with the standard alpha value in Blender.


As for material setups, I have no idea how that works yet. I have yet to experiment myself. I'm just following format specifications, haha :)

I've also made it though, so that the indexes on the 3dsmax Maps should line up with the Blender textures slots


ON A SIDE NOTE: Most likely going to push an update later today
« Last Edit: May 01, 2016, 12:40:39 PM by Dummiesman »

PsychOXRat

  • Posts: 287
Tried it out on the B194 today as yet again the Max exporter gave me the Export- Plugin failed! error, things... didn't go to plan as this happened when I tried to go from bgo3 to vhcl:
System Specs: Intel i7-7700K CPU, 16GB RAM, Nvidia GTX970 from GALAX

Devin

  • *
  • Posts: 343
I might need a little help. First of all, some parts of the car seem to be using inverted axes. For example, I had to rotate the car itself 180° on Y and X to make it align ingame with the unrotated collision data. For some reason, I had to rotate the wheels 180° around Y again or they would be inverted like in this video. All rotations were done around 0,0,0. In blender, it looks horribly wrong, but it works ingame now. Well, it didn't in the video. My question is: why?

Another important thing I can't get to work is the textures. I put my car into the art dir, put my textures in there as tga and bmap, selected those textures in blender (they showed up and blender used relative paths, so just //texturename.tga) but ingame they were just ignored and others were loaded instead. You can see that in the video too. Can you help me with that a little? :D

« Last Edit: May 02, 2016, 08:03:56 PM by Devin »