My first jme3 experience: F1Viewer3D – suggestions needed

Hi everybody,

I’m trying to develop a jme3 car racing game

It’s a race viewer for a f1 browser game( f1project)

I’m trying to manage physics, but I have many problems with car impacts

Any suggestion from your experience to manage them ?


http://www.youtube.com/watch?v=jdEVxmVoaSc

Thanks in advance

1 Like

Cool. Whats your problem exactly? The AI doesn’t manage to avoid the collisions properly?

This is one problem, but the main one is that cars loose too much time when have accidents

Yeah, its reality. When you crash, your car gets ruined and you would be lucky if you don’t end up with a broken neck :slight_smile:

Looks COOL :slight_smile:

Momoko_Fan said:
Yeah, its reality. When you crash, your car gets ruined and you would be lucky if you don't end up with a broken neck :)


I agree with you, but I need to reduce impact effects, in other words I have to reduce number of broken necks :)
For example one problem is the restitution value: if it's too low cars go to glue themselves, if it's too high every impact is a mortal accident
I've set restitution at .9f, I'd need suggestions about this kind of things
Anyway I can confirm that: JME3 gives great satisfaction, thank you !!!!

I’d try not modifying too many values at once. Reset all values to default and try what one value is doing. Another “trick” might be checking impact forces and applying opposing forces when the impact was too powerful.

1 Like
normen said:
I'd try not modifying too many values at once. Reset all values to default and try what one value is doing. Another "trick" might be checking impact forces and applying opposing forces when the impact was too powerful.


I'll try it
It could be a good idea
truman said:
I'll try it
It could be a good idea


could you provide an example please?
PhysicsCollisionEvent gives me only float values of applied forces
How can I get a Vector3f force of impact?
Thanks

Theres the collision normal supplied.

normen said:
Theres the collision normal supplied.

Thanks for quick answer
Are getLateralFrictionDir1 and getLateralFrictionDir2 the right methods?

I’ve powered a new release of my project:

.

http://www.youtube.com/watch?v=DWLxHsMQaSI

I need help on lights:

which could be the right combination of them to have a realistic effect?

My setupLightning method is very simple:

[java] public void setupLighting() {

am=new AmbientLight();

am.setColor(new ColorRGBA(1,1,1,.75f));

rootNode.addLight(am);

dl = new DirectionalLight();

dl.setDirection(new Vector3f(-1, -1, -1f).normalizeLocal());

dl.setColor(new ColorRGBA(1,1,1,.15f));

rootNode.addLight(dl);

dl2 = new DirectionalLight();

dl2.setDirection(new Vector3f(-1, 1, 1f).normalizeLocal());

dl2.setColor(new ColorRGBA(1,1,1,.15f));

rootNode.addLight(dl2);

}[/java]

where my shadow direction is the same of dl2 direction

any help would be appreciated

thanks

bye

Dude, Very Cool! I love car games ;P.


truman said:
I've powered a new release of my project:
.
http://www.youtube.com/watch?v=DWLxHsMQaSI
I need help on lights:
which could be the right combination of them to have a realistic effect?
My setupLightning method is very simple:
[java] public void setupLighting() {
am=new AmbientLight();
am.setColor(new ColorRGBA(1,1,1,.75f));
rootNode.addLight(am);
dl = new DirectionalLight();
dl.setDirection(new Vector3f(-1, -1, -1f).normalizeLocal());
dl.setColor(new ColorRGBA(1,1,1,.15f));
rootNode.addLight(dl);
dl2 = new DirectionalLight();
dl2.setDirection(new Vector3f(-1, 1, 1f).normalizeLocal());
dl2.setColor(new ColorRGBA(1,1,1,.15f));
rootNode.addLight(dl2);
}[/java]
where my shadow direction is the same of dl2 direction
any help would be appreciated
thanks
bye


Are you lightning the whole scene with only 3 lights?:o
Could be cool a ambient occlusion effect!

Don’t use the alpha portion on lights, I am pretty sure it does nothing. Instead scale the RGB values down

Also … outdoor lighting generally has one powerful directional light (sun), which is usually light yellow, and low ambient lighting with the color light blue (sky). This will help you give a more realistic lighting model.



If its still not enough you can use normal mapping on some parts of the scene to improve the look

1 Like
Momoko_Fan said:
Don't use the alpha portion on lights, I am pretty sure it does nothing. Instead scale the RGB values down
Also .. outdoor lighting generally has one powerful directional light (sun), which is usually light yellow, and low ambient lighting with the color light blue (sky). This will help you give a more realistic lighting model.

If its still not enough you can use normal mapping on some parts of the scene to improve the look


thanks, I'll try and I'll show you results
bye

many graphic improvements, still work in progress



http://www.youtube.com/watch?v=FH_39WHszXc

1 Like

Just wonderful :smiley:

@truman: Super Pro … You got a fan here !



But hey, why don’t you lit more light and some shadow of the cars on the road?

Some noise and dirt texture/shader is need for the road too (look extremely clean)… Anyway the game (especially the refection shader catch my eyes)

memonick said:
Just wonderful :D

thanks :)
atomix said:
@truman: Super Pro ... You got a fan here !

But hey, why don't you lit more light and some shadow of the cars on the road?
Some noise and dirt texture/shader is need for the road too (look extremely clean)... Anyway the game (especially the refection shader catch my eyes)


still working on graphics
about asphalt:
I'd like to add skid marks on it, but I used seamless textures (I scaled them) and putting skid marks on SpecularMap would give a very repetitive look at road. This is because I cannot use different scales for maps on the same material.
Any suggestion about this?

thanks ;)
bye

For skid marks : use simple quad decal if your road is nearly flat !!!

Then you can simply remove the the older decals to reduce the amount of them.

1 Like