News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

new wip car

Started by cody, October 26, 2008, 07:59:59 AM

Previous topic - Next topic

Duplode

Quote from: cody on October 30, 2008, 12:35:02 AM
here is a word of advice, neva have overlaying polygons of different colors as they will look glitchy ingame

There's a way around that problem: on Stressed, arrange the order on the polygon list so the one you wish to overlay is immediately after the base one. Then, turn the Z-bias flag on for the polygon which is to stay on top.

cody

#16
almost done, just need wheels and paint jobs, whats the max amout of paint jobs stunts can handle? and why do my wheels glitch out when i turn my car to the left or right

Duplode

Quote from: cody on October 30, 2008, 03:12:00 AM
whats the max amout of paint jobs stunts can handle?

The limit is 128, so in theory you can use (almost) as many as you wish (I have not tested implementing more than seven, though, so you'd better check if the car selection screen works normally in that case).

Quote from: cody on October 30, 2008, 03:12:00 AM
and why do my wheels glitch out when i turn my car to the left or right

Wheel rendering has a number of specificities that need to be taken care of. If you want to avoid trouble with them, first of all I suggest you to move the wheels to the first four positions on the polygon list and order them like this: front-left, front-right, back-right, back-left. Vertex order within the wheels matters as well, so the safest route is to clone exactly the coordinate values from some other car and then just displace them to the correct position.

Two extra tips that might be of help: First, be sure you're using the two-sided flag for any polygons which inner surface is to be exposed (as most likely is the case in the rear part of the truck body). Also, I noticed from your screen shots that your model is all composed by triangles. In case the absence of n-gons means there is a lot more than about 90 polygons on car1, it would be a good idea to double-check if there is no risk of frame rate issues (I had problems when trying to use a downscaled version of Corvette's car0, with 200 polygons). Should you feel the need to test that, the best route would be launching DOSBox with two cars loaded and lower the number of cycles progressively. If the frame rate remains normal up to ~8000 cycles in all likelihood there will be no problems. Else, it could be useful to merge a few triangles into n-gons (a number of .OBJ editors can't do that properly, but Anim8or can - see the first post on page 16 of the "Dissecting" thread should you need it).

cody

i think im having trouble with the z axis, i change one vaule, and it moves the wheel forward or backward, but when ingame, glitches out, plus when i ajust the 4th z value, it moves it forward or backward, but it increases the x axis too.

all i got to do is get wheels done...

and as for lag, the car 1 and car 0 are the same models, wich is 238 triangles permodel(not including wheels) i dont have dos box, so i ran it on a real dos computer using an intel 386 cpu @ 33mhz, not much lag with 2 cars loaded.

anyone here wana take a shot at the wheels?

Duplode

Quote from: cody on October 31, 2008, 05:02:52 AM
and as for lag, the car 1 and car 0 are the same models, wich is 238 triangles permodel(not including wheels) i dont have dos box, so i ran it on a real dos computer using an intel 386 cpu @ 33mhz, not much lag with 2 cars loaded.

Wow, DOSBox is such a resource hog... ::)

Quote from: cody on October 31, 2008, 05:02:52 AM
anyone here wana take a shot at the wheels?

OK, post it and I'll have a look at them later on...

cody

uh, whats a good number of polygons to have and is better to use quads instead of triangles, will polygons with more sides get better preformance?

Duplode

Quote from: cody on November 01, 2008, 07:34:17 AM
uh, whats a good number of polygons to have and is better to use quads instead of triangles, will polygons with more sides get better preformance?

It seems that the number of polygons is the limiting factor on performance issues, the number of sides does not matter much. car0 can have pretty much as many polygons as you wish, since it isn't used for racing anyway. Most car0 shapes from original cars have around 150-180. car1 shapes usually have ~70 polygons (if I remember correctly, the Carrera has the most polygons in car1 - 83). I ran your Ranger under DOSBox and there was some visible frame skip at 9000 cycles. It would probably be a good idea to merge most triangles into quads - the process would be somewhat annoying, but from looking at the shape I'd say it should be possible to reduce to ~100 polygons at least without losing detail. Another point is that, should you desire to have a car0 with extra details in relation to car1, you'd most likely need merging the polygons (as the upper limit for number of polygons is 255).

(For the record, there's another factor that may be involved with performance: the culling mechanism. Dstien is currently studying how to implement auto-generation of culling data, so we'll probably be in a better position to evaluate that in the near future)

Oh, and BTW I saw the wheels, and it seem to be a problem of coordinate orientations (which points are ahead/behind/above/below the wheel center). I'll try fixing it in a while and post back the .3SH .

cody

#22
all done, here is version 1.0

top speed 160mph
excellent handling, can do turns at 160 with out a problem.
well, im gona let you guys try it and post back what you guys think, and hopefully some screenshots too

hmm, i think i need to tweak the transmission because gear 2 and 3 are too close and the last gear is too wide, but not a big deal

v1.0 removed, look at next post for v1.1

dstien

Nice work, it's exciting to finally have a new car in Stunts! Try using different color shades in the paint-jobs to emulate lighting and thus making car body edges visible.

cody

#24
as requested, added contrast to top portion of vehicle, further shading will be imposible unless i rearange the polygons again. transmission will be fixed soon, 3d bumpers are now 2 sided. anything else anybody wana mention?

v1.1

Duplode

This is getting nice... :) the shading does help, and it'll be easier to implement it further once/if you merge the triangles into quads which follow the "organic" lines of the car better. One suggestion for the shapes is to turn the 2-sided flags for the bumpers and any other open surface hanging from the main body of the car. I would comment on CarBlaster stuff too, but it's probably better to debate the shapes first 'till they settle (and also you still have to review the gear ratios, so an assessment right now won't really help).

cody

#26
car blaster is still very confusing for me, so tell me what can be improved preformance wise as the model will be a pain to work on.

here is version 1.2
tweaked transmission and 2 sides bumpers

please comment


(for those of us who cannot dl attachments, try this link)

http://www.4shared.com/file/69824538/38c19161/ranger4stunts_v12.html

Duplode

Quote from: cody on November 05, 2008, 06:21:12 AM
car blaster is still very confusing for me, so tell me what can be improved preformance wise (...)

OK, here are some general suggestions for areas you could look for:

  • First of all, a techincal advice on CarBlaster: it is a good idea to, as soon as you open the program, press "h" (lower case) on the keyboard. That way, byte positions (white number at top-left corner) will be quoted in hexadecimal, and thus you can use the information on Wiki articles such as Car Parameters more directly. Whenever I quote ...h values here I refer to such kind of address.
  • Starting with handling: even if that is ultimately a project decision of yours, I think most pipsqueaks would prefer a car with not so good handling, so it would be necessary to lift off or brake in corners, at least a little. Remember you can fine-tune the car grip by modifying byte 0CAh (the value just to the left of the one CarBlaster says is the "Curve-adhesion" one).
  • I noticed you used the NSX *.RES file as base for your tuning, the logical thing to do in order to avoid the need to tune or copy data for the meter positions and such. A perhaps unforeseen consequence of that, however, is that your pickup inherited powergear as well - and powergear just like the NSX one, very easy to reach on loops and prone to failed drifting turns... :) In case you wish to get rid of powergear, just modify the car mass (028h, or "Inverse Power Amplification" in CarBlaster dialect) or aero drag (05Eh, the 27-valued byte just before the torque curve) a little bit and it'll probably go away.
  • As for straight line performance, the acceleration seems just fine, with maybe only the first gear being a bit too long in relation to the others (a good test for you to check that sort of impression is to put Skid on a LM002 and have a drag race). On the other hand, top speeds might be a little too high. On an infinite oval track, I was able to reach almost 190mph without any kind of bump or jump (after a long while of course). In case you wish to curb top speeds on each gear without improving acceleration too much, one quick option is to multiply all gear ratios by some factor and then multiply the car mass by the same value to compensate for the acceleration. BTW, you can calculate the top speed on each gear rather easily from CarBlaster data. Pick the actual RPM value from the "Maximum Revolutions" parameter (The Car Parameters article on the Wiki explains how to do it, but for your current CARRANG.RES it is 7878rpm) and divide it by the gear ratio value. The result will be the top speed in mph at a certain gear - that value is not limited by aero drag, though, so it is likely you won't ever reach it without a few jumps at the topmost gear.
  • Finally, your torque curve has a pretty prominent peak at the high rpm range. For a more American SUV engine-like behaviour, you may prefer a more even torque curve, with a higher low-rpm half, and also a smaller maximum RPM value maybe (although if 8000rpm does not seem so exaggerate for a highly tuned engine).

In the end, it's a question of testing and adopting whatever you see fit... and don't hesitate to ask for assistance in the process  :)

Quote from: cody on November 05, 2008, 06:21:12 AM
(...) as the model will be a pain to work on.

Referring specifically to the task of merging the polygons, I don't really know about 3D Studio Max, but Anim8or (the mesh editor I use) has a function which can join two selected adjacent polygons with just a keystroke - it can ease things quite a bit. (Hopefully I'm not pointing something too obvious for you, you're probably a lot more familiar with 3D edition than me...)

And speaking of the shapes, there's an artifact at car0 which I have no clue about the source: the black triangles you can see over the doors of the car while it's rotating...

Anyway, keep up the good work, we'll be following  ;)

cody

little more tweeking, try this version.

dstien

Splendid! If you download the latest Stressed build you can now fix the cull data. Select the first polygon, then select the last one while holding down the shift key. Right click on the last polygon and click "Compute cull data" on the context menu. This animation illustrates the effect (before/after updating cull data):