Jump to content

The New model Viewer is Awesome


sadjad-vosoul

Recommended Posts

Thanks to everyone for the great research and discussion on this.

 

I'm having the same problems as everyone - trying to get MV2 to point to the Saved Games folder.

 

Firstly

 

When adding the line

mount_vfs_liveries_path("../../../Users/<username>/Saved Games/DCS/Liveries")

 

should it be a . or / between DCS & Liveries?

 

 

Secondly

 

I have edModelViewer, edModelViewer.openalpha, edModelViewer2 & ModelViewer in my saved games folder.

Should I get rid of all these & use edModelViewer.openbeta? If yes where do I find it?

 

Lastly

 

If all that is not the problem what do I type after - mount_vfs_liveries_path?

 

If it helps my path to Model Viewer is - C: > Program Files > Eagle Dynamics > DCS World > Config > ModelViewer

 

I guess it has something to do with how many ../ I put before Users/<username>/Saved Games/DCS/Liveries

 

I must be getting close because depending on what I put in changes what I see in the Database Type window of the LiveriesToolPlugin in MV2.

 

For instance the above mount will bring up two times the aircraft I have in the saved games folder (1 for what he game has and 1 for what, I guess, is in my saved games folder) But, when selected, only show what is available in the game database.

 

Thanks.

Send lawyers, guns and money......... for the …. has hit the fan.

Windows 10 Home 64-bit | CPU: AMD Ryzen 7 5800X3D 8-Core Processor | RAM: Corsair 32.0GB Dual-Channel | MOBO: ROG STRIX X570-F GAMING (AM4) | GPU: MSI G271CQP on NVIDIA GeForce RTX 3080 | SSD: Samsung SSD 860 EVO 2TB & Samsung SSD 970 EVO Plus 1TB for Gaming

 CH Fightersick - Pro Throttle - Pro Pedals | Thrustmaster MFD Cougar x 3 | Buddy Fox A-10C UFC

image.jpeg

Link to comment
Share on other sites

  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

yeah, why did you remove the other lines?

 

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("----------------------------------------------------------------")

 

Thanks for the replay.

 

Why did I cut all the original of 'autoexec.lua'?, because I copied it from it's original location in '..\DCS World OpenBeta\Config\ModelViewer' to '..\Saved Games\edModelViewer2.openbeta' IIRC and thought I only need to add the 'mount_vfs_liveries_path' statement, if the original file were still being read from its original location. (dumb I guess :( )

 

I've place this autoexec.lua directly into '..\Saved Games\edModelViewer2.openbeta', and added my 'mount_vfs_liveries_path' to the beginning:

 

mount_vfs_liveries_path("../../../Users/Orso/Saved Games/DCS.Liveries") --added by ThL

local lfs = require("lfs")
local function service_file(file)
8<

 

It seems to load my path without issue, bc there is no warning, but what is really strange, is that MV2 find my Harrier skins in '..\Saved Games\DCS.Liveries'(!!), but none of DCS skins in 'c:\Program Files\Eagle Dynamics\DCS World OpenBeta\CoreMods\aircraft\AV8BNA\Liveries\AV8BNA\'(!!), BUT it only finds the DCS P-51D skins in 'c:\Program Files\Eagle Dynamics\DCS World OpenBeta\Bazar\Liveries\P-51D\'(!!), but none under '..\Saved Games\DCS.Liveries' :(

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

Thanks to everyone for the great research and discussion on this.

 

I'm having the same problems as everyone - trying to get MV2 to point to the Saved Games folder.

 

Firstly

 

When adding the line

mount_vfs_liveries_path("../../../Users/<username>/Saved Games/DCS/Liveries")

 

should it be a . or / between DCS & Liveries?

 

It depends on where your 'Liveries' folder is. If it is directly under '..\DCS', then your mount is correct.

 

My liveries folder is named 'DCS.Liveries', because I share it between the release version of DCS and the OpenBeta version by having a symbolic link named Liveries in each of '../Saved Games/DCS' and '../Saved Games/DCS.OpenBeta' pointing to '../Saved Games/DCS.Liveries'.

 

Secondly

 

I have edModelViewer, edModelViewer.openalpha, edModelViewer2 & ModelViewer in my saved games folder.

Should I get rid of all these & use edModelViewer.openbeta? If yes where do I find it?

 

edModelViewer: is for the old release version of DCS and of no use anymore, because that MV doesn't exist anymore.

edModelViewer.openalpha: is for the old alpha version of DCS, and only interesting if you still have that installed.

