[v0.05] Blender BGO Exporter

Dummiesman

Member
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 : dead link
Blender Examples, updated May 30th, 2016 : dead link
AI Generator Version 0.0.2, released June 1st 2016 : dead link

Enjoy! Hope to see some new content being created with this :)



Download links are contained in this post
 

The Very End

Well-Known Member
Weeked Smasher
Master Blaster
Re: [v0.01] Blender BGO Exporter

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

Devin

Member
Re: [v0.01] Blender BGO Exporter

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

Member
Re: [v0.01] Blender BGO Exporter

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
 

Dummiesman

Member
Re: [v0.01] Blender BGO Exporter

PsychOXRat said:
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.
 

orbotnive

Member
Re: [v0.01] Blender BGO Exporter

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

Member
Re: [v0.01] Blender BGO Exporter

Dummiesman said:
PsychOXRat said:
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

Member
Re: [v0.01] Blender BGO Exporter

Devin said:
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.
 

Dummiesman

Member
Re: [v0.02] Blender BGO Exporter

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.
 

PsychOXRat

Member
Re: [v0.02] Blender BGO Exporter

:/ 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
 

Devin

Member
Re: [v0.01] Blender BGO Exporter

Dummiesman said:
Devin said:
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

Member
Re: [v0.01] Blender BGO Exporter

Devin said:
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
 

PsychOXRat

Member
Re: [v0.02] Blender BGO Exporter

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:
 

Devin

Member
Re: [v0.02] Blender BGO Exporter

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

 

Dummiesman

Member
Re: [v0.02] Blender BGO Exporter

Make the texture datablock name the path to the texture relative to the game directory.


As for the rotation issue, you probably got the vehicle importer with some weird transformations (rot/pos/scale), or are using the wrong axes. This is how the example .blend is setup for axes.
 

Mazay

Member
Re: [v0.02] Blender BGO Exporter

Could the problem model have something like negative scale? Just a guess.
 

Devin

Member
Re: [v0.02] Blender BGO Exporter

Okay, I got one single texture partially working. That's it. And even that required me to rename the car mod_vehicle_1. Also, the thing in blender is just a mess now. The axes are completely wrong and I can't seem to fix them. So... if I send you the .blend and the textures, would you be so kind to take a look at it and tell me what I've done wrong, especially with the axes? It is just so weird :D

Thank you very much for your hard work! This is much better than using 3ds max :D

@Mazay I haven't actually thought about that yet. Would be weird though because the game somehow seems to invert a value, axis or whatever, if that's the case. I'll try tomorrow, thanks!
 

Heddly

FOJ Supporter/Modder
Team Bugbear Member
Re: [v0.02] Blender BGO Exporter

PsychOXRat said:
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:
Many thanks to Dummiesman for all of the long hours it took to do his magic. 8)

I just installed the Blender BGO Exporter and finally got a look at the example model. In your export I see that your model is using mutiple textures for the tire and rim parts. In FO1 and FO2 the tire and rim shared one texture, I have seen other games use a separate texture for the tire and rim, but only one for each and not more than one.

If the tires are using other textures that receive damage, that may be why your tires are acting up. Also I would make sure the tire and rim pivot locations match. Just trying to help, I am kinda new with blender.

edit : I forgot to mention that I had to remap the tire and rim parts to one texture to work in game.
 

Dummiesman

Member
Re: [v0.02] Blender BGO Exporter

There are multiple textures on the "tire" objects in the example file. Try adding the damaged + lod rims, and see if that fixes it. At one point during plugin development, I had the same issue.
 
Top