Jump to content
Oovee® Games

Recommended Posts

Hi guys I would like to start a thread to try and get any and all information regarding blender and spintires. Having an older computer I am unable to get 3ds max because they only support 64-bit versions, 2014-2016 which obviously don't work on 32-bit system. I've found a few texturing tutorials which I will post links to later on, I'm currently away from my PC. If anyone has any videos, literature, links, pics anything plz pm me so I can add them to a consolidated list for individuals like myself who may only have access to blender, from what I've seen it will do everything 3ds max does, bones and things. New version has 3ds/Maya theme if anyone who knows 3ds can check it out and see if its comparable. Thanks guys.

 

Cheers

GoNzO

Edited by DrGoNzO1489
  • Like 1
Link to post
Share on other sites
  • Replies 310
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Sure, here is a barebones uax mod. You will find the .blend file inside.   Export Lefthanded Y up with the defaults plus:   Export Skin Weights Apply Modifiers Export Armature Bones   https://

Read this thread from the start you will learn allot

Stetson you're absolutely right. Thank you! I've made the cdt modeled and now can spawn the mesh with all errors)    

Posted Images

Sorry to hear that about Max. They used to have a choice of which version to install, 32 or 64 bit. I just checked the versions I have and only 2012 has a 32 bit install option so if you look for it, you'll need to get 2012 for your 32 bit system. You should be able to find it somewhere, if you decide to look for it, then just register a newer version and use that serial number to register. I posted the product keys in your other post for which one you'll need.

 

EDIT: Well, I'm sorry but it looks like I was wrong as I just searched Google for 2012 and all the sites saying they have it looks bogus. I'll try again and see what I can find for ya, if you still want it.

Edited by Tattoo
  • Like 1
Link to post
Share on other sites

Sorry to hear that about Max. They used to Gabe a choice of which version to install, 32 or 64 bit. I just checked the versions I have and only 2012 has a 32 bit install option so if you look for it, you'll need to get 2012 for your 32 bit system. You should be able to find it somewhere, if you decide to look for it, then just register a newer version and use that serial number to register. I posted the product keys in your other post for which one you'll need.

 

EDIT: Well, I'm sorry but it looks like I was wrong as I just searched Google for 2012 and all the sites saying they have it looks bogus. I'll try again and see what I can find for ya, if you still want it.

Thanks man, and I know they all look bogus. That's why I've decided that until I get a new PC I'm gonna use blender. Its got the same features just I think that exporting into .x format will be an issue I've managed to get the rims from the wheel and tires I've modeled ingame no tire tho?!? Just the rim. Currently I work in blender 2.74 and export with 2.42 I believe is the versions I'm using. I'm curious as to common steps to get a tire mesh ingame in 3ds because I believe I could directly apply to blender with 3ds theme enabled. Thanks guys!

Link to post
Share on other sites

If your going to use blender you need to disable the Root Frame generated by the default x exporter.

In the file ...\scripts\addons\io_scene_x\export_x.py:  (for blender 2.73, most recent versions use the same xporter)

Comment out the 2 lines "self.__OpenRootFrame()" and "self.__CloseRootFrame()". Use an ascii text editor. # is the comment char. IE:

 

# self.__OpenRootFrame()

# self.__CloseRootFrame()

 

Wheels need to be centered on the 0,0,0 coordinate. Shift-c will put the cursor at 0,0,0...from there all the views (1,3,7 ect) should show that cursor in the wheels center.

Once you have the mesh(es) properly centered do a Control-a three times, once each for Transform, Rotate and Scale.

Wheels should be exported RightHanded. Everything else (so far) is fine with LeftHanded.

 

BTW, if you don't know already, ST models with X as fwd, Y as up.

 

Blender top view:

post-115997-0-09891500-1433651215_thumb.jpg

  • Like 1
Link to post
Share on other sites

I have managed to export models with Blender v2.74 (steam version) but it took me some trial and error to figure this out.I don't claim this to be the only or the most efficient way but it works for me.

1.Select everything and rotate it  on X axis by -90 degrees
2.Select everything and mirror on Z axis
3.Select faces of each mesh and flip normals
4.Finally in the export parameters: Coordinates Right-Handed and with Z axis Up

 

If you can think of an better way please let me know

 

Link to post
Share on other sites

1. Blender is set up to model with X as fwd and Z as up. If you choose to model this way the X rotate -90 makes Y the up axis which is what ST uses.

 

2. The blender x exporter mirrors everything. IE, if your looking at a truck in blender and the steering wheel is on the left it will be on the right in the game.

