Forums

Full Version: LE is up - hoping it'll be a good prototype for new features
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
finally got the LE up after like 2.5 years. got to do some texturing work still, but it's at least pass-able now.

i exported it in a way to be an ok car for the time being but to be a test bed for new features.

(accessories.txt is how i'm thinking the file format might pan out).
side mirrors intended as prototypes for damage.
tachometer and speedometer surfaces.
steering wheel is a separate object. hopefully one day it will rotate (though i might need to export one that's laying flat on a plane first)

anyways - hopefully this will help.
Nice job zimluura!

Some suggestions:
Code:
[mirror_r]
mesh=mirror_r.joe
texture=mirror.png
position=0.667, 0.401, 0.026
orientation=x, y, z, w
layer=car_noblend    ;normal_noblend, twodim, lights_emissive, lights_omni, ....
mass=1.0
shape=capsule    ;sphere, capsule, multisphere, box, staticmesh, ...

Not sure about the shape(collision shape). Maybe it should be determined internally(because of speed reasons). Car has a multisphere shape at the moment. Track objects are a single static mesh.

I think we should figure out an object description file format, to be usable with track objects too.

[edit]
Car body and driver should go into accessories.txt too. But then it needs another name.
We might want to use 3 euler angles for the specification of orientation, because it seems artist-friendlier (blender shows eulers in the transform->properties menu). Also, we probably don't need to specify the drawable layer, that's kind of an implementation detail. Instead they should just specify whether or not the object should be considered transparent. I agree that the collision info should just be auto-generated.
OK. Joe can you elaborate on the light volumes(if I got it right)?

Code:
    // create brake light point light sources
    // this is experimental at the moment and uses fixed
    // coordinates to place the brake lights
    for (int i = 0; i < 2; i++)
    {
        lights.push_back(LIGHT());
        SCENENODE & bodynoderef = topnode.GetNode(bodynode);
        lights.back().node = bodynoderef.AddNode();
        SCENENODE & node = bodynoderef.GetNode(lights.back().node);
        VERTEXARRAY & varray = lights.back().varray;
        MODEL & model = lights.back().model;
        varray.SetToUnitCube();
        varray.Scale(2.0,2.0,2.0);
        //varray.SetToBillboard(-1,-1,1,1);
        node.GetTransform().SetTranslation(MATHVECTOR <float,3>(-2.16,-0.45*(i*2-1),-0.18));
        model.BuildFromVertexArray(varray, error_output);
        
        
        keyed_container <DRAWABLE> & dlist = GetDrawlist(node, OMNI);
        lights.back().draw = dlist.insert(DRAWABLE());
        DRAWABLE & draw = dlist.get(lights.back().draw);
        draw.SetColor(0.8,0.1,0.1);
        draw.AddDrawList(model.GetListID());
        //draw.SetVertArray(&model.GetVertexArray());
        draw.SetCull(true, true);
        //draw.SetCull(false, false);
        draw.SetDrawEnable(false);
    }
Sure.

This is the way that lighting works in the deferred renderer: postprocess the gbuffer with a shader that accumulates the contribution from the light. Instead of postprocessing the entire screen, an optimization is to only postprocess the set of pixels that the light will affect. For a point light, we can roughly get the pixels affected by a light by rendering the backfaces of a bounding cube (we must render backfaces in case the camera is inside the cube).

This particular bit of code was a test that explicitly set up the bounding cube and its properties; eventually I'll make it so you can call a function to set up the point light with position, radius, and color.
I'd like to use it for headlights too. Have been thinking about the best way to expose it to the user.

Code:
[light-0]
position
color
shape/radius
orientation/direction
I was thinking omni (point) lights and spot lights (for headlights or street lamps) are probably all of the types we need to support. Does that sound right?
By the way, the LE looks great! :-)
thanks!
Just fooling around ...

Use dedicated loaders for each [object]. Support simple inheritance [base.derived]. Maybe we should switch to a scripting language, lol.

Code:
; graphics

[model]
name = oem_wheel
mesh = oem_wheel.joe
texture-0 = oem_wheel.png
texture-1 = oem_wheel_misc1.png    ;optional, material texture
texture-2 = oem_wheel_misc2.png    ;optional, normal texture
position = 0,0,0                 ;optional, relative to parent
orientation = 0,0,0                ;optional, euler angles in degrees
scale = 1,1,1                    ;optional, use negative numbers to mirror objects
mass = 0.0                        ;optional, 0.0 => static object
color = 1,1,1,1                    ;if alpha 1 and diffuse texture with alpha do vertex color blend

[model.brake]
name = brake_front
texture-0 = rotor_worn.png
radius = 0.15
width = 0.05
position = -0.05, 0, 0

[model.wheel]
name = wheel_front
size = 205/50r17
texture-0 = touring.png
model = oem_wheel, brake_front

[light]
name = brake_left
position = 0.5, -1.5, 0.3
color = 1, 0, 0
radius = 8


; car dynamics

[tire]
name = tire_front
size = 205/50r17
type = touring

[brake]
name = brake_front
friction = 0.9
max-pressure = 3.0e6
bias = 0.6
radius = 0.1397
area = 0.01

[wheel]
name = front_right
position = -0.73, 1.28, -0.48
scale = -1, 1, 1
tire = tire_front
brake = brake_front
model = wheel_front