*** DTRemenak <DTRemenak!~DTRemenak@2603-8001-3700-003f-f089-b02e-2975-0f3d.res6.spectrum.com> has quit IRC (Ping timeout: 264 seconds) | 00:02 | |
*** DTRemenak <DTRemenak!~DTRemenak@2603-8001-3700-003f-2467-8e07-0bbc-2679.res6.spectrum.com> has joined #bzflag | 02:11 | |
*** bryjen <bryjen!~bryjen@2603-6010-7a04-7681-0ad4-0cff-fe30-0e67.res6.spectrum.com> has joined #bzflag | 05:05 | |
*** bryjen <bryjen!~bryjen@2603-6010-7a04-7681-0ad4-0cff-fe30-0e67.res6.spectrum.com> has quit IRC (Quit: Leaving) | 07:03 | |
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has quit IRC (Read error: Connection reset by peer) | 09:24 | |
blast007 | I'm working on exporting our tank model and have it mostly working, but there's some face or normal issues that I'm unclear on the correct fix. | 13:29 |
---|---|---|
blast007 | In Blender the textures look right, but some faces are darker, indicating that the normal is flipped. In Wings3D, the shading looks right, but the texture on some faces are flipped/rotated. | 13:30 |
blast007 | That may just be a difference between how Blender and Wings3D handle drawing flipped normals. | 13:31 |
blast007 | would anyone be able to help with this? https://github.com/blast007/bzflag-model-writer/issues/1 | 13:31 |
blast007 | heh... and of course after writing all that out, I think I found the fix.. If I alternate the order of the vertices for each triangle in a GL_TRIANGLE_STRIP it looks right. | 13:38 |
*** GEP <GEP!~GEP@2607:fb90:9834:3734:981c:10f2:86f7:b640> has joined #bzflag | 13:43 | |
*** GEP <GEP!~GEP@2607:fb90:9834:3734:981c:10f2:86f7:b640> has left #bzflag | 13:53 | |
the_map | ordering of corners for normal direction sounds familiar | 14:07 |
the_map | https://stackoverflow.com/a/8142461 | 14:09 |
the_map | "By default, counterclockwise polygons are taken to be front-facing." and "You can change which way OpenGL considers "front facing" via glFrontFace()" | 14:10 |
blast007 | https://static.bzexcess.com/misc_screenshots/tank-model-blender-final.png | 14:13 |
blast007 | (that's using an 8x "AI" upscaled version of our normal tank texture and the tread texture from 2.6) | 14:14 |
the_map | naming something "final" is an almost guaranteed way to notice something's slightly off :p | 14:14 |
blast007 | nah, it's cool, Final Fantasy does it | 14:14 |
the_map | that tank looks very round | 14:14 |
the_map | are the tanks that round? I haven't played in a bit | 14:14 |
the_map | it looks great though | 14:15 |
the_map | one thing I'd request is paneling the texture instead of scaling | 14:15 |
blast007 | the lighting or shading in Blender might be better than in-game | 14:16 |
blast007 | the muzzle looks more brown in-game too, though I'm not sure why | 14:17 |
the_map | it's been in the field, it got dirty | 14:17 |
blast007 | :P | 14:18 |
the_map | is it possible the barrel is inside-out? ie, such that the normals are on the inside | 14:22 |
blast007 | no, the color of the barrel in the code is gray | 14:27 |
blast007 | or do you mean in-game? | 14:28 |
the_map | nah I meant in your GL code | 14:28 |
the_map | be funny if the game had a bug there though that you found by doing this | 14:29 |
blast007 | https://github.com/BZFlag-Dev/bzflag/blob/2.4/src/geometry/TankSceneNode.cxx#L1280-L1284 | 14:29 |
JeffM[m] | blast007: yeah strips toggle order | 17:45 |
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has joined #bzflag | 18:32 | |
*** bryjen <bryjen!~bryjen@2603-6010-7a04-7681-0ad4-0cff-fe30-0e67.res6.spectrum.com> has joined #bzflag | 18:35 | |
*** Okina <Okina!~Yukari@user/yukari> has joined #bzflag | 18:43 | |
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has joined #bzflag | 19:08 | |
*** hop <hop!~hop@nl48.30hopsmax.at> has left #bzflag | 19:13 | |
JeffM[m] | blast007, IIRC the barrel is gray in code, but it uses the last set of UV cords loaded, so it blends it with the texture color, so it will be tinted some color. Whatever texel was at the last loaded UV since it doesn't disable textures for that part. | 20:02 |
JeffM[m] | barrel is always done after turret, so the last UV in the turret would be 0.766f, 0.326f, so that's probably what is used for the barrel | 20:10 |
*** bryjen <bryjen!~bryjen@2603-6010-7a04-7681-0ad4-0cff-fe30-0e67.res6.spectrum.com> has quit IRC (Quit: Leaving) | 20:19 | |
*** bryjen <bryjen!~bryjen@cpe-74-140-75-218.columbus.res.rr.com> has joined #bzflag | 20:30 | |
Agatha | Is this a good time to harp on the tank model's hardcoding as being a deficiency? If possible, can we clean it up and load as a ".obj" or something? | 20:37 |
JeffM[m] | that was always the plan | 20:38 |
JeffM[m] | someone just needs to write the code | 20:38 |
JeffM[m] | or finish writing the code | 20:38 |
Agatha | Is there a model loader for a standard format in the source? What format? | 20:39 |
Agatha | Err hmmm, doesn't the world support .obj loaded objects? | 20:39 |
JeffM[m] | there is not | 20:39 |
JeffM[m] | nope | 20:39 |
JeffM[m] | obj is ok, it's wordy and text based | 20:43 |
JeffM[m] | best would be to compile the model into a runtime resource | 20:43 |
JeffM[m] | and read that | 20:43 |
JeffM[m] | then you can store metadata, like the pivot points | 20:43 |
JeffM[m] | and attachments for the parts | 20:43 |
JeffM[m] | the tank isn't just one model, it's a collection of parts, for moving wheels and explosions. | 20:43 |
JeffM[m] | you should start by looking at TankGeometryMgr.h | 20:47 |
Okina | While on the subject of the tank model, should we consider possible updates on the detailing of the models? | 20:50 |
JeffM[m] | you should make it external first | 20:51 |
JeffM[m] | it's hardcoded right now, so any changes would have to be made in C | 20:51 |
JeffM[m] | not a tool like blender | 20:51 |
JeffM[m] | one it's external, you can let people use any model they want :) | 20:51 |
Okina | True. Although my main thoughts are more of should there be quality on the tank models, similar to the current graphics quality settings. | 20:52 |
Okina | Thus we have high detailed models, mid detailed and low detailed models. | 20:53 |
JeffM[m] | bzflag already supports that. there are 3 levels of detail. hitank, medtank, and lowtank | 20:53 |
JeffM[m] | another reason to use a resource format, you can pack in LOD versions of all the parts. | 20:54 |
JeffM[m] | They are all just VERY low detailed | 20:55 |
JeffM[m] | for modern standards | 20:56 |
JeffM[m] | the TankGeometryMgr has code to provide the requested LOD, and different quality levels limit the LOD type. | 20:58 |
JeffM[m] | once it returned data from an external source then it'd just keep working like that. | 20:59 |
*** bryjen <bryjen!~bryjen@cpe-74-140-75-218.columbus.res.rr.com> has quit IRC (Quit: leaving) | 20:59 | |
JeffM[m] | it just needs to be finished up | 21:04 |
blast007 | I have all the tank models (normal, obese, tiny, thief tiny, and narrow) as .obj now. | 21:34 |
JeffM[m] | nice | 21:35 |
blast007 | though it wouldn't have animations, but it's the first step to getting it into a format that could do that | 21:35 |
blast007 | obj was easy to write to | 21:35 |
JeffM[m] | that's the point of it :) | 21:35 |
JeffM[m] | you may want to look at GLTF | 21:35 |
blast007 | couldn't find a C/C++ library that could write GLTF, for instace | 21:35 |
blast007 | plenty of loaders though | 21:36 |
JeffM[m] | yeah, not sure if I've ever seen a writer | 21:36 |
blast007 | GLTF might also work as a map format, but we'd either need to bundle some extra data file for our custom features (such as teleporters) or write our own extension | 21:37 |
blast007 | Blender supports plugins that add extensions to their GLTF importer/exporter | 21:38 |
JeffM[m] | yeah GLTF is kind of just a container format, you can shove all kinds of stuff into it | 21:38 |
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has quit IRC (Ping timeout: 265 seconds) | 23:40 | |
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has joined #bzflag | 23:58 |
Generated by irclog2html.py 2.17.3.dev0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!