No idea why it's written this way and if I knew more about python and blenders internal data storage I would attempt to correct the exporter but I do not.

So, yes, I mirror certain things like steering wheels and emblems then apply the modifier and delete the original.

Here is a jeep I have been playing around with lately. The two jeep emblems are mirrored in blender and will display correctly in game.

Steering wheel will be on the left in game.

Other things, like the mirrors, are a single mesh and symmetrical. They don't need to be mirrored although it certainly will not hurt.

post-115997-0-14298400-1433685450_thumb.png

Edited by GJU
Link to post
Share on other sites

3. Blender has a tool for viewing the direction of normals. In Edit mode tap the n key to bring up the right hand menu, scroll down to "Mesh Display", open it up if closed. You will see just below a section labeled Normals with three cube graphics. I use the face one on the right. Very useful.

There is also a key to get blender to recalculate the normals. Control-n, in edit mode, with all the faces selected in your mash. It's not perfect but usually gets them all correct if your mesh is well made. Sometimes it gets them all wrong. If that happens tap the w key and scroll down to "Flip Normals". If you get some right some wrong figure out which has the least errors (flip or not) and don't forget control-z if they were better to begin with :)

 

4. I choose to model with Y as up (so I don't need the X -90 rotate) and export everything except wheels LeftHanded with Y up. Truthfully, I'm not sure what the difference between Left/Right is but this works for me. Wheels, otoh, never seem to render correctly unless exported RightHanded.

post-115997-0-27877900-1433687254_thumb.png

Link to post
Share on other sites

If your going to use blender you need to disable the Root Frame generated by the default x exporter.

In the file ...\scripts\addons\io_scene_x\export_x.py: (for blender 2.73, most recent versions use the same xporter)

 

Comment out the 2 lines "self.__OpenRootFrame()" and "self.__CloseRootFrame()". Use an ascii text editor. # is the comment char. IE:

 

# self.__OpenRootFrame()

# self.__CloseRootFrame()

 

Wheels need to be centered on the 0,0,0 coordinate. Shift-c will put the cursor at 0,0,0...from there all the views (1,3,7 ect) should show that cursor in the wheels center.

Once you have the mesh(es) properly centered do a Control-a three times, once each for Transform, Rotate and Scale.

Wheels should be exported RightHanded. Everything else (so far) is fine with LeftHanded.

 

BTW, if you don't know already, ST models with X as fwd, Y as up.

 

Blender top view:

This it's really good stuff man thank you! So are you saying the plugin from 2 4 can be used in 2.74? Gonna have a go at it tonight.or tomorrow.

Link to post
Share on other sites

So are you saying the plugin from 2 4 can be used in 2.74?

 

I have no idea what 2.4 can or cannot do, never used it, but you can certainly try it.

 

I've been using blender for less than a year, started with 2.71. Upgraded to 2.73 and noticed that the x exporter that came with 2.73 was identical to what came with 2.71. I doubt 2.74 is any different

If that is the case I see no reason not to just use 2.74, after adding the two comments I mentioned.

Link to post
Share on other sites

You have to enable the x exporter in File/User Preferences/Add-Ons/Import-Export. Contrary to the name it only does exports, not imports.

 

I just downloaded the blender 2.74 zip version. The x exporter is identical to 2.73 which I still use.

 

Edit: On a side note I just found a sketchup .skp importer for blender. On first look it's not perfect but not bad at all.

 

https://github.com/martijnberger/pyslapi

Edited by GJU
  • Like 1
Link to post
Share on other sites

You have to enable the x exporter in File/User Preferences/Add-Ons/Import-Export. Contrary to the name it only does exports, not imports.

 

I just downloaded the blender 2.74 zip version. The x exporter is identical to 2.73 which I still use.

 

Edit: On a side note I just found a sketchup .skp importer for blender. On first look it's not perfect but not bad at all.

 

https://github.com/martijnberger/pyslapi

Freaking sweet! And yes I saw last night that I had to enable the addons thank you, I will post screens of the wheels when I get a min, I'm a new dad so time is short. Lol But I'm really glad I started this thread you are the man GJU! You have given me alot of info in a short period looking forward to getting custom wheels for my new mod!

Link to post
Share on other sites

hi don't know if this is the correct place to ask, but my question is related to blender usage, i m triing to add some addons to the game, using blender i created the models, on the first time the game didn't load my models after reding this page i changed the export_x.py, and the model started to apear in game but couldn't aply it to the truck, just the preview, using combine tools i notice that all the mods i download from the net have a low pol model named "cdt" so i created a "cdt" model for my addons, now the game allows me to place the addon's but when i tried to move the truck the game freaks just like appens in this video: https://www.youtube.com/watch?v=Af_LYRo9J1Y.

any one has any iddeia watt can be the problem?

 

second question work around to make the textures on the left side wheels not mirror?

 

sorry for the english errors, and thanks for the attention.

Link to post
Share on other sites

hi don't know if this is the correct place to ask, but my question is related to blender usage, i m triing to add some addons to the game, using blender i created the models, on the first time the game didn't load my models after reding this page i changed the export_x.py, and the model started to apear in game but couldn't aply it to the truck, just the preview, using combine tools i notice that all the mods i download from the net have a low pol model named "cdt" so i created a "cdt" model for my addons, now the game allows me to place the addon's but when i tried to move the truck the game freaks just like appens in this video: https://www.youtube.com/watch?v=Af_LYRo9J1Y.

any one has any iddeia watt can be the problem?

 

second question work around to make the textures on the left side wheels not mirror?

 

sorry for the english errors, and thanks for the attention.

Well I'm sorry I'm not gonna be a big help as I'm the thread starter and am also new, but it seems like a scripting issue don't quote me but how many addons do you have installed? What you may try is finding another bone to attach the addon to if there is one other wise I've heard 5 is max installed number of addons so if this is your problem, I've heard mass of the object could play a part in it. Again don't quote me please, lol sorry if this wasn't any help. But to answer your other question, this is the right spot for the question! I'm sure someone will be of more assistance....

 

Cheers

GoNzO

Edited by DrGoNzO1489
Link to post
Share on other sites

The low poly cdt mesh(es) are used for collision detection in the game. Truck has one (or more), the addon has one and it's important that they not overlap.

If they overlap you get, lol, a collision.

You might also want to put a collision section in your Body line:

<?xml version="1.0"?>
<_templates Include="trucks" />
<TruckAddon>
    <GameData RepairsCapacity="200" FuelCapacity="100">
        <InstallSocket Type="F150Tool" />
    </GameData>
    <PhysicsModel Mesh="F150_Toolbox.xml">
        <Body Mass="100" Collisions="None">
            <Constraint Type="Fixed" />
        </Body>
    </PhysicsModel>
    <FuelMass>
        <Body Mass="300" />
    </FuelMass>
</TruckAddon>

Notice the Collisions="None" line.

 

As mentioned above wheels in blender should be exported RightHanded. It's important that you also Apply any transforms before export...IE:

Select all the meshes in the wheel in Object mode then do a Control-a once each for Transform, Rotate and Scale to update the V's coords.

Link to post
Share on other sites

You may well be right seeing as there is no official documentation yet.

I was, however, referring to the cdt in the truck and the cdt in the addon. In my experiance, if they overlap, bad things happen.

Link to post
Share on other sites

thanks for the replies.

i'm using this truck "http://spintires.nl/gaz-66-final-version/#comment-16415" has base for my mods, changed some names of the parts and some of the addon sockets, in order to load the correct parts on every map, just like the zil i replaced with

<AddonSockets>
    <ZilCarriage />
    <ZilTractor Offset="(-0.60; -0.15; 0)" />
</AddonSockets>
<AddonSockets>
    <KamazTrailer Offset="(-1.751; 1.2; 0.0)" />
    <KamazTrailerCart Offset="(-2.80; 0.825; 0)" />
    <UralCartTrailer Offset="(-2.80; 0.825; 0)" />
</AddonSockets>
<AddonSockets>
    <LoadLogsShort />
    <LoadLogsMedium Offset="(-1; 1.7; 0.0)" />
    <LoadGazutil />
</AddonSockets> 

i just put the carriage on the truck and my addon. my addon code is like this (after added the collision line)

<?xml version="1.0"?>
<TruckAddon>
    <GameData FuelCapacity="1200">
        <RequiredAddon Type="zil_carriage, zil_utility" />
        <InstallSocket Type="LoadGazutil"/>
    </GameData>
    <PhysicsModel Mesh="Gaz-66_Cargo/Fuel1.xml">
        <Body
            ModelFrame="FuelBarrel"
            Mass="400"
            CenterOfMassOffset="(-0.14; 0; 0)"    
            Collisions="None"
        >
            <Constraint Type="Fixed" />
        </Body>
    </PhysicsModel>
    <FuelMass>
        <Body Mass="1200" />
    </FuelMass>
</TruckAddon>

tested reducing the mass but nothing changed, going to mess with the cdt model to check if is overlapping and that is the problem

tried to reduce the cdt mesh to make sure wasn't overlapping but also didn't make a difference.

 

do i have to have bones in all the models, and associate the vertices of the mesh to that bones.

 

link for the .x file if some one wants to take a look: https://drive.google.com/file/d/0Bwedj2FpOUEyT256UGhROWtmU1U/view?usp=sharing

link for the blender file: https://drive.google.com/file/d/0Bwedj2FpOUEyYngtckRmQ3BPaGc/view?usp=sharing

Edited by Holy Pestilence
Link to post
Share on other sites

Nice model, well made, well mapped. You do good work.

 

You mentioned bones (before you edited your post). As you have discovered you do not need a bone at least for singleplayer (SP). Custom addons usually do not work in multiplayer (MP). It appears to be a matter of how the pieces are linked but I do not know that for a fact. I gave up on MP months ago due to all the steam disconnects, rage quits, etc so I do not worry about that.

 

That being said I usually structure an addon like this:

 

Add an Empty at 0,0,0. Parent everything that is not already parented to something else to the Empty. IE the Empty is the top frame in your scene.

Note that you need a cdt parented directly to the Empty.

You model looks like this:

World
FuelBarrel
        cdt

cdt is parented to FuelBarrel. FuelBarrel is your top frame.

This will not work (at least in my experiance):

World
Empty
        FuelBarrel
                cdt

This will work:

World
Empty
        FuelBarrel
        cdt

cdt is parented directly to Empty.

 

This structure might work in MP. I don't play MP so I have not tested it.

 

If/when you get to bones it has been my experience that it's best to use a single Armature. Add as many bones to the Arm as you need but just use one Arm.

Reference the bone in the xml with its full name. IE given an Armature with 3 bones:

Armature
        BoneChassis
        BoneAxleFront
        BoneAxleRear

Here is you truck xml

            <Axle
                Frame="Armature_BoneAxleFront"
                LeftWheel="0"
                RightWheel="1"
            />
            <Axle
                Frame="Armature_BoneAxleRear"
                LeftWheel="2"
                RightWheel="3"
            />

The bone BoneChassis is used as a, call it offset I guess, to the 2 BoneAxles.

It is the renamed default bone you get when you add an Armature.

For example here is a screenshot of a simple front leafspring.

The top shows the vertex grouping/weight for the BoneAxleFront bone. The bottom shows the grouping for the BoneChassis bone.

BoneAxleFront gets moved by your xml Axle statement. BoneChassis does not get moved and dampens movement of the leafspring.

 

In order for this to work properly both BoneChassis and BoneAxleFront need to belong to the same Armature.

If you use 2 Armatures on the same mesh the x exporter will not export it properly and it will crash the game.

 

I usually place the Armature at 0,0,0 although I have also placed it at the midpoint of the truck model.

As long as you do not name it Armature_cdt it should not be solid.

 

BoneAxleFront/Rear get placed at the midpoint of your front/rear axle respectively.

When you parent, in this case, the leafspring mesh to the Armature (which creates your vertex groups and Armature modifier) I usually select empty groups and do the vertex mapping/weight manually.

Each vertex you map should have a total weight of 1.0. If it does not the exporter will normalize it, IE do it for you, which may produce unwanted results.

Add all the bones before you do any parenting and just delete vertex groups you do not need. IE the front leafspring does not need a vertex group for BoneAxleRear.

 

I have also noticed that the game does not seem to like bones that are not doing anything. I have gotten weird effects like pieces stretching off to infinity, so, if a bone is not doing anything I would delete it.

post-115997-0-62798400-1433952359_thumb.png

  • Like 1
Link to post
Share on other sites

GJU Thank you for your help and explanation.

i made a mistake and put 2 entries on the forum one with all the info (the second one) and one with just the beginning of the text, after i notice this and solving the problem i decided to pass all the info of the problem to my first post and the second one just the solution and my plans for the future, some of the mods i have don't work in MP, but i have more fun doing and changing the game with mods than playing the game :) so i don't care about MP.

 

tomorrow or so starting to model the UMM and will take me some time before the problems to put it on the game start, but your info about the bones is very good, thank you.

 

final version of the addon working on the game:

.x file -- https://drive.google.com/file/d/0Bwedj2FpOUEyV2d3bDNjYmFpZ0E/view?usp=sharing

blender file -- https://drive.google.com/file/d/0Bwedj2FpOUEyMGhyZE0xS2F1OVU/view?usp=sharing

 

going to ask the original author of the truck if i can upload it with my overpowered wheels and addons

Edited by Holy Pestilence
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...