Jump to content

New Texture Viewer in Model Viewer


Strut

Recommended Posts

Love this ability , to view, zoom in and out, flick through the RGB layers etc, and call up textures while in model viewer, great addition, thanks DCS !

Regards

 

DL available skins here:

https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=Strut

 

 

Pictures of my Skins here: https://imgur.com/a/bOQyQqW

 

[sIGPIC][/sIGPIC]

Win10 64bit, Intel® Core i7-5820K CPU OC @ 4.50GHz x6, X99A GAMING PRO CARBON, MSI RTX 2080 TI GAMING X TRIO 11Gb, 32GB DDR4 RAM, SSD 960 EVO250GB, SSD 850 EVO 500GB, JetSeat, MFG Crosswind Pedals, VPC Mongoose T-50, TMWH, DSD ButtonBox, Pimax 5k XR/BE

 

 

Link to comment
Share on other sites

41XFHn0.jpg

Regards

 

DL available skins here:

https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=Strut

 

 

Pictures of my Skins here: https://imgur.com/a/bOQyQqW

 

[sIGPIC][/sIGPIC]

Win10 64bit, Intel® Core i7-5820K CPU OC @ 4.50GHz x6, X99A GAMING PRO CARBON, MSI RTX 2080 TI GAMING X TRIO 11Gb, 32GB DDR4 RAM, SSD 960 EVO250GB, SSD 850 EVO 500GB, JetSeat, MFG Crosswind Pedals, VPC Mongoose T-50, TMWH, DSD ButtonBox, Pimax 5k XR/BE

 

 

Link to comment
Share on other sites

Oh that... yeah been in for quite a few versions.

 

Still awesome.

 

 

Ok, I obviously wasnt paying attention :doh:, Only after the last update it was on my screen as if I selected it, thats how I found it. Oh well, but it is pretty good anyway.:thumbup:

Sorry to all for the "false start" .

Regards

 

DL available skins here:

https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=Strut

 

 

Pictures of my Skins here: https://imgur.com/a/bOQyQqW

 

[sIGPIC][/sIGPIC]

Win10 64bit, Intel® Core i7-5820K CPU OC @ 4.50GHz x6, X99A GAMING PRO CARBON, MSI RTX 2080 TI GAMING X TRIO 11Gb, 32GB DDR4 RAM, SSD 960 EVO250GB, SSD 850 EVO 500GB, JetSeat, MFG Crosswind Pedals, VPC Mongoose T-50, TMWH, DSD ButtonBox, Pimax 5k XR/BE

 

 

Link to comment
Share on other sites

  • 2 months later...

@ 51thPolux,

 

You need to place your "Skin" folder with the games Liveries folders here :

 

\Eagle Dynamics\DCS World\CoreMods\aircraft\FA-18C\Liveries\FA-18C_hornet

 

 

Then go into the "View" menu in model viewer, select "Dialogs" , then select "Liveries " Dialog, then if you have placed your "Livery" correctly you will see your livery listed, then select it to see it mounted on the model.


Edited by Strut

Regards

 

DL available skins here:

https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=Strut

 

 

Pictures of my Skins here: https://imgur.com/a/bOQyQqW

 

[sIGPIC][/sIGPIC]

Win10 64bit, Intel® Core i7-5820K CPU OC @ 4.50GHz x6, X99A GAMING PRO CARBON, MSI RTX 2080 TI GAMING X TRIO 11Gb, 32GB DDR4 RAM, SSD 960 EVO250GB, SSD 850 EVO 500GB, JetSeat, MFG Crosswind Pedals, VPC Mongoose T-50, TMWH, DSD ButtonBox, Pimax 5k XR/BE

 

 

Link to comment
Share on other sites

Hello, thank you for your answer. It does not work at home. I just have some skins in the livery. and not all the available skin in your path

 

\ Eagle Dynamics \ DCS World \ CoreMods \ aircraft \ FA-18C \ Liveries \ FA-18C_hornet

 

 

dialliveries.jpg

 

if I choose the 3d model of F-18c.edm and I click "load livery" nothing happens ...

Your modelviewer is in DCS World OpenBeta \ bin \ ModelViewer.exe?

Link to comment
Share on other sites

Script the autoexe.lua to load your model and your livery, close it and re-open.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

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:

LoadModel("path to model lods file")

LoadLivery("Aircraft Name","Livery Folder")

 

 

So:

LoadModel("CoreMods/aircraft/FA-18C/Shapes/fa-18c.lods")

LoadLivery("FA-18C_hornet","Australian 75th Squadron")

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

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

 

Post what you have in CODE wrap.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

--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;
--]]
   

Link to comment
Share on other sites

--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:

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 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

  • 2 months later...

Ugh, if I just cut-n-paste what you have it doesn't work. I can change the model in LoadModel and get different models, but the LoadLivery has no effect

 

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

