08-16-2006, 09:30 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:Don't set any friction values larger than 1.0. It's possible to do, but don't -- if you're doing this, then you don't understand how it works because it's not really what you want to do.
i guess i was looking for the drag coefficient (in vamos-speak).
--alex--
|
|
08-16-2006, 10:40 PM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
I've added these parameters to the format, which is now:
Code: #0. model filename (no spaces allowed)
#1. texture filename (no spaces allowed)
#2. mipmap texture (1 for true, 0 for false)
#3. disable lighting (1 for true, 0 for false)
#4. is this a skybox? (1 for true, 0 for false)
#5. is this object a transparent blended texture? (1 for true, 0 for false)
#6. bump wavelength
#7. bump amplitude
#8. driveable (1 for true, 0 for false) -> deprecated, use collide-able flag
#9. collide-able (1 for true, 0 for false)
#10. friction coefficient for non-treaded tires
#11. friction coefficient for treaded tires
#12. rolling resistance coefficient (http://en.wikipedia.org/wiki/Rolling_fricti
on)
#13. rolling drag
I added the parameters to Road Atlanta's list.txt by doing the following after loading the file in listedit:
Code: > $ addparam 5.0
> $ addparam 20.0
> $ set 1 road* 12 1.0
Set 146 entries.
> $ set 1 road* 13 0.0
Set 146 entries.
The first two lines add the new parameters and specify defaults that are the same as vamos' values for grass. The second two lines set the road to have a 1.0 coefficient on rolling resistance and a 0.0 on drag.
While I'm at it, here are some of vamos' default material values, for reference:
Code: <material name="track" type="asphalt">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.01</bump-amplitude>
<bump-wavelength>100.0</bump-wavelength>
<texture>
<file>textures/track2.png</file>
<length>200.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="grass" type="grass">
<friction>0.7</friction>
<restitution>0.1</restitution>
<rolling>5.0</rolling>
<drag>20.0</drag>
<bump-amplitude>0.03</bump-amplitude>
<bump-wavelength>2.0</bump-wavelength>
<texture>
<file>textures/grass.png</file>
<width>10.0</width>
<length>12.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="gravel" type="gravel">
<friction>0.8</friction>
<restitution>0.0</restitution>
<rolling>40.0</rolling>
<drag>200.0</drag>
<bump-amplitude>0.05</bump-amplitude>
<bump-wavelength>2.0</bump-wavelength>
<texture>
<file>textures/gravel3.png</file>
<width>10.0</width>
<length>10.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="tires" type="rubber">
<friction>1.0</friction>
<restitution>0.8</restitution>
<rolling>1.0</rolling>
<drag>5.0</drag>
<bump-amplitude>0.0</bump-amplitude>
<bump-wavelength>1.0</bump-wavelength>
<texture>
<file>textures/blue-tires.png</file>
<width>0.33</width>
<length>3.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="rail" type="metal">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.0</bump-amplitude>
<bump-wavelength>1.0</bump-wavelength>
<texture>
<file>textures/rail.png</file>
<width>0.375</width>
<length>10.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="wall" type="concrete">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.0</bump-amplitude>
<bump-wavelength>1.0</bump-wavelength>
<texture>
<file>textures/wall.png</file>
<width>1.0</width>
<length>10.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="kerb" type="concrete">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.06</bump-amplitude>
<bump-wavelength>2.0</bump-wavelength>
<texture>
<file>textures/blue-kerb.png</file>
<width>2.0</width>
<length>4.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
You can probably figure out what vamos' xml parameter names in terms of what the corresponding VDrift parameters are.
|
|
08-16-2006, 10:40 PM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
I've added these parameters to the format, which is now:
Code: #0. model filename (no spaces allowed)
#1. texture filename (no spaces allowed)
#2. mipmap texture (1 for true, 0 for false)
#3. disable lighting (1 for true, 0 for false)
#4. is this a skybox? (1 for true, 0 for false)
#5. is this object a transparent blended texture? (1 for true, 0 for false)
#6. bump wavelength
#7. bump amplitude
#8. driveable (1 for true, 0 for false) -> deprecated, use collide-able flag
#9. collide-able (1 for true, 0 for false)
#10. friction coefficient for non-treaded tires
#11. friction coefficient for treaded tires
#12. rolling resistance coefficient (http://en.wikipedia.org/wiki/Rolling_fricti
on)
#13. rolling drag
I added the parameters to Road Atlanta's list.txt by doing the following after loading the file in listedit:
Code: > $ addparam 5.0
> $ addparam 20.0
> $ set 1 road* 12 1.0
Set 146 entries.
> $ set 1 road* 13 0.0
Set 146 entries.
The first two lines add the new parameters and specify defaults that are the same as vamos' values for grass. The second two lines set the road to have a 1.0 coefficient on rolling resistance and a 0.0 on drag.
While I'm at it, here are some of vamos' default material values, for reference:
Code: <material name="track" type="asphalt">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.01</bump-amplitude>
<bump-wavelength>100.0</bump-wavelength>
<texture>
<file>textures/track2.png</file>
<length>200.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="grass" type="grass">
<friction>0.7</friction>
<restitution>0.1</restitution>
<rolling>5.0</rolling>
<drag>20.0</drag>
<bump-amplitude>0.03</bump-amplitude>
<bump-wavelength>2.0</bump-wavelength>
<texture>
<file>textures/grass.png</file>
<width>10.0</width>
<length>12.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="gravel" type="gravel">
<friction>0.8</friction>
<restitution>0.0</restitution>
<rolling>40.0</rolling>
<drag>200.0</drag>
<bump-amplitude>0.05</bump-amplitude>
<bump-wavelength>2.0</bump-wavelength>
<texture>
<file>textures/gravel3.png</file>
<width>10.0</width>
<length>10.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="tires" type="rubber">
<friction>1.0</friction>
<restitution>0.8</restitution>
<rolling>1.0</rolling>
<drag>5.0</drag>
<bump-amplitude>0.0</bump-amplitude>
<bump-wavelength>1.0</bump-wavelength>
<texture>
<file>textures/blue-tires.png</file>
<width>0.33</width>
<length>3.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="rail" type="metal">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.0</bump-amplitude>
<bump-wavelength>1.0</bump-wavelength>
<texture>
<file>textures/rail.png</file>
<width>0.375</width>
<length>10.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="wall" type="concrete">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.0</bump-amplitude>
<bump-wavelength>1.0</bump-wavelength>
<texture>
<file>textures/wall.png</file>
<width>1.0</width>
<length>10.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
<material name="kerb" type="concrete">
<friction>1.0</friction>
<restitution>0.1</restitution>
<rolling>1.0</rolling>
<drag>0.0</drag>
<bump-amplitude>0.06</bump-amplitude>
<bump-wavelength>2.0</bump-wavelength>
<texture>
<file>textures/blue-kerb.png</file>
<width>2.0</width>
<length>4.0</length>
<smooth/>
<mipmap/>
</texture>
</material>
You can probably figure out what vamos' xml parameter names in terms of what the corresponding VDrift parameters are.
|
|
08-16-2006, 10:57 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:This is apparently different than drag, although I'm not sure how, as they seem closely related. Anyway, I'll add these parameters to Road Atlanta since this seems as good a time as any.
think of drag as proportional to the viscosity of the medium you are moving through. walking in water is always harder than walking in air because water has much higher viscosity. the rolling resistance is a property of the wheel coupled to the properties of the ground through the rolling resistance coefficient. imagine driving in sand. the rolling resistance coefficient drops, so the wheel slips and drag increases as the tire sinks into the sand. the two are not really related.
now, i play a physicist in real life but i haven't done this kind of physics in some 20 years (and i can't be bothered to look it up) so take everything i said with a grain of sand.
anyway, i'll take a look at the code to see what you've implemented.
--alex--
|
|
08-16-2006, 10:57 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:This is apparently different than drag, although I'm not sure how, as they seem closely related. Anyway, I'll add these parameters to Road Atlanta since this seems as good a time as any.
think of drag as proportional to the viscosity of the medium you are moving through. walking in water is always harder than walking in air because water has much higher viscosity. the rolling resistance is a property of the wheel coupled to the properties of the ground through the rolling resistance coefficient. imagine driving in sand. the rolling resistance coefficient drops, so the wheel slips and drag increases as the tire sinks into the sand. the two are not really related.
now, i play a physicist in real life but i haven't done this kind of physics in some 20 years (and i can't be bothered to look it up) so take everything i said with a grain of sand.
anyway, i'll take a look at the code to see what you've implemented.
--alex--
|
|
|