edModelViewer2: is for the current release version of DCS.

ModelViewer: I have no idea.

 

 

Lastly

 

If all that is not the problem what do I type after - mount_vfs_liveries_path?

 

If it helps my path to Model Viewer is - C: > Program Files > Eagle Dynamics > DCS World > Config > ModelViewer

 

I guess it has something to do with how many ../ I put before Users/<username>/Saved Games/DCS/Liveries

 

I must be getting close because depending on what I put in changes what I see in the Database Type window of the LiveriesToolPlugin in MV2.

 

For instance the above mount will bring up two times the aircraft I have in the saved games folder (1 for what he game has and 1 for what, I guess, is in my saved games folder) But, when selected, only show what is available in the game database.

 

Thanks.

 

Where is you personal Liveries folder and what is it named?

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I think we need a step-by-step/Idiot's Guide to setting up an autoexec for MV2.

 

Some required clarifications:

  1. Does the autoexec.lua go in Saved Games\edModelViewer2[.Openbeta] or Saved Games\edModelViewer2[.Openbeta]\Config?
  2. Does MV2 read the relative paths in the autoexec as if it is from the DCS World install folder (e.g. Program Files\Eagle Dynamics\DCS World) or as from the Saved Games folder (e.g. Saved Games\edModelViewer2)?
  3. Does the autoexec in Saved Games\DCS supersede the autoexec in DCS World\Config\ModelViewer, or are the entries in Saved Games\DCS appended to the default autoexec?
  4. If the autoexec in Saved Games\DCS supersedes the default autoexec and our DCS World install is on a different drive from Saved Games, do we need to insert absolute paths into the autoexec for the DCS World paths?

Thanks in advance for this. I'm looking forward to getting MV2 useful in skin development.

Link to comment
Share on other sites

G’day Orso,

 

Thanks for the reply :thumbup:

 

The path to my saved games liveries folder is C:/Users/<username>/Saved Games/DCS/Liveries

 

I’ll give it another look when I get in tonight.

 

So, can I confirm, you guys are getting MV2 to successfully look at your saved games liveries folder?

 

Until now I’ve been copying the files to the game folder and moving them back to saved games after editing. It works, but is more ‘labour intensive’. :(

 

Cheers.

Send lawyers, guns and money......... for the …. has hit the fan.

Windows 10 Home 64-bit | CPU: AMD Ryzen 7 5800X3D 8-Core Processor | RAM: Corsair 32.0GB Dual-Channel | MOBO: ROG STRIX X570-F GAMING (AM4) | GPU: MSI G271CQP on NVIDIA GeForce RTX 3080 | SSD: Samsung SSD 860 EVO 2TB & Samsung SSD 970 EVO Plus 1TB for Gaming

 CH Fightersick - Pro Throttle - Pro Pedals | Thrustmaster MFD Cougar x 3 | Buddy Fox A-10C UFC

image.jpeg

Link to comment
Share on other sites

The other question I have is. I just realised.

 

Does the autoexec.lua go in the saved games folder as well?

 

Previously with MV1, I was modifying the autoexec file in the actual game folder.

It needed doing every update but at least with MV1 it worked.

 

I can’t understand how MV2 could be so different and not work like that.

Send lawyers, guns and money......... for the …. has hit the fan.

Windows 10 Home 64-bit | CPU: AMD Ryzen 7 5800X3D 8-Core Processor | RAM: Corsair 32.0GB Dual-Channel | MOBO: ROG STRIX X570-F GAMING (AM4) | GPU: MSI G271CQP on NVIDIA GeForce RTX 3080 | SSD: Samsung SSD 860 EVO 2TB & Samsung SSD 970 EVO Plus 1TB for Gaming

 CH Fightersick - Pro Throttle - Pro Pedals | Thrustmaster MFD Cougar x 3 | Buddy Fox A-10C UFC

image.jpeg

Link to comment
Share on other sites

I think we need a step-by-step/Idiot's Guide to setting up an autoexec for MV2.

 

Some required clarifications:

  1. Does the autoexec.lua go in Saved Games\edModelViewer2[.Openbeta] or Saved Games\edModelViewer2[.Openbeta]\Config?
  2. Does MV2 read the relative paths in the autoexec as if it is from the DCS World install folder (e.g. Program Files\Eagle Dynamics\DCS World) or as from the Saved Games folder (e.g. Saved Games\edModelViewer2)?
  3. Does the autoexec in Saved Games\DCS supersede the autoexec in DCS World\Config\ModelViewer, or are the entries in Saved Games\DCS appended to the default autoexec?
  4. If the autoexec in Saved Games\DCS supersedes the default autoexec and our DCS World install is on a different drive from Saved Games, do we need to insert absolute paths into the autoexec for the DCS World paths?

Thanks in advance for this. I'm looking forward to getting MV2 useful in skin development.

 

Does the autoexec.lua go in Saved Games\edModelViewer2[.Openbeta] or Saved

Games\edModelViewer2[.Openbeta]\Config?

 

It goes in the former: ..\Saved Games\edModelViewer2[.Openbeta].

 

 

Does MV2 read the relative paths in the autoexec as if it is from the DCS World install folder (e.g. Program Files\Eagle Dynamics\DCS World) or as from the Saved Games folder (e.g. Saved Games\edModelViewer2)?

 

The paths are all relative to the binary (the program file) location in C:\Program Files\Eagle Dynamics\DCS World[ OpenBeta]\bin\ModelViewer2.exe

 

Does the autoexec in Saved Games\DCS supersede the autoexec in DCS World\Config\ModelViewer, or are the entries in Saved Games\DCS appended to the default autoexec?

 

Yes, I believe so. At least I haven't see anything contradicting this, but I haven't directly tried to contradict it either.

 

If the autoexec in Saved Games\DCS supersedes the default autoexec and our DCS World install is on a different drive from Saved Games, do we need to insert absolute paths into the autoexec for the DCS World paths?

 

The issue with the paths is that the binary only understands a single hierarchical tree structure. Given the the '\Users' structure is nearly always on the system disk along with '\Program Files' structure there is generally no issue.

 

On an installation, in which DCS is directly installed onto a separate disk drive, the 'ModelViewer2.exe' binary has no way to navigate to a separate disk drive, as it is coded to only work with a relative path, and drive letters (X: ) are only valid as part of an absolute path. It might possible work with Windows built in variables like '%USERS', but I haven't tried that.

 

The best solution I know of to this is to use directory symbolic links to install DCS versions onto different disk drives. So to maintain the relative path relationships between '..\Eagle Dynamics' and '..\Users', before installation you create a symbolic link named 'DCS World' in 'C:\Program Files\Eagle Dynamics\' (if the '..\Eagle Dynamics' directory does not exist, create that first locally) :

 

cd "C:\Program Files\Eagle Dynamics"

mklink /D "DCS World" "X:\actual_path"

 

where 'X:\actual_path' is the actual location, where you wish the DCS installation to reside.

 

This will allow 'ModelViewer2.exe' to use relative paths.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I'm still having trouble getting this to work, despite having created symbolic links.

 

Here's my setup:

 

My DCS World installs are on the G drive (G:\DCS World OpenBeta for this example)

 

I set up a folder on G called MV2_Path, where I put DCS.Openbeta. In DCS.Openbeta I created symlinks to the liveries and textures folders in my original Saved Games\DCS.Openbeta folder. They map to:

 

G:\MV2_Path\Textures (I use a shared texture folder across all DCS installs)

G:\MV2_Path\DCS.Openbeta\Liveries

 

Here's what I added to the autoexec in Saved Games\edModelViewer2.openbeta\autoexec.lua:

 

scan_for_textures("../../MV2_Path/DCS/Textures/")
mount_vfs_liveries_path("../../MV2_Path/DCS.openbeta/Liveries/")

 

I can now see two folder names for each type of aircraft (one for each livery folder), but the contents of each folder show the liveries in the original DCS World install. For example, I see two AV8BNA folders in the livery viewer dialog, but both AV8BNA folders have only the skins that come with DCS (not my custom skins). I have also removed the trailing slash in the paths and get the same results.

 

Any advice is greatly appreciated.

Link to comment
Share on other sites

Firstly, I've confirmed that if '..\Saved Games\edModelViewer2.openbeta\autoexec.lua' is found, '..\Eagle Dynamics\DCS World{ OpenBeta}\Config\ModelViewer\autoexec.lua' will be ignored.

 

--

 

I don't see two livery folder for each aircraft, but for aircraft for which I have downloaded liveries. Also, it doesn't show the livery name as in the 'name =' entry in the 'default.lua', but the actual folder name, which is also wrong, but the way it is working at the moment.

 

BTW I see 3x P-51D folders, but all point only to the ones in ..\Bazar\Liveries', but of the AV8BNA it show my downloaded liveries :doh:

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

Firstly, I've confirmed that if '..\Saved Games\edModelViewer2.openbeta\autoexec.lua' is found, '..\Eagle Dynamics\DCS World{ OpenBeta}\Config\ModelViewer\autoexec.lua' will be ignored.

Thank you for this observation.

I don't see two livery folder for each aircraft, but for aircraft for which I have downloaded liveries.

Concur. This is what I meant, but you were more articulate in your description.

 

I really want to see this squared away. At this point, I can't even put my own skins in the DCS World liveries folders without seeing everything show up as the green digicamo of the missing texture. :cry:

Link to comment
Share on other sites

As far as I can tell, if you add you personal liveries folder, the modelview loses track of default textures somehow.

 

If you were to put your liveries in '..\Bazar\Liveries', or where ever they might belong --depends on the aircraft--, and not use a custom autoexec.lua MV2 works okay, although I've seen that for the Harrier liveries it it still displays the folder name, and not the default.lua name parameter, for whatever reason.

 

At the moment, I'm giving up on MV2. It's simply broken, and I'm not interested in spending all my time trying to reverse engineer broken S/W to find a work-around. If ED wants it to work, they'll fix it. If not...

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I was actually trying it with the Harrier when I put a skin in coremods, so I’ll try another model. Problem is with the new pilot model/texture for the Harrier pilot I need the Harrier to work. :mad:


Edited by Home Fries
Link to comment
Share on other sites

it doesn't show the livery name as in the 'name =' entry in the 'default.lua', but the actual folder name, which is also wrong, but the way it is working at the moment.

 

name = "xxxx" is what's displayed in the mission editor.

 

Model Viewer always showed the Folder Names

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

As far as I can tell, if you add you personal liveries folder, the modelview loses track of default textures somehow.

 

If you were to put your liveries in '..\Bazar\Liveries', or where ever they might belong --depends on the aircraft--, and not use a custom autoexec.lua MV2 works okay, although I've seen that for the Harrier liveries it it still displays the folder name, and not the default.lua name parameter, for whatever reason.

 

At the moment, I'm giving up on MV2. It's simply broken, and I'm not interested in spending all my time trying to reverse engineer broken S/W to find a work-around. If ED wants it to work, they'll fix it. If not...

 

it's likely a syntax issue,

 

ie if you point MV1 or MV2 to a liveries folder, it will show the aircraft folder, but if it cant read the liveries lua's then it wont display them.

 

will look into it.

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

name = "xxxx" is what's displayed in the mission editor.

 

Model Viewer always showed the Folder Names

 

Ahhh, I never noticed that. Since I coordinate the folder names of skins I've downloaded closely with the name parameters I was masking the difference. Thanks.

 

it's likely a syntax issue,

 

ie if you point MV1 or MV2 to a liveries folder, it will show the aircraft folder, but if it cant read the liveries lua's then it wont display them.

 

will look into it.

 

I can only attest to the fact that the two programs don't work the same from the user's perspective. Happens often when SW is rewritten.

 

It would be really user friendly if ED would at least publish some information on how users are to go about implementing their SW, *sigh*.

 

Anything you can dig up on this would be greatly appreciated.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I'm trying to figure this out so i can view cockpit skins, is there a readme file that explains how to setup the files? Considering some of us are beginners.

Win 10 64//4.5g i7 Kaby Lake//gtx Titan x pascal//16gb 3200ram//Asus Maximux Hero IX//Oculus Rift//

Link to comment
Share on other sites

AFAIK there never has been any kind of documentation for the model viewer. But if you put the skins you are moding into the same folder as the originals, MV2 should find them.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

Is it possible to set up an external folder for cockpit textures rather than having to backup & copy files over? If created a folder C:\Users\nrosk\DCS.liveries\ & add cockpit textures in here would it override the cockpit textures in the main folder?

Win 10 64//4.5g i7 Kaby Lake//gtx Titan x pascal//16gb 3200ram//Asus Maximux Hero IX//Oculus Rift//

Link to comment
Share on other sites

Ahhh, I never noticed that. Since I coordinate the folder names of skins I've downloaded closely with the name parameters I was masking the difference. Thanks.

 

 

 

I can only attest to the fact that the two programs don't work the same from the user's perspective. Happens often when SW is rewritten.

 

It would be really user friendly if ED would at least publish some information on how users are to go about implementing their SW, *sigh*.

 

Anything you can dig up on this would be greatly appreciated.

 

 

There's an issue, I reported it.

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

  • 3 weeks later...
  • 3 weeks later...
  • Recently Browsing   0 members

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