--LoadModel("Bazar/World/Shapes/A-10.edm")
--LoadLivery("A-10C","184th FS Arkansas ANG, Fort Smith (FS)")
--SetArgument(0,1)
--SetArgument(3,1)
--SetArgument(5,0.75)

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;
--]]

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)

 

Here's the model viewer log

 

12:50:24 INFO: DCS log enabled!
12:50:24 WARNING: libpng warning: iCCP: known incorrect sRGB profile
3.3455	TRACE  	lua_loadfile	ModelViewer2::createLua: Config\ModelViewer\DefaultAnimation.lua
3.4719	ERROR  	EDCORE	Can't mount c:/program files/eagle dynamics/dcs world openbeta/coremods/aircraft/fa-18c/shapes/textures. Drivers errors: 
3.4719	ERROR  	EDCORE		FSDriver: there is no directory c:/program files/eagle dynamics/dcs world openbeta/coremods/aircraft/fa-18c/shapes/textures
3.4719	ERROR  	EDCORE		ZipDriver: Can't open zip archive c:/program files/eagle dynamics/dcs world openbeta/coremods/aircraft/fa-18c/shapes/textures.zip.
3.4900	ERROR  	EDCORE	Can't open file 'c:/program files/eagle dynamics/dcs world openbeta/coremods/aircraft/fa-18c/shapes/fa-18c.lods.ilv' from fs.
3.4900	ERROR  	EDCORE	Can't open file 'c:/program files/eagle dynamics/dcs world openbeta/coremods/aircraft/fa-18c/shapes/fa-18c.lods.ilv' from fs.
3.4900	WARNING	VIEWERCOMMON	file c:/program files/eagle dynamics/dcs world openbeta/coremods/aircraft/fa-18c/shapes/fa-18c.lods.ilv not found
3.4901	TRACE  	EFFECTS	creating ODCSParticleSystem effect
3.4901	ERROR_ONCE	DX11BACKEND	render target 'cockpitDepth' not found
3.4921	TRACE  	lua_loadfile	ModelViewer2::createLua: C:\Users\kolyma\Saved Games\edModelViewer2.openbeta\autoexec.lua
3.4921	TRACE  	lua_loadfile	ModelViewer2::createLua: Config/ModelViewer/autoexec.lua
3.4923	DEBUG  	ModelViewer2::createLua	----------------------------------------------------------------
3.4923	DEBUG  	ModelViewer2::createLua	scan for textures and liveries
3.7548	DEBUG  	ModelViewer2::createLua	----------------------------------------------------------------
4.5440	ERROR  	EDCORE	Can't mount mods/terrains/caucasus/vfstextures/trees.zip. Drivers errors: 
4.5440	ERROR  	EDCORE		FSDriver: there is no directory mods/terrains/caucasus/vfstextures/trees.zip
4.5440	ERROR  	EDCORE		ZipDriver: Can't open zip archive mods/terrains/caucasus/vfstextures/trees.zip.
4.7447	DEBUG  	ModelViewer2::createLua	scan done
4.7447	DEBUG  	ModelViewer2::createLua	----------------------------------------------------------------
4.7450	ERROR  	EDCORE	Can't mount coremods/aircraft/fa-18c/shapes/textures. Drivers errors: 
4.7450	ERROR  	EDCORE		FSDriver: there is no directory coremods/aircraft/fa-18c/shapes/textures
4.7450	ERROR  	EDCORE		ZipDriver: Can't open zip archive coremods/aircraft/fa-18c/shapes/textures.zip.
4.7451	ERROR  	EDCORE	Can't open file 'coremods/aircraft/fa-18c/shapes/fa-18c.lods.ilv' from fs.
4.7451	ERROR  	EDCORE	Can't open file 'coremods/aircraft/fa-18c/shapes/fa-18c.lods.ilv' from fs.
4.7451	WARNING	VIEWERCOMMON	file coremods/aircraft/fa-18c/shapes/fa-18c.lods.ilv not found
4.7451	TRACE  	EFFECTS	creating ODCSParticleSystem effect
4.7533	INFO   	DX11BACKEND	resize to resolution 1201x629
6.1331	INFO   	DX11BACKEND	resize to resolution 1841x666
7.0053	ERROR_ONCE	DX11BACKEND	texture 'MISSING_TEXTURE_COMPARATOR_THIS_IS_NOT_ERROR' not found. Asked from 'VIEWERCOMMON'
7.0072	ERROR_ONCE	DX11BACKEND	texture 'MISSING_TEXTURE_normal_COMPARATOR_THIS_IS_NOT_ERROR' not found. Asked from 'VIEWERCOMMON'

 

Help!!!???

Link to comment
Share on other sites

  • 5 months later...

Did you fix it Kolyma ?

 

I've got the same problem now, model loads automatically but livery does not.

Used to work fine a few months ago. I've put the same entries back in autoexec.cfg

 

I think i was using the original modelviewer program previously, not modelviewer2.

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...