The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
surfaces.txt - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: surfaces.txt (/showthread.php?tid=1316)

Pages: 1 2 3


surfaces.txt - alex25 - 07-19-2010

can the person who created surfaces.txt (log0) also update the list.txt files with the appropriate values. i made the mistake of moving the surfaces.txt files to the top directory for each track and now most tracks don't work because of the missing parameters. sorry for the inconvenience and i hope we sort this out soon.

--alex--


- NaN - 07-20-2010

The new surfaces won't work because the surface loader has to be updated. The current one only supports 6 unique surfaces. Will fix it asap.


- alex25 - 07-21-2010

thanks for the fix. i guess we need to come up with a way to get rid of the surface values from list.txt. any thoughts?

--alex--


- alex25 - 07-24-2010

can we have the scripts used for the conversion to surfaces.txt be made available. i have a lot of tracks i need to update now and i don't really feel like doing it by hand (and i guess writing my own scripts). thanks.

--alex--


- NaN - 07-24-2010

The script looks for list.txt files in root, creates surfaces.txt and updates list.txt.

Code:
import os

def locate(pattern, root=os.getcwd()):
    for path, dirs, files in os.walk(root):
        for filename in [os.path.abspath(os.path.join(path, filename)) for filename in files if filename.endswith(pattern)]:
            yield filename

root = 'E:/vdrift/vdrift-data/tracks'
pattern = 'list.txt'

for filename in locate(pattern, root):
    print filename
    objects = []
    object = []
    file = open(filename)
    line = file.readline().rstrip()
    while line != '':
        if '.joe' in line:
            if len(object): objects.append(object)
            object = []
            object.append(line)
        elif len(object) > 0 and line != '\n' and line != '' and not line.startswith('#'):
            object.append(line)
        line = file.readline()
    objects.append(object)
    file.close()
    #print 'objects: ' + str(len(objects))
    surfaces = []
    for object in objects:
        surface = [object[6], object[7], object[10], object[11], object[12], object[13]]
        i = 0
        while i < len(surfaces):
            if surface == surfaces[i]: break
            i = i + 1
        if i == len(surfaces):
            surfaces.append(surface)
        if len(object) == 14:
            object.extend(['0\n', '0\n', str(i)+'\n'])
        elif len(object) == 16:
            object.append(str(i)+'\n')
        else:
            object[16] = str(i)+'\n'
    #print 'surfaces: ' + str(len(surfaces))
    dir = os.path.dirname(filename)
    sfile = open(dir + '/surfaces.txt', 'w')
    id = 0
    for surface in surfaces:
        #print surface
        sfile.write('[surface-'+ str(id).zfill(2) + ']\n')
        #sfile.write('ID = ' + str(id) + '\n')
        sfile.write('Type = asphalt\n')
        sfile.write('BumpWaveLength = ' + str(surface[0]))
        sfile.write('BumpAmplitude = ' + str(surface[1]))
        sfile.write('FrictionNonTread = ' + str(surface[2]))
        sfile.write('FrictionTread = ' + str(surface[3]))
        sfile.write('RollResistanceCoefficient = ' + str(surface[4]))
        sfile.write('RollingDrag = ' + str(surface[5]))
        sfile.write('\n')
        id = id + 1
    sfile.close()
    #print 'write objects'
    file = open(filename, 'w')
    file.write('17\n')
    i = 0
    for object in objects:
        file.write('\n#entry ' + str(i) + '\n')
        i = i + 1
        for entry in object:
            file.write(str(entry))
    file.close()

By the way, I am currently updating the import_jpk/export_jpk scripts to support object parameters.
[Image: Unbenannto5oj0.jpg]


- alex25 - 07-25-2010

thanks. it definitely makes converting a lot easier.


- NaN - 07-25-2010

I've hit a serious issue not sure how to deal with. For some strange reason Blender limits the length of the texture/model name to 21 characters. This means some texture/joe names will be truncated/incorrect after export, sigh.

Any suggestions are welcomed.


- thelusiv - 08-05-2010

NaN Wrote:By the way, I am currently updating the import_jpk/export_jpk scripts to support object parameters.

That would be really cool, have you gotten anywhere with this?


- NaN - 08-05-2010

It is actually ready since July 25th. I just haven't uploaded it. I would like to rewrite the scene description format completely, evaluating the options at the moment.


- alex25 - 08-08-2010

NaN Wrote:It is actually ready since July 25th. I just haven't uploaded it. I would like to rewrite the scene description format completely, evaluating the options at the moment.
having just used the import script i have to say that i found it extremely useful. great job. let me make a suggestion, if i may (based on the experience with hungaroring06). joe file names look something like this: bridge_ad_lights_02.dof-00.joe, bridge_ad_lights_02.dof-01.joe. when importing, it will be nice to strip the .dof-??.joe part and combine them into a single blender object. then when i export them back i would get a single dof object bridge_ad_lights_02.dof so it would be easier to see what changed (and ultimately the names of the joe object files would stay the same). hopefully i was clear enough and that this is something simple enough to implement (this would also save 10 characters for the file names which considering the blender name length limitation will also help).

thanks for the great work.

--alex--


- alex25 - 08-16-2010

NaN Wrote:I've hit a serious issue not sure how to deal with. For some strange reason Blender limits the length of the texture/model name to 21 characters. This means some texture/joe names will be truncated/incorrect after export, sigh.

Any suggestions are welcomed.
i suggest mapping the names to something blender will accept (take the first 18 characters and add a three digit prefix, for example. this is what i think blender does). write the mapping to a file. have the export file read the mapping file and rename the object back to its original name when saving it. i'm using blender and the import/export scripts to fix the tracks and trying to figure out the mapping between the blender names and the original names is a real pain in the ass. i don't think it would be that hard to implement (maybe not elegant, but such is life). thanks.

--alex--


- NaN - 08-18-2010

Haven't made much progress towards a new track description format, sigh.

I've uploaded the most recent vdrift.py. The script will apply materials named surface-xx with distinct colors to track objects depending on their surface. To change the surface select one of the available surface-xx materials or create a new one called surface-xx(xx number of the surface).

http://svn.vdrift.net/repos/vdrift-art/trunk/tools/


- alex25 - 08-18-2010

hmm, this broke the import scripts:

Code:
max: 0
Traceback (most recent call last):
  File "import-jpk.py", line 25, in load_jpk
    jpk = joe_pack().load(filename)
  File "./vdrift.py", line 352, in load
    self.load_list(filename)
  File "./vdrift.py", line 479, in load_list
    delta = scale / maxid
ZeroDivisionError: integer division or modulo by zero

as for the long names. apparently you can store the long names in IDProperties and then use that on export. trying to figure out how to actually do it.

--alex--


- NaN - 08-18-2010

Which track is it? The error means that the only applied track surface is surface-00 (maxid = 0). Will add a check for this case.


- NaN - 08-18-2010

I've updated vdrift.py to support single surface(surface-00) tracks.