![]() |
|
VDrift Graphical Upgrades - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3) +--- Forum: General Discussion (https://www.vdrift.net/Forum/forumdisplay.php?fid=8) +--- Thread: VDrift Graphical Upgrades (/showthread.php?tid=1261) |
- NaN - 04-30-2010 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. - zimluura - 05-01-2010 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 [wheel-rear] size=215/65r15 tire_texture=racing_slick_eagle.png oem_wheel_edge_texture=double_ring_w_rivets.png oem_wheel_texture=oem_wheel.png 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. - joevenzon - 05-01-2010 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). - zimluura - 05-02-2010 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. - joevenzon - 05-09-2010 I moved the blender files to the art repo and added a tire texture to the carparts folder. - zimluura - 05-11-2010 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. - joevenzon - 05-11-2010 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): Code: [ tire-front ]- zimluura - 05-13-2010 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. and...man, that is messed up!!!! ok, letme try to recode it then. is there any slick way to draw vertexes? - NaN - 05-13-2010 Quote: would be a backslash missing somewhere in the sourceThat was me, sorry. Fixed in r2713. Don't forget to update your data. - zimluura - 05-13-2010 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 ...etc ?? - NaN - 05-13-2010 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. - NaN - 05-13-2010 Wheels load now(r2715). We need to adjust the rim width, placement and maybe tire orientation. @zimluura Could you look into this? The code is in car.cpp function CAR::GenerateWheelMesh() - joevenzon - 05-13-2010 @zim, 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. - zimluura - 05-13-2010 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? - NaN - 05-13-2010 Quote:did you guys have to fix bugs in my code1. radius calculation was missing a myltiply by 0.5 Code: float rimRadius_m = rimDiameter_in * 0.0254f * 0.5;Code: float *x = &vertexData[(lv+segmentsAround * 0) * 3 + 0];Quote:do you mean the gapI meant the placement/scale of the mesh relative to tire. I was just too lazy to do it by myself.
|