My first jme3 experience: F1Viewer3D – suggestions needed (32 posts)

Topic tags: f1viewer f1viewer3d f1project truman giuseppe italiano
  • Profile picture of truman truman9p said 12 months ago:

    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 ?

    Thanks in advance

  • Profile picture of normen normen1079p said 12 months ago:

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

  • Profile picture of truman truman9p said 12 months ago:

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

  • Profile picture of Momoko_Fan Momoko_Fan321p said 12 months ago:

    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 :)

  • Profile picture of ahoehma ahoehma7p said 12 months ago:

    Looks COOL :)

  • Profile picture of truman truman9p said 11 months, 4 weeks ago:

    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 !!!!

  • Profile picture of normen normen1079p said 11 months, 4 weeks ago:

    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.

  • Profile picture of truman truman9p said 11 months, 4 weeks ago:

    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

  • Profile picture of truman truman9p said 11 months, 4 weeks ago:

    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

  • Profile picture of normen normen1079p said 11 months, 4 weeks ago:

    Theres the collision normal supplied.

  • Profile picture of truman truman9p said 11 months, 4 weeks ago:

    normen said:
    Theres the collision normal supplied.

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

  • Profile picture of truman truman9p said 8 months, 3 weeks ago:

    I’ve powered a new release of my project:
    .

    I need help on lights:
    which could be the right combination of them to have a realistic effect?
    My setupLightning method is very simple:

    	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);
    		}

    where my shadow direction is the same of dl2 direction
    any help would be appreciated
    thanks
    bye

  • Profile picture of glaucomardano glaucomardano237p said 8 months, 3 weeks ago:

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

    truman said:
    I’ve powered a new release of my project:
    .

    I need help on lights:
    which could be the right combination of them to have a realistic effect?
    My setupLightning method is very simple:

    	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);
    		}

    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!

  • Profile picture of Momoko_Fan Momoko_Fan321p said 8 months, 3 weeks ago:

    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

  • Profile picture of truman truman9p said 8 months, 3 weeks ago:

    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