Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VDrift Graphical Upgrades
04-30-2010, 05:04 PM,
It could be a strip in the wheel texture that is going to be colored (if we want to support wheel colors). We would have a tire texture for each tire type and a wheel texture per wheel type.
05-01-2010, 02:08 AM,
yeah, that's what i was originally thinking. just 'cause it's more organized into discrete sections.

one of the things that pushed me away from that a little bit was when i said "hey it's just the edge of the wheel. how many possible style options could there be for it? concentric rings? and ummm, uhh yeah, various numbers of concentric rings."

having it be a smaller strip on the bottom of the wheel texture means we can put less detail into them, so it is mostly about how it will be colored. which might be only applicable in the short term (don't know how far away in-game color is).

that being said even with the color option 2 is messier in the .car or potential .wheel file

i'm not really strongly opinionated either way. and if it turns out we'd be better off altering it in the future, we'll have all the blend files around for less tedium.
05-01-2010, 06:35 PM,
So I'm ready to hook in your mesh_gen.cpp, but I need some assets for testing first. Let me know when you have a .joe and .png checked in for a tire (or if you already do point me to it).
05-02-2010, 04:01 AM,
cool, just uploaded a single .joe, a few blends, and some reworked (and non-reworked) textures. they should be in the carparts/wheel directory. after it gets up and running, i'll fix the bugs in mesh_gen (if you don't fix them first, most've it should be deleting large blocks under if statement) and build a mesh for the rim edge and the rotor.
05-09-2010, 12:51 PM,
I moved the blender files to the art repo and added a tire texture to the carparts folder.
05-11-2010, 11:36 AM,
cool, is that another svn thing to check out then?
if so, i'm guessing i should check it out, and then check-all the oem_wheel.blend files i've made there.
05-11-2010, 09:52 PM,
I checked in the tire mesh generation in R2709. I only added the tire info to the M7's car file, so the other cars just fall back to the normal method. There's definitely something wrong with the mesh generation at the moment!

By the way, here's the info that needs to be added to a .car file to get the mesh generation working (this also needs to go into tire-rear):
[ tire-front ]
size = 225/50r16
wheel = 5_spoke_m
tiretexture = tire
05-13-2010, 12:17 AM,
ok! got it to compile and run. but i was really expecting to see something here. as it stands i'm not even seeing the car body get loaded up in the "start practice preview".

is that what you were seeing?

also, i should really ask this: exactly how does vdrift store its texture coordinates? are they done as part of the face indexes (like immediate mode ogl) or done on a per vertex level (like a vbo where you have to duplicate some vertexes to emulate a vertex with different uv coords depending on which face is being drawn)?

i'm pretty sure it's the second example (because there's a shader directory), but the tire app i built was like the first example. but i want to make sure.

edit1: messing around a little, returned right after the mesh_gen function starts. and i still don't see anything in the preview (still crashes on going into the game).

i see this in the console:
ERROR: Loading log: Error loading model: datacarparts/wheel/5_spoke_m.joe
Error generating wheel mesh for wheel 0

which my first guess would be a backslash missing somewhere in the source, but it might just be a messed up error message.

even so that we're getting an error message is on the joe file is sorta strange. (looked ok to me). am i correct in thinking a vertexarray with nothing inside it shouldn't disrupt the loading of other things?

edit 2: after searching for where sharedpartspath, err letme make that grepping. i decided to just duplicate the data in the directory it was searching. and got it to load the wheel meshes. and the the tire mesh got generated., that is messed up!!!!

ok, letme try to recode it then. is there any slick way to draw vertexes?
05-13-2010, 01:45 AM,
Quote: would be a backslash missing somewhere in the source
That was me, sorry. Fixed in r2713. Don't forget to update your data.
05-13-2010, 03:09 AM,
gotcha! it's cool man.

letme also make sure i'm 100% clear on how the vertexarray stores its triangle indexes.

SetFaces should point to an array of unsigned integers where0
array_element0 = tri0_vertexIndex0
array_element1 = tri0_vertexIndex1
array_element2 = tri0_vertexIndex2
array_element3 = tri1_vertexIndex0
array_element4 = tri1_vertexIndex1
array_element5 = tri0_vertexIndex2


05-13-2010, 03:57 AM,
mesh_gen is fine now (r2714). There is a bug in cardynamics. It needs tire bounding box to calculate the collision shape. Will fix asap.
05-13-2010, 04:16 AM,
Wheels load now(r2715). We need to adjust the rim width, placement and maybe tire orientation.

Could you look into this? The code is in car.cpp function CAR::GenerateWheelMesh()
05-13-2010, 10:41 AM,
Yep, that's how the triangle indices work. Also, if I remember correctly, the texture coordinates are done per vertex, just like normals, so you index into them.
05-13-2010, 11:46 AM,
I need to get the texture coordinates set properly. those were something i was sure would be a bit off.

did you guys have to fix bugs in my code to get it to work, or were there bugs elsewhere preventing them from interacting well? i want to know just so i can figure out if/where i was messing up badly (where i should be more careful), before i try to generate the wheel_edge

NaN: do you mean the gap between the tire and the wheel.joe? if so, that was supposed to be filled in by the wheel edge. just wanted to make sure my 3d abilities are up to snuff before i attempt to write more mesh_gen code.

or do you mean it's just not looking quite right (aside from crazy texture coordinates)? if so, the tire.GetRadius lines makes me think it could be something with trying to use the radius parameter in the old [wheel] section in tandem with the tire mesh_gen line. 'cause, in theory the tire radius should be determined from the tire's code, and its psi.

or is it something i'm not considering?
05-13-2010, 02:34 PM,
Quote:did you guys have to fix bugs in my code
1. radius calculation was missing a myltiply by 0.5
float rimRadius_m = rimDiameter_in * 0.0254f * 0.5;
2. vertex index calculation was missing a multiply by 3
float *x = &vertexData[(lv+segmentsAround * 0) * 3 + 0];

Quote:do you mean the gap
I meant the placement/scale of the mesh relative to tire. I was just too lazy to do it by myself. Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)