Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LE is up - hoping it'll be a good prototype for new features
06-16-2010, 10:45 PM,
LE is up - hoping it'll be a good prototype for new features
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.
06-17-2010, 03:08 AM,
Nice job zimluura!

Some suggestions:
position=0.667, 0.401, 0.026
orientation=x, y, z, w
layer=car_noblend    ;normal_noblend, twodim, lights_emissive, lights_omni, ....
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.

Car body and driver should go into accessories.txt too. But then it needs another name.
06-17-2010, 10:32 AM,
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.
06-17-2010, 10:40 AM,
OK. Joe can you elaborate on the light volumes(if I got it right)?

    // 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++)
        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;
        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.SetCull(true, true);
        //draw.SetCull(false, false);
06-18-2010, 01:11 AM,

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.
06-18-2010, 07:11 AM,
I'd like to use it for headlights too. Have been thinking about the best way to expose it to the user.

06-18-2010, 10:15 PM,
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?
06-18-2010, 10:15 PM,
By the way, the LE looks great! :-)
06-19-2010, 11:20 AM,
06-19-2010, 07:39 PM,
Just fooling around ...

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

; graphics

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

name = brake_front
texture-0 = rotor_worn.png
radius = 0.15
width = 0.05
position = -0.05, 0, 0

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

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

; car dynamics

name = tire_front
size = 205/50r17
type = touring

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

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

Forum Jump:

Users browsing this thread: 1 Guest(s)