3D Modelling, Post your 3D models! (Cars, Planes, People, Landscapes etc!)

Morning all
Made a little more progress with the truck, moved the rear bars down a little and added an aero cover. I also removed the roof.
End1912015.jpg EndRear1912015.jpg

Comparison with roof and without:
Open-Top-Closed1.jpg Open-Top-Closed2.jpg
(Little brother picked the colours, sorry :lol:)
 
Mocking up a apocalyptic level for a game i am creating .. sort of a dayz game atm. first screenieView attachment 294602

I like the Porsche Center :)

Here's a sound check for my turn indicators.



Sound check 2:



Update: New physics model! With the old model, steering was the same no matter the speed of the car. With this new code, steering is relative to the speed:

Code:
    if math.fabs(logic.car["speed"])<2.0: s = 1.5
    else: s = 3.0 / logic.car["speed"]

If speed is less than 2.0, steering will be 1.5. Else steering will be 3.0 / speed.

The formula may need to be tweaked to give a somewhat realistic feel, but it's a good start.

Another update: I think I may have a solution for making an engine and a gearbox. I've got it figured out on paper (the coding is still work in progress):

Code:
##Gearbox##
gearList = [-3.417, 3.417, 1.950, 1.357, 1.054, 0.854]

final_gear = 3.939

gear_select = gearList [ logic.car["gear"] ]

##RPM calculation##
rpm = logic.car["speed"] / (0.1037 / (gear_select * final_gear))

##Torque calculation##
pt_rev = 5000

if gas == 1:
    if rpm < pt_rev : torque = 10 + (rpm * 0.001)
    else : torque = 15 - (rpm - pt_rev) * 0.002
else:
    torque = rpm * -0.0005

##Power calculation##
if rpm > 7500 : 
    power = 0
elif speed < 10 : 
    power = 21.7
else: 
    power = rpm * torque * 0.001485

And I think I know how to implement engine braking: negative torque :)

Update: Engine braking is now added in the formula above. I couldn't find any good reference data on engine braking so I just set the torque to be -0.0005 * rpm.
 
Last edited:
I like the Porsche Center :)

Here's a sound check for my turn indicators.



Sound check 2:



Update: New physics model! With the old model, steering was the same no matter the speed of the car. With this new code, steering is relative to the speed:

Code:
    if math.fabs(logic.car["speed"])<2.0: s = 1.5
    else: s = 3.0 / logic.car["speed"]

If speed is less than 2.0, steering will be 1.5. Else steering will be 3.0 / speed.

The formula may need to be tweaked to give a somewhat realistic feel, but it's a good start.

Another update: I think I may have a solution for making an engine and a gearbox. I've got it figured out on paper (the coding is still work in progress):

Code:
##Gearbox##
gearList = [-3.417, 3.417, 1.950, 1.357, 1.054, 0.854]

final_gear = 3.939

gear_select = logic.car["gear"]

##RPM calculation##
rpm = logic.car["speed"] / (0.1037 / (gearList[gear_select] * final_gear))

##Torque calculation##
pt_rev = 5000

if rpm < pt_rev : torque = 10 + (rpm * 0.001)
else : torque = 15 - (rpm - pt_rev) * 0.002

##Power calculation##
if rpm > 7500 : power = 0
elseif speed < 10 : power = 21.7
else: power = rpm * torque * 0.001485

And I think I know how to implement engine braking: negative torque :)


Awesome work sir.


Careful though... this is GTP you physics will be wrong, and hundreds of threads will spawn to kill your creative mojo.
 
Awesome work sir.


Careful though... this is GTP you physics will be wrong, and hundreds of threads will spawn to kill your creative mojo.

Well, as long as they haven't payed for anything I think the amount of rage will be tolerable :)

Just tested my powertrain code in a code simulator, and it works!

itsalive.jpg


Update: This is getting less and less 3D and more and more programming, but I've just figured out how to make analogue accelerator and brake pedals :D

I wonder if my DFGT is compatible with Blender... probably not.
 
Last edited:
Well, as long as they haven't payed for anything I think the amount of rage will be tolerable :)

Just tested my powertrain code in a code simulator, and it works!

View attachment 295093

Update: This is getting less and less 3D and more and more programming, but I've just figured out how to make analogue accelerator and brake pedals :D

I wonder if my DFGT is compatible with Blender... probably not.

iam not sure but i have a full ffb toolset for unity3d and full sim physics its really insane basically like rfactor but obviously you have to build and edit around it from the ground up
 
Hey all.
Have any of you guys built the suspension for your models? I was planning on adding a push-rod style suspension to my truck, although I'm struggling on how to build it. I have made a dual wishbone style before, so I know how to get the wishbones animated properly, its just the building.
Suspension-Rig.jpg
The dummy/spline setup I used on another car.
Any help would be greatly appreciated :)
 
Well, as long as they haven't payed for anything I think the amount of rage will be tolerable :)

Just tested my powertrain code in a code simulator, and it works!

View attachment 295093

Update: This is getting less and less 3D and more and more programming, but I've just figured out how to make analogue accelerator and brake pedals :D

I wonder if my DFGT is compatible with Blender... probably not.
This needs it's own thread, it's definitely interesting enough!
 
This needs it's own thread, it's definitely interesting enough!

Tell me about it :P I couldn't sleep last night because I kept thinking of how to code different functions! I'm working on a clutch script right now.

Update: The gearbox is working now. Got the car up to 230 km/h by accelerating through 1st, 2nd, 3rd, 4th and finally 5th.

Update 2: Worked on the engine throttle. Added an idle engine throttle control and fixed a related problem that caused the engine braking to fail. Now I'm working on a "smart clutch", to provide slip at low revs but be quick for gear changes.

Update 3: The clutch is working, but just barely so. The car is sitting at 700 - 800 revs when taking off so it's a really slow starter. It takes forever to get up above 1000 revs, but once it's there the power kicks in. I'm assuming that it's my clutch script that needs to be improved.

Update 4: Alright, clutch is good enough for now. It's a pretty hard game to play at the moment, just to control the clutch and the gears is rather complicated. In a normal car you use your feet for a lot of the operations, but with just two hands and a keyboard it's hard!

Below is the physics in action. It's basically just text that I've put there so that I can see how the variables change as the simulation is progressing. The car is already off the screen at this point.

RPM: Engine speed. Currently 5338.8
Throttle. 1 means it's 100% open, 0 means it's 0% open. Anything in between is anything in between.
KPH: Speed of the car.
Clutch: 1 means it's 100% disengaged, 0 means it's 0% disengaged (i.e. fully engaged).
BHP: The current power output of the engine.
Gear: Gear indicator.

physicstest.jpg


Update 5: I made an engine sound! I just rubbed my hands in front of the microphone and then edited the sound in Audacity to make it sound more like an engine. Or perhaps it's more accurate to say "make it sound a little less like not an engine". In the video you can also see the physics in action, especially how slow the car is from start.



Update 6: I fixed the clutch!

Here's an acceleration test, it's much faster from a standing start now. 0 - 100 in about 10 seconds.



Update 7: Rewrote the clutch script again. Now it's more realistic. At speeds below 15 km/h and when the accelerator is used, it will engage slowly. In any other case it engages quickly.

Update 8: Next step is to add a script that makes the engine stall if the rpm drops below a certain rpm. I'm thinking in the neighbourhood of 400 rpm.

Update 9: Engine stall script added and functional! Now you need to press the clutch when you start the engine, else it will stall.
 
Last edited:
If you need sounds buddy i have a few here, from supra's to fiesta xr2's pick your poison :lol:

Do you have anything similar to a Peugeot 106? 4 cylinders, NA.

I've added drag from airspeed now. Now, all I need to do is to tweak the physics so they're accurate to the real world. There's quite a bit of tweaking to be done if I'm honest. Current top speed of my car is about 50 km/h and then wind resistance becomes too great to overcome :P
 
I have a Peugeot 205gti :D if you want that

On another not you have inspired to start my own racer,only for giggles.
but your scripts look really alien to what i been trying to learn C# i struggling to see how your going to use this outside blender.
but kudos just on that i installed blender then uninstalled its a very unforgiving application you need the force to use it
 
Last edited:
A Peugeot 205 would be awesome :) Much better than the sound of me rubbing my hands :lol:

Here's a new video. I tweaked the variables to try and make the physics more realistic. Top speed is now just above 200 km/h.



And here it is with the Peugeot body.



Update: Ha! I just got oversteer :D I came off the accelerator and turned at high speed and got into a little slide. When I got back on the accelerator it got out of the slide.

Update 2: Everything is working as intended. Except for when the speed is negative, i.e. the car goes reverse. For some reason it make the rpm number a complex number, which can't be compared to floating numbers. So it looks like I'll have to come up with some exception scripts for when the speed is negative.

Update 3: Instead of making exceptions scripts for every single calculation I just told the computer that if it thinks that the speed is less than 0 then it's actually wrong and the "true" speed is in fact 0. It solved the issue, but I imagine that it's going to be an obstacle when I want to add a reverse gear.

Update 4: Added a condition that makes gear changes undoable unless the clutch is at least 50% disengaged.
 
Last edited:
A Peugeot 205 would be awesome :) Much better than the sound of me rubbing my hands :lol:

Here's a new video. I tweaked the variables to try and make the physics more realistic. Top speed is now just above 200 km/h.



And here it is with the Peugeot body.



Update: Ha! I just got oversteer :D I came off the accelerator and turned at high speed and got into a little slide. When I got back on the accelerator it got out of the slide.

Update 2: Everything is working as intended. Except for when the speed is negative, i.e. the car goes reverse. For some reason it make the rpm number a complex number, which can't be compared to floating numbers. So it looks like I'll have to come up with some exception scripts for when the speed is negative.

Update 3: Instead of making exceptions scripts for every single calculation I just told the computer that if it thinks that the speed is less than 0 then it's actually wrong and the "true" speed is in fact 0. It solved the issue, but I imagine that it's going to be an obstacle when I want to add a reverse gear.

Update 4: Added a condition that makes gear changes undoable unless the clutch is at least 50% disengaged.


Good work bro, your updating so much i think its time for your own thread..

if you pm me your email i'll post them now for you , i also have a vw lupo sound thats more 106 sized
 
As promised i made a start the car appears in the game engine not bad for 2 hours work, had to mess around and make some normal maps and secular maps and fiddle with the shader's but she looks good. start rigging tomorrows

View attachment 296179 View attachment 296180

That looks awesome! A bit higher quality than my model ;)

I think I've fixed most bugs in my physics model. I still don't have a reverse gear, I have to go through the code first and see what happens when values goes negative. In theory there should be no difference other than the gear rotating the other way.

There's also a problem with the tyre model, or rather the lack of tyre model. There's no wheelspin, it seems like the only direction where the tyres can lose traction is sideways.

Handbrake turns can be made, but the rear wheels aren't locked, they just lose traction sideways.

 
With the wheel code have you tried lowering the grip on the center so it's equal to the side walls. Should have 3 zones in your code at least for n's center o's zones per tyre . Or could be simply wheels are not making contact the road fully
 
With the wheel code have you tried lowering the grip on the center so it's equal to the side walls. Should have 3 zones in your code at least for n's center o's zones per tyre . Or could be simply wheels are not making contact the road fully

The issue is that I don't see the tyre code, because it's part of the vehicle simulation which is built into the bullet physics engine and not part of the python code than I'm writing. I guess I could code my own vehicle simulation script, but that's going to take a while.

Speaking of tyre model, I made a new mesh for the tyres and wheels, 106 Rallye style :)

rallye2.jpg


Yes, they are ten times more detailed than the rest of the car.
 
The issue is that I don't see the tyre code, because it's part of the vehicle simulation which is built into the bullet physics engine and not part of the python code than I'm writing. I guess I could code my own vehicle simulation script, but that's going to take a while.

Speaking of tyre model, I made a new mesh for the tyres and wheels, 106 Rallye style :)

View attachment 296308

Yes, they are ten times more detailed than the rest of the car.

Yeah that could be a issue if you haven't got access to the tyre code. had to tweek the cat i didnt apply any shaders to body or engine. so now its ready to rig. what do you use to capture mate video mate?

finished.png


edit: help if i added the picture :)
 
Yeah that could be a issue if you haven't got access to the tyre code. had to tweek the cat i didnt apply any shaders to body or engine. so now its ready to rig. what do you use to capture mate video mate?

edit: help if i added the picture :)

I'm using FRAPS to capture the videos. It's causing huge frame drops on my computer (it's a laptop...) though so I have to run the game in a small window while I use it. I'm using the free version and I guess that's why it can't record more than 30 seconds.

Here's my first track, featuring a corner and a jump. It's a point - to - point, and really short :P



Update: Since I didn't really know how correct power and speed was being represented in my simulation, I made a test track. A really long straight mith markers for every 10 meters. Since 1 m/s = 3.6 km/h I figured that if my car did 36 km/h it should pass 1 marker per second. It's really hard to stick to a certain speed when your accelerator is a key on a keyboard so I went to my throttle script and told it to open if the car was travelling slower than 36 km/h and close if it was travelling faster. It worked pretty good, it did about 35.8 km/h (I guess it's because it takes a fraction of a second for the revs to climb) which was good enough for comparison.

When I had made the speed accurate I went on to calibrate the power. To do that I measured the top speed of the car together with the power output and compared it to an excel file where I had the calculation for power needed to overcome drag (and since I used the exact same calculation to calculate drag in the simulation I knew that results should match). If the top speed was faster than the excel file said I had to scale the power down and if the top speed was slower I had to scale the power up. I started with a power factor of 20 and ended up finding the balance at 12.66, so before the test the engine produced about 50% more power than it should have.

Here's a screenshot from the top speed run. 211.64 km/h and 105.76 BHP. (I'm not actually in 81st gear, I changed that to a timer but I didn't bother changing the text.)

testtrack.jpg


I've experimented with some tracks, but I find it really hard to drive this car. Not that steering or accelerating or shifting is hard, but since all I've got is a keyboard there's a lot of multitasking and it's hard to remember which key is which in the heat of the moment. There's a lot of times when I engage the clutch instead of releasing the brakes, for instance, and then my engine stalls :P
 
Last edited:
@Peasantslayer thanks mate, only taken few hours to get to this point project only started yesterday, so quite good progress only been using unity3d a month. just looked at your work it's amazing how long you been modeling
I think this was the project I used to get my TR4 in Unity, the car will turn quite sharply but that can be toned down easily enough, it's a modified version of a project that can be found in the asset store. Good job on the car it looks higher poly than the wireframe suggests.

(DL in the description)

 
Last edited:
Here's the car with the Lupo sound. Sounds a bit like a cat, but it's better than the old sound :)



video is private lol were not worthy :P

@Peasantslayer i did try that the first day i had unity, didn't rate it much seemed like it was driving around a pivot on the rear bumper. but it was the 1st day so can always try it again since i know unity a little better not much better mind.

Edit: actually i think it may be a modified version of the demostration bundle but using the same track. i'll check it out
 
video is private lol were not worthy :P

@Peasantslayer i did try that the first day i had unity, didn't rate it much seemed like it was driving around a pivot on the rear bumper. but it was the 1st day so can always try it again since i know unity a little better not much better mind.

Edit: actually i think it may be a modified version of the demostration bundle but using the same track. i'll check it out

Oops. Well, here's a new and better video. I fixed some sound issues at the high and low revs. There's still an issue with too high sound level when the engine works at high rpm, I should turn down the volume multiplier.



By the way, what's your method of implementing sounds? Do you use different samples at different rpms?
 
Oops. Well, here's a new and better video. I fixed some sound issues at the high and low revs. There's still an issue with too high sound level when the engine works at high rpm, I should turn down the volume multiplier.



By the way, what's your method of implementing sounds? Do you use different samples at different rpms?


@eran0004 Sounds good mate what sample did you use out of that pack? id use lupo_4_on seems as if you only have one sound for the engine and it's revving into the 9,000 - 10,000 range this might help with a deeper note, i have just 2 atm just engine start and basic mid pull.. i can have multiples but haven't found the correct mix yet volume wise it's really loud and quite distorted so have so mess around with that. seen as your in blender i couldn't say i only installed it then 10 mins later uninstalled it. looked a mess and made my screen flash.

On a positive note i present dynamic time

Amazing what you can do with unity
 
@eran0004 Sounds good mate what sample did you use out of that pack? id use lupo_4_on seems as if you only have one sound for the engine and it's revving into the 9,000 - 10,000 range this might help with a deeper note, i have just 2 atm just engine start and basic mid pull.. i can have multiples but haven't found the correct mix yet volume wise it's really loud and quite distorted so have so mess around with that. seen as your in blender i couldn't say i only installed it then 10 mins later uninstalled it. looked a mess and made my screen flash.

On a positive note i present dynamic time

Amazing what you can do with unity


I'm using the Lupo On Low, with a small equalization modification to remove the sinus effect in the background. Then I run a script that tells the sound so scale in pitch (and speed) with the rpm and in volume with torque.

I adjusted the rpm scale, perhaps this sounds a bit more reasonable:



Of course, it would be better to have two sounds playing, one for the low revs and one for the high revs, and then have a section in the middle where the low revs fade out and the high revs fade in.

Edit: I think I got the scaling wrong in the previous video, instead of 7500 revs the sound played as if it was 15000 revs.
 
Last edited:
Back