Need help with FCE Custom Settings

Hi,

I'm currently working on my first project for Racer and I've been getting a lot of great help from this forum, mostly about technical stuff yet though.

I'm trying to get the body and windows to get the right material and I've been following this guide for Zmodeler 1.07b: http://www.racer.nl/tutorial/zm2dof.htm
However when I try the following, all checkboxes are greyed out and I'm now stuck.
the first thing you need to do, is to show all your parts, select them all, go into SEL and MUL modes, choose faces mode, and click to select faces on all parts.
Select all the faces of your model, and in the FCE Faces dialog, make sure no flags are checked. If they are, clear them and hit apply.
What do you think I'm doing wrong?

The car I'm trying to make is the one below:
(High resolution: http://farm8.staticflickr.com/7288/8740848727_8cd5475b54_o.jpg)
8740848727_8b3695798d_c.jpg

The shell is carbon fiber, but I would be satisfied with black as well. Plz ignore stickers and the tape around the windows ;)
If anyone hade the time to take a look at what I may be doing wrong, I would be very happy :)
z3d-files can be found here:
body: https://dl.dropboxusercontent.com/u/24580186/Vera.z3d
wheel: https://dl.dropboxusercontent.com/u/24580186/wheel.z3d

Thanks in advance!
 
If nothing's checked, I think that means you can skip that step. FCE is the Need for Speed 4 file format, so cars imported from that game might have flags from it.

I've used ZModeler 1.07 fairly recently to export some files, and I didn't have to do anything with the FCE Faces window. Just set the material names I wanted ('e', I think, brings up the materials dialogue - has an 'assign to selected faces' button that I use for textures) and then use those for the car.shd.

That tutorial is fairly out of date, there are only a few things I'd recommend keeping in mind when exporting to .dof:
- material names should be letters and underscores. The exporter will change them otherwise, this way you know what the exact names are.
- wheels should have their pivot point at (0,0,0), body should have its centre of gravity at (0,0,0). This just reduces the number of offset factors you have to tweak.
- the root folder of Racer has a dof_fix.exe - run this on your files (it's a command line program, just "dof_fix file.dof") to account for changes in the dof format since ZModeler stopped updating.
- If you want optional parts or simple moving parts, export them in-position relative to the body as a separate .dof for static ones, or with their axis of rotation through (0,0,0)* for moving ones. The generic model system lets you position these extra items separately.

* the generic objects actually rotate around the car's center of gravity offset too, so if that's somewhere other than 0,0,0, you need to center them around that instead, and add the offset in a bunch of places. Thus the other point.


In particular, if you just have the carbon fibre and the glass on the model, you only need those two materials. If you want the pattern of the carbon fibre to look right I suppose you could generate a normal map for it and use a custom shader - if you settle for a shiny black paint that's pretty easy to do, copy the lamborghini's "shader_murcielago_paintwork~vf_reflect" section from { to }, as well as the "vf_reflect" section, and swap 'murcielago_paintwork' for the name of your material. If you've got a dark coloured texture, just set 'diffuse=1 1 1 1', 'ambient=1 1 1 1', and play with the specular= value until you get a brightness that seems appropriate. Likewise for the glass, "shader_murcielago_glass~vf_glass" and "vf_glass" are a good starting point.
 
This was really helpful! I'm starting to get the hang of it, but there is a lot left to understand ;)
When it comes to the windows; which options am I suppose to set in the Materials editor?
I have used the guide from the documentation:

Setting Transparency


Well if you thought that the Semi-Transparent flag would be used in this case to do Transparent materials, you're wrong. There's no splitting of materials here, you have to have a transparent material. This is easily set in the Material editor. For materials without transparency, set the alpha Parameters to Type: Unused. For materials with transparency, set Alpha Parameters to Type: Glowing, and Use Alpha: Standard Alpha Glow with Transparencity


The shell is now black as I wanted, but the windows are still pink..
What I have so far is:
Code:
;
; SHADER TEMPLATES
;
vf_reflect
{
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_glass
{
  vertex_shader
  {
    file=dyn_standard_reflect_window_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_window_f.cg
  }
}
 
;
; SHADERS
;
shader_shellmaterial~vf_reflect
{
  cast_shadow=1
  reflect=1
  diffuse=0 0 0 0
  ambient=0 0 0 0
  specular=0.1 0.1 0.1 0
  shininess=3
 
  fresnel
  {
    bias=0.06
    scale=0.98
    power=2
  }
  layer0
  {
    map=q_generated
  }
  ;layer1
  ;{
  ;  map=$trackenvmap
  ;}
}
shader_windowmaterial~vf_glass
{
  cast_shadow=1
  ;sort_offset=5
  reflect=1
  shininess=16
  specular=0 0 0 0
  mipmap_bias=5
  layer0
  {
    ;map=glass.tga
    map=q_generated
    blendfunc=blend
  }
  ;layer1
  ;{
  ;  map=$trackenvmap
  ;}
}
 
I believe that shader uses alpha transparency of the texture, so you'd need to replace map=glass.tga with a transparent texture name in the car folder. In that regard recent versions of Racer are a lot easier to use - you just include "blendfunc=blend" in the shader file and a transparent texture will work fine, no need to adjust any settings in ZModeler.
 
After a couple of hours I managed to sort it out, so thanks again for the help! I don't know if this is a bug or not, but sometimes when i drive any of the wheel suddenly falls through the ground, causing the body to touch the ground and therefore making it impossible to move the car..
Anyone with ideas on why this happens?
It looks like this when it happens to the rear wheel:
Stuck.jpg
 
Probably car.ini related somehow. Are your tyre rates sensible values? Pacejka sensible values? Rolling radius reasonable values?

Also what version of Racer are you running? It seems the very latest version may be a bit unreliable in the realm of wheels falling through the floor...

Probably best to stick to RC5c or so and use the Gallardo I updated as ini file reference as I believe it has everything you need in it for a full car.ini file to work reliably!

Dave
 
  • This car has no suspension, but I gave it 1 cm of travel just to have something.
  • Regarding the Pacejka-values I have been told that they are from Michelin themselves, so I hope they are right.
  • I'm not sure what a "reasonable rolling radius" could be.
  • The game crashes if I set the mass of a wheel lower than 1.8..
This is the car.ini and I'd be happy to try any changes you may find necessary! (wheels = 3)
Code:
body
{
  mass=83.5
  inertia
  {
    x=47
    y=56
    z=28
  }
  ; Collision box
  width=0.8
  height=0.62
  length=2.4
  manual_box=1
  box_offset=0 0 0
  model
  {
    file=body.dof
    offset
    {
      x=0
      y=0.06
      z=0.01
    }
  }
}
steer
{
  x=0
  y=0.7
  z=0.2
  xa=0
  lock=40
  linearity=1.0
}
engine
{
  x=0
  y=0
  z=-0.14
  size=0.1
  mass=6.5
  max_rpm=10000
  idle_rpm=1500
  idle_method=0
  autoclutch=1
  autoclutch_rpm=2000
  curve_torque=torque.crv
  max_torque=1
  rumble_maxrpm=4000
  cylinders=1
  starter=1
  starter_torque=20
  start_stalled=1
  stall_rpm=500
  enable_stall=1
  start_rpm=1000
  inertia
  {
    engine=0.01
  }
  braking_coeff=0.1
  friction=0
  speedlimiter
  {
    velocity=15
  }
}
fuel
{
  type=0
  max=2
  bsfc=7e-5
}
gearbox
{
  gears=2
  init_gear=1
  gear0
  {
    ratio=-10
    inertia=0.004
  }
  gear1
  {
    ratio=7.142857
    inertia=0.004
  }
  end_ratio=1
}
clutch
{
  max_torque=100
}
handbrakes
{
  wheels=2
}
differential
{
  type=4
  inertia=0.001
  output0=2
  output1=2
}
differentials
{
  count=0
  diff0
  {
    type=4
    inertia=0.001
    output0=2
    output1=2
    friction=0
  }
}
aero
{
  body
  {
    center=0.000 0.000 0.000
    cx=0.1
    area=0.15
  }
  wings=0
}
susp_default
{
  y=0.0287
  restlen=0.01
  minlen=0
  maxlen=0.01
  warplen=0.01
  bumpstop_len=0
  bumpstop_k=100000
  bumpstop_damping=0
  reboundstop_len=0
  reboundstop_k=100000
  reboundstop_damping=0
  k=50
}
susp_front~susp_default
{
  z=0.92
  ;z=0.9254
}
susp_rear~susp_default
{
  z=-0.4755
}
susp0~susp_front
{
  x=0.2695
}
susp1~susp_front
{
  x=-0.2695
}
susp2~susp_rear
{
  x=0
}
pacejka_default
{
  ; Pacejka constants (Pacejka96 model)
  model=0
  ; Lateral coefficients
  a0=1.54600
  a1=0.00000
  a2=720.00000
  a3=125.00000
  a4=0.60000
  a5=0.00000
  a6=0.00000
  a7=0.00000
  a8=0.00000
  a9=0.00000
  a10=0.00000
  a111=0.00000
  a112=0.00000
  a12=0.00000
  a13=0.00000
  ; Longitudinal coefficients
  b0=1.38600
  b1=0.00000
  b2=700.00000
  b3=0.00000
  b4=126.50000
  b5=0.00000
  b6=0.00000
  b7=0.00000
  b8=0.00000
  b9=0.00000
  b10=0.00000
  ; Aligning moment coefficients
  c0=1.63000
  c1=3.00000
  c2=15.00000
  c3=1.80200
  c4=-1.80400
  c5=-2.92700
  c6=0.00000
  c7=0.00000
  c8=0.00000
  c9=0.00000
  c10=0.00000
  c11=0.00000
  c12=0.00000
  c13=0.00000
  c14=0.00000
  c15=0.00000
  c16=0.00000
  c17=0.00000
  ; Statistical data (SR, SA in radians)
  optimal_slipratio=0.16552
  optimal_slipangle=0.15166
}
wheel_common
{
  x=0
  y=0
  z=0
  ;mass=1.3
  mass=1.8
  tire_rate=50000
  ; Rotational inertia
  inertia=0.035
  radius=0.235
  width=0.045
  contact_patch_width=0.03
  contact_patch_length=0.03
}
wheel0~wheel_common
{
  steering=1
  lock=18
  ; Rullmotstånd enligt PacCarII
  rolling_coeff=0.001
  max_braking=110
  braking_factor=0.5
  max_handbrake_torque=0
  model
  {
    file=wheel.dof
  }
  pacejka~pacejka_default
  {
  }
}
wheel1~wheel_common
{
  steering=1
  lock=18
  ; Rullmotstånd enligt PacCarII
  rolling_coeff=0.001
  max_braking=110
  braking_factor=0.5
  max_handbrake_torque=0
  model
  {
    file=wheel.dof
  }
  pacejka~pacejka_default
  {
  }
}
wheel2~wheel_common
{
  steering=0
  ; Rullmotstånd enligt PacCarII
  rolling_coeff=0.001
  max_braking=0
  braking_factor=1
  max_handbrake_torque=110
  model
  {
    file=wheel.dof
  }
  pacejka~pacejka_default
}
 
The problem turned out to be that the bounding box sometimes would hit the ground in sharp turns.. so I gave it 10 cm offset in the y-direction and now it works just fine!
 
Glad you found the problem :D

Car.ini looks generally good, lots of sensible values for the type of car you are making and a good sign that Racer is robust to simulate these very lightweight type vehicles too!

Can't wait to see some videos of it in action :D

Dave
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 300 15.3%
  • < 2 years

    Votes: 210 10.7%
  • < 3 years

    Votes: 201 10.2%
  • < 4 years

    Votes: 151 7.7%
  • < 5 years

    Votes: 269 13.7%
  • < 10 years

    Votes: 230 11.7%
  • < 15 years

    Votes: 146 7.4%
  • < 20 years

    Votes: 117 6.0%
  • < 25 years

    Votes: 88 4.5%
  • Ok, I am a dinosaur

    Votes: 250 12.7%
Back
Top