New Texture Viewer in Model Viewer - Page 2 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 09-14-2018, 01:55 PM   #11
51thPolux
Junior Member
 
Join Date: Apr 2009
Location: nimes
Posts: 54
Default

there is a trick to update the texture without restarting the program? reload livery does not update ...
51thPolux is offline   Reply With Quote
Old 09-14-2018, 03:59 PM   #12
jocko417
Member
 
Join Date: Dec 2009
Location: Georgetown, ON
Posts: 725
Default

I think that feature is still broken in this version. It has been reported.
jocko417 is offline   Reply With Quote
Old 09-14-2018, 04:05 PM   #13
51thPolux
Junior Member
 
Join Date: Apr 2009
Location: nimes
Posts: 54
Default

thanks
51thPolux is offline   Reply With Quote
Old 09-15-2018, 02:39 AM   #14
SkateZilla
Moderator/ED Testers Team
 
SkateZilla's Avatar
 
Join Date: Jun 2012
Location: Virginia Beach
Posts: 18,229
Default

Script the autoexe.lua to load your model and your livery, close it and re-open.
__________________
Windows 7 Ult. 64, HAF922, FX8350 @ 5.31GHz H100 Cooled, 16GB DDR3-2133 GSkill,
2x R7970 Lightnings Crossfired @ 1.1/6.0GHz, Creative XFi Plat. Fatal1ty Champion,
3x ASUS VS248HP + Hanns·G HZ201HPB + Acer AL2002 (5760x1080+1600x900+1680x1050)
TM Warthog HOTAS, TM MFDs, CH Fighterstick, Pro Throttle, CH Pro Pedals, TrackIR4 Pro
SkateZilla is offline   Reply With Quote
Old 09-15-2018, 12:20 PM   #15
51thPolux
Junior Member
 
Join Date: Apr 2009
Location: nimes
Posts: 54
Default

it's ok for the model but not for the texture. What do you use for the path of texture?


LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.edm")
LoadLivery("CoreMods/aircraft/FA-18C/Liveries/FA-18C_hornet/","Australian 75th Squadron")
51thPolux is offline   Reply With Quote
Old 09-15-2018, 03:23 PM   #16
SkateZilla
Moderator/ED Testers Team
 
SkateZilla's Avatar
 
Join Date: Jun 2012
Location: Virginia Beach
Posts: 18,229
Default

Quote:
Originally Posted by 51thPolux View Post
it's ok for the model but not for the texture. What do you use for the path of texture?


LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.edm")
LoadLivery("CoreMods/aircraft/FA-18C/Liveries/FA-18C_hornet/","Australian 75th Squadron")

The Instructions are in the File, But:
Code:
LoadModel("path to model lods file")
Code:
LoadLivery("Aircraft Name","Livery Folder")

So:
Code:
LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.lods")
Code:
LoadLivery("FA-18C_hornet","Australian 75th Squadron")
__________________
Windows 7 Ult. 64, HAF922, FX8350 @ 5.31GHz H100 Cooled, 16GB DDR3-2133 GSkill,
2x R7970 Lightnings Crossfired @ 1.1/6.0GHz, Creative XFi Plat. Fatal1ty Champion,
3x ASUS VS248HP + Hanns·G HZ201HPB + Acer AL2002 (5760x1080+1600x900+1680x1050)
TM Warthog HOTAS, TM MFDs, CH Fighterstick, Pro Throttle, CH Pro Pedals, TrackIR4 Pro
SkateZilla is offline   Reply With Quote
Old 09-15-2018, 03:34 PM   #17
51thPolux
Junior Member
 
Join Date: Apr 2009
Location: nimes
Posts: 54
Default

ok for the LODS but the loadlivery does not work ... it will always look in the f-18c.zip
51thPolux is offline   Reply With Quote
Old 09-17-2018, 07:00 PM   #18
SkateZilla
Moderator/ED Testers Team
 
SkateZilla's Avatar
 
Join Date: Jun 2012
Location: Virginia Beach
Posts: 18,229
Default

it works, I use it daily, your syntax is prolly wrong,

Post what you have in CODE wrap.
__________________
Windows 7 Ult. 64, HAF922, FX8350 @ 5.31GHz H100 Cooled, 16GB DDR3-2133 GSkill,
2x R7970 Lightnings Crossfired @ 1.1/6.0GHz, Creative XFi Plat. Fatal1ty Champion,
3x ASUS VS248HP + Hanns·G HZ201HPB + Acer AL2002 (5760x1080+1600x900+1680x1050)
TM Warthog HOTAS, TM MFDs, CH Fighterstick, Pro Throttle, CH Pro Pedals, TrackIR4 Pro
SkateZilla is offline   Reply With Quote
Old 09-17-2018, 08:13 PM   #19
51thPolux
Junior Member
 
Join Date: Apr 2009
Location: nimes
Posts: 54
Default

Code:
--autoexecute sample for model viewer
--mount_vfs_liveries_path("CoreMods/aircraft/FA-18C/Liveries/FA-18C_hornet")
--mount_vfs_texture_path("Mods/aircrafts/Wunderluft/Textures/base_zip_package")

LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.lods")
LoadLivery("FA-18C_hornet","Australian 75th Squadron")
SetArgument(0,0)
SetArgument(3,0)
SetArgument(5,0)

local lfs = require("lfs")
local function service_file(file)
    return file == "." or
           file == ".." or 
           file == ".svn" or 
           file == "_svn" 
end

function scan_for_textures(path)
    local lower_case      = path:lower()
    if lower_case:find("liveries") then
       mount_vfs_liveries_path(path)
       return
    end
    local is_texture_path  = lower_case:find("texture") ~= nil
    local mounted_already  = false 
    for file in lfs.dir(path) do
        if not service_file(file) then
           local fn       = path.."/"..file
           local attr       = lfs.attributes (fn)     
           if attr.mode     == "directory" then
              scan_for_textures(fn)
           elseif is_texture_path then
              local ext = string.sub(file,-4)
              if '.zip' == ext then
                    mount_vfs_texture_path(fn)
              elseif not mounted_already and (
                 '.dds' == ext or
                 '.bmp' == ext or
                 '.jpg' == ext or
                 '.png' == ext or
                 '.tga' == ext) then
                    mount_vfs_texture_path(path)
                    mounted_already = true
              end
           end
        end
    end
end

function scan_for_environment_cubes(path)
    local lower_case = path:lower()    
    for file in lfs.dir(path) do
        if not service_file(file) then
            local fn = path.."/"..file
            local attr = lfs.attributes(fn)
            if attr.mode == "file" then
                local ext = string.sub(file,-4) 
                if '.dds' == ext then
                    AddEnvironmentMap(file)
                end
            end
        end
    end
end

print("----------------------------------------------------------------")
print("scan for textures and liveries")
scan_for_textures("CoreMods")
print("----------------------------------------------------------------")
scan_for_textures("Mods")
scan_for_environment_cubes("Bazar/EffectViewer/envcubes")
print("scan done")
print("----------------------------------------------------------------")

--LoadLodModel("tech.lds");

--[[
LoadModel("d:\\Projects\\trunk\\LockOnExe\\Bazar\\World\\Shapes\\farp.edm");
Move(0, -1.22, 0);
local d = 10;
local f = LoadLodModel; local file_name = "tech.lds";
--local f = LoadStaticCharacterModel; local file_name = "tech_animation.chanimgpu";
--local f = LoadCharacterModel;
if f ~= nil then
    for i = -d,d do
        for j = -d,d do
            --f("d:\\Projects\\trunk\\LockOnExe\\Data\\tech_animation.lua")
            --f("d:\\Projects\\trunk\\LockOnExe\\Data\\tech_animation.chanimgpu")
            --f("tech_animation.chanimgpu")
            f(file_name);
            Move(i, 0, j);
        end;
    end;
end;
--]]
51thPolux is offline   Reply With Quote
Old 09-17-2018, 09:04 PM   #20
SkateZilla
Moderator/ED Testers Team
 
SkateZilla's Avatar
 
Join Date: Jun 2012
Location: Virginia Beach
Posts: 18,229
Default

Quote:
Originally Posted by 51thPolux View Post
Code:
--autoexecute sample for model viewer
--mount_vfs_liveries_path("CoreMods/aircraft/FA-18C/Liveries/FA-18C_hornet")
--mount_vfs_texture_path("Mods/aircrafts/Wunderluft/Textures/base_zip_package")

LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.lods")
LoadLivery("FA-18C_hornet","Australian 75th Squadron")
SetArgument(0,0)
SetArgument(3,0)
SetArgument(5,0)

local lfs = require("lfs")
local function service_file(file)
    return file == "." or
           file == ".." or 
           file == ".svn" or 
           file == "_svn" 
end

function scan_for_textures(path)
    local lower_case      = path:lower()
    if lower_case:find("liveries") then
       mount_vfs_liveries_path(path)
       return
    end
    local is_texture_path  = lower_case:find("texture") ~= nil
    local mounted_already  = false 
    for file in lfs.dir(path) do
        if not service_file(file) then
           local fn       = path.."/"..file
           local attr       = lfs.attributes (fn)     
           if attr.mode     == "directory" then
              scan_for_textures(fn)
           elseif is_texture_path then
              local ext = string.sub(file,-4)
              if '.zip' == ext then
                    mount_vfs_texture_path(fn)
              elseif not mounted_already and (
                 '.dds' == ext or
                 '.bmp' == ext or
                 '.jpg' == ext or
                 '.png' == ext or
                 '.tga' == ext) then
                    mount_vfs_texture_path(path)
                    mounted_already = true
              end
           end
        end
    end
end

function scan_for_environment_cubes(path)
    local lower_case = path:lower()    
    for file in lfs.dir(path) do
        if not service_file(file) then
            local fn = path.."/"..file
            local attr = lfs.attributes(fn)
            if attr.mode == "file" then
                local ext = string.sub(file,-4) 
                if '.dds' == ext then
                    AddEnvironmentMap(file)
                end
            end
        end
    end
end

print("----------------------------------------------------------------")
print("scan for textures and liveries")
scan_for_textures("CoreMods")
print("----------------------------------------------------------------")
scan_for_textures("Mods")
scan_for_environment_cubes("Bazar/EffectViewer/envcubes")
print("scan done")
print("----------------------------------------------------------------")

--LoadLodModel("tech.lds");

--[[
LoadModel("d:\\Projects\\trunk\\LockOnExe\\Bazar\\World\\Shapes\\farp.edm");
Move(0, -1.22, 0);
local d = 10;
local f = LoadLodModel; local file_name = "tech.lds";
--local f = LoadStaticCharacterModel; local file_name = "tech_animation.chanimgpu";
--local f = LoadCharacterModel;
if f ~= nil then
    for i = -d,d do
        for j = -d,d do
            --f("d:\\Projects\\trunk\\LockOnExe\\Data\\tech_animation.lua")
            --f("d:\\Projects\\trunk\\LockOnExe\\Data\\tech_animation.chanimgpu")
            --f("tech_animation.chanimgpu")
            f(file_name);
            Move(i, 0, j);
        end;
    end;
end;
--]]


Move:
Code:
LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.lods")
LoadLivery("FA-18C_hornet","Australian 75th Squadron")
SetArgument(0,0)
SetArgument(3,0)
SetArgument(5,0)
All the way to the Bottom,

You are making load commands for Items before the rest of the LUA is processed, specifically the /CoreMods/ Folders.
__________________
Windows 7 Ult. 64, HAF922, FX8350 @ 5.31GHz H100 Cooled, 16GB DDR3-2133 GSkill,
2x R7970 Lightnings Crossfired @ 1.1/6.0GHz, Creative XFi Plat. Fatal1ty Champion,
3x ASUS VS248HP + Hanns·G HZ201HPB + Acer AL2002 (5760x1080+1600x900+1680x1050)
TM Warthog HOTAS, TM MFDs, CH Fighterstick, Pro Throttle, CH Pro Pedals, TrackIR4 Pro
SkateZilla is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:59 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.