Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about car models & double sided faces
12-20-2007, 09:15 PM,
#1
question about car models & double sided faces
i read in the car development wiki that double sided faces aren't supported.
but i took it to mean, at first, that everything should be a solid mesh so triangles could be drawn single sided (cw, ccw). but when looking at another car (tc) i noticed that the mesh isn't solid and that triangles were being drawn double sided. basically that inside the engine bay, when you look up at the hood with freecam it's has the same texture as the top side of the hood.

so anyways, since i'm working on a car i sorta want to know how i should be piecing things together.

do i make the meshes have a zero volume kinda feel. like if you were to dunk them in liquid they wouldn't displace any of it since they're infinitely thin. this seems to work fine in the windows release from march. but how does the development version of the game handle this?

or

should i make each one have a solid construction (something that would displace water)

am i being clear with my question here?? thanks in advance.
Reply
12-21-2007, 12:13 AM,
#2
 
Both sides of faces are drawn. The double sided comment is in reference to the blender "double sided" setting, which you have to turn off (otherwise it makes blender export weird normals).
Reply
12-21-2007, 01:27 AM,
#3
thanks
thanks, had no idea about that setting and had been working with it on for my materials.
Reply
04-04-2008, 09:18 PM,
#4
 
so can somebody post a quick tutorial on how to make double-sided textures in blender? what i have so far is a two-sided face in blender (by going into "uv face select" and choosing twoside from the texture menu). the face is now double-sided (and it shows as such in blender) but when i export it to either dof or joe format it becomes single sided again. if anybody knows how to do this, please let me know. thanks.

--alex--
Reply
04-04-2008, 10:08 PM,
#5
 
You want to turn the "Double Sided" option off (it's the one in the Mesh menu next to the "No V.Normal Flip" button) because it seems to do weird things to the normals. VDrift will draw all faces as double sided anyway for cars, and will draw them that way for tracks too if "cull faces = off" in the track.txt file. I'm not sure if I answered your question....
Reply
04-04-2008, 11:11 PM,
#6
 
joevenzon Wrote:You want to turn the "Double Sided" option off (it's the one in the Mesh menu next to the "No V.Normal Flip" button) because it seems to do weird things to the normals. VDrift will draw all faces as double sided anyway for cars, and will draw them that way for tracks too if "cull faces = off" in the track.txt file. I'm not sure if I answered your question....

this is for a track (bahrain which i am going to try to get permission to release). i want to make various faces double-sided (like the fence between the pit lane and the main track, the grandstand roof, and a few others).in the past i achieved a double-sided effect by making a copy of the face, flipping the normal for the copy but that seems to be kind of inefficient. anyway, blender seems to have the information to render faces twosided. maybe there is no way to get this passed to a joe object (and i rather not turn off cull faces) but it would be nice if we could. can we add this as an extra parameter in the list.txt file? (like blended transparent textures, etc.) so vdrift can render specific textures double-sided.

--alex--
Reply
04-11-2008, 11:57 AM,
#7
 
alex25 Wrote:this is for a track (bahrain which i am going to try to get permission to release).

permission was granted so expect a new track soon. i turned off culling the faces so the track renders more the way i would like it to but i still think it would be nice to enable double-sided textures only for selected objects (re-using the transparent blended flag for example, 1 for blended, 2 for double-sided).

--alex--
Reply
04-12-2008, 02:03 PM,
#8
 
alex25 Wrote:[quote="alex25"]i still think it would be nice to enable double-sided textures only for selected objects

Yes, that's a good point, double sided-ness makes more sense as a per-object flag instead of a per-track flag. I'll add it to the issues list....
Reply
04-14-2008, 03:08 PM,
#9
 
alex25 Wrote:permission was granted so expect a new track soon.

i've committed the track (bahrain) but it still needs some of work. i seem to be having problems with the vertical surfaces. in particular the pitwalls and the rails around the track behave very strangely. when the car makes contact (i've tried both the F1-02 and the M3) it kind of goes through them and then it starts jumping wildly. maybe somebody can figure out what's wrong. i'll add the bumpiness for the curbs and the appropriate friction coefficients for sand/grass/roads/etc soon.

--alex--
Reply
04-17-2008, 10:08 AM,
#10
 
Yikes, that's a tough track. So many hairpins.

I see what you mean about the rails and pitwalls. I'll take a closer look tonight and see what I can find.
Reply
04-17-2008, 10:39 AM,
#11
 
joevenzon Wrote:I see what you mean about the rails and pitwalls. I'll take a closer look tonight and see what I can find.

also the pylons that prevent cutting corners are supposed to be solid; and they are if you go slow enough. but most of the time i can go through them as of they were not there. i suspect this has something to do with the collision code in bullet but i haven't been able to figure it out. there is such a pylon in the first turn so it's easy to play with if you want to see what i mean.

--alex--
Reply
04-18-2008, 09:46 PM,
#12
 
Alright, I isolated the problem to the way I was assigning the bounding box for the collision detection. Previously I was letting bullet calculate the bounding box, but for some reason it just wasn't returning correct results with most of the bahrain objects, so I now manually calculate the bounding box, and this seems to work fine. Technically it may slightly slow down the track loading, but I didn't notice it. Anyway, the fix is in R1978. Phew!
Reply
04-20-2008, 07:44 PM,
#13
 
Okay, nevermind, it tuns out bullet was calculating the bounding boxes just fine and the problem still exists. I've reverted the changes and will continue to investigate.
Reply
04-20-2008, 11:33 PM,
#14
 
Okay, I think I fixed this for real in R1981. The problem was with how I was generating the bounding box for culling away collision candidates -- it wasn't correctly accounting for the car's rotation.
Reply
04-21-2008, 12:28 PM,
#15
 
joevenzon Wrote:Okay, I think I fixed this for real in R1981. The problem was with how I was generating the bounding box for culling away collision candidates -- it wasn't correctly accounting for the car's rotation.

seems to be a little bit better, but the F1-02 car still goes airborne when it touches a vertical surface. i tried this with bahrain and detroit but i bet the problem exists across all circuits.

--alex--
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)