Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

Ben | DirectX work on Meshplorer

Development board for ME3Explorer tools. Please try to keep discussions for each tool inside its own thread.

Re: Ben | DirectX work on Meshplorer

Postby giftfish » 21 Nov 2016, 17:11

benji wrote:Barring any bugs that I you guys might find (that didn't exist before my changes), I'm off to update the Level Editor in the same fashion, which I suspect might not be as straightforward.

I'd wait on that a bit. We'll be ditching some tools in the near future and rolling various functionalities into others. We still need to discuss what's happening with Level Editor, ME3Creator, etc.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Ben | DirectX work on Meshplorer

Postby benji » 21 Nov 2016, 20:32

benji wrote:Next up should be changing skeletalmesh section materials.
Because skeletalmesh sections reference materials in the mesh's material list, the UI will need to change, and I see a few options:
- Hide the mesh materials list from modders (or rather don't make it directly changeable), update it automagically as section materials are picked from the existing materials list.
- Keep the mesh materials list changeable, and add new UI so that modders pick from the current mesh materials when changing a section material, such as a context menu perhaps?
- Something else?

I am personally leaning for the first option, but it's up to you guys to pick. I'll be waiting for a decision before I prematurely write code :D .


Any input regarding this? (sorry I double posted back then)
benji
User
 
Posts: 18
Joined: 07 Nov 2016, 05:24
Has thanked: 1 time
Have thanks: 6 time

Re: Ben | DirectX work on Meshplorer

Postby benji » 26 Nov 2016, 09:40

benji wrote:Next up should be changing skeletalmesh section materials.
Because skeletalmesh sections reference materials in the mesh's material list, I see a few options:
- Hide the mesh materials list from modders (or rather don't make it directly changeable), update it automagically as section materials are changed.
- Keep the mesh materials list changeable, and add new UI so that modders pick from the current mesh materials when changing a section material, such as a context menu perhaps?
- Something else?

I am personally leaning for the first option, but it's up to you guys to pick. I'll be waiting for a decision before I prematurely write code :D .


Well, nobody picked an option in a week, so I wrote the code for the second option. :D

Now, skeletalmesh material modification should be complete minus adding or subtracting material references altogether.
Changing entries in the material list worked prior to this rebuild, and it is working again.
Changing which entry a section points to has just now been finished.
evidence:
Image

The big controversial decision I made here is to hide the material lists and apply buttons (there are now 2 of each for the two different material modifications - mesh vs section) in the toolbar until the user selects an appropriate treeview node.
I understand that this isn't how it's always been done, but I think it makes more sense than showing both sets of listboxes and apply buttons, so when a user picks a random node and clicks apply, it does nothing and they have no idea whether anything happened behind the scenes or why nothing happened. I understand that experienced modders already understand how to use the program, but adding a second set of listbox and button makes the existing toolbar setup feel very cramped and oddly nonfunctional, especially considering that at max only one pair of dropdown and apply button will only ever be functional at any one time depending on the selected node. If you're going to argue against this decision that's great, but please don't solely rely on the age-old classic "that's not how it's always been, end of story".

However, I feel like because this functionality (and more that I plan to add) is only specific to certain node types, it makes more sense to represent the commands relevant for a treenode in an individual right click (context) menu for that treenode.

Finally, I think that I should call this DirectX rewrite project complete and work on getting it merged into beta. I can't wait to add more functionality like adding / removing skeletalmesh material references, but those are more individual features and not really in the scope of my rewrite project.

Thoughts?
benji
User
 
Posts: 18
Joined: 07 Nov 2016, 05:24
Has thanked: 1 time
Have thanks: 6 time

Re: Ben | DirectX work on Meshplorer

Postby giftfish » 26 Nov 2016, 15:29

benji wrote:The big controversial decision I made here is to hide the material lists and apply buttons (there are now 2 of each for the two different material modifications - mesh vs section) in the toolbar until the user selects an appropriate treeview node.
I understand that this isn't how it's always been done, but I think it makes more sense than showing both sets of listboxes and apply buttons, so when a user picks a random node and clicks apply, it does nothing and they have no idea whether anything happened behind the scenes or why nothing happened. I understand that experienced modders already understand how to use the program, but adding a second set of listbox and button makes the existing toolbar setup feel very cramped and oddly nonfunctional, especially considering that at max only one pair of dropdown and apply button will only ever be functional at any one time depending on the selected node. If you're going to argue against this decision that's great, but please don't solely rely on the age-old classic "that's not how it's always been, end of story".

However, I feel like because this functionality (and more that I plan to add) is only specific to certain node types, it makes more sense to represent the commands relevant for a treenode in an individual right click (context) menu for that treenode.

I'm having a hard time picturing what you're describing here, and it doesn't seem to be evident in your screenshot. Can you please post another shot where these buttons, etc, are visible?
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Ben | DirectX work on Meshplorer

Postby benji » 26 Nov 2016, 22:39

Absolutely, the picture that requested functionality (changing skeletal section materials) is working.

Here's a short gif to demonstrate hiding and showing toolbar buttons.
Image
(sorry it's so small)
benji
User
 
Posts: 18
Joined: 07 Nov 2016, 05:24
Has thanked: 1 time
Have thanks: 6 time

Re: Ben | DirectX work on Meshplorer

Postby Kinkojiro » 27 Nov 2016, 03:16

This looks good.

So to summarise - the mesh is shown via directx, you can see the textures underlying the material, plus you can switch the material (but the dropdown and buttons are hidden unless the changeable material is selected).

I know directx can be a bit funny, and I tend to work with several windows (including the game) open at once. Does it work with multiple meshplorer instances and/or ME3 up as well?
User avatar
Kinkojiro
Modder
 
Posts: 578
Joined: 02 Dec 2013, 04:14
Has thanked: 233 time
Have thanks: 249 time

Re: Ben | DirectX work on Meshplorer

Postby giftfish » 27 Nov 2016, 17:51

@Ben -- Ahh, those buttons. Got it. Very helpful.

Yeah, that's fine. It's a logical change and I don't see a problem with it -- just keep in mind it's a GUI thing, so it's going to change again with the WPF re-write when we implement the new design template.

@Kinko -- Multiple Meshplorer instances? I'm surprised you can get that to happen without a whole lot of aggravating crashes, lol.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Ben | DirectX work on Meshplorer

Postby benji » 28 Nov 2016, 04:18

@Kinko That's a very good point that I completely overlooked. In the past, DirectX applications could lose access to the video card under a few circumstances: locking the computer (Win + L), graphics driver update, screen resolution change, *another program goes into full-screen exclusive mode* (e.g. ME3), etc.
I didn't code in anything related to gracefully handling this situation because I thought I would get to it later. However, as I try to trigger this 'device lost' scenario, I can't get it to happen.
I've run ME3 fullscreen, switched to another user, changed monitor resolution, etc and nothing happened. The only thing I didn't do was make a change to the graphics drivers because I don't want to touch them now that they work.
It seems really odd that I can't trigger this issue because it has such a history of being a pain for gamers everywhere, but I'd be 'coding in the dark' if I tried to fix the issue without being able to first reproduce it.
Maybe I just have abnormally responsible drivers by NVidia, or maybe it's a change in how windowed DirectX applications work.

Either way, I tested Meshplorer running with ME3 (fullscreen and borderless) and with another Meshplorer instance, and couldn't get them to crash or do anything interesting.
Image
So unless you can crash it, I think it's solid enough for now.

@ devs
How should I move towards merging my code changes? Should I work on submitting a test build to my GitHub fork's 'releases'?
benji
User
 
Posts: 18
Joined: 07 Nov 2016, 05:24
Has thanked: 1 time
Have thanks: 6 time

Re: Ben | DirectX work on Meshplorer

Postby giftfish » 28 Nov 2016, 15:06

benji wrote:@ devs
How should I move towards merging my code changes? Should I work on submitting a test build to my GitHub fork's 'releases'?

Submitting a testbuild release for your fork would be a good next step. That way, if/when Kinko and others have time, they can give it a quick test, find any bugs, etc.

This should hopefully also give time for Sir to pop back in and catch up. Sir is the one who should merge your pull (not K), due to its content, and I don't think he's had much time to take a look, yet.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Ben | DirectX work on Meshplorer

Postby benji » 29 Nov 2016, 06:39

The build is up over at https://github.com/epicabsol/ME3Explorer/releases/tag/v3.1.0-rc.1

(direct download link)

Here's the description from the release:

This is a test build of the major 3D viewport rewrite, visible in in Meshplorer and Meshplorer2.

Viewport changes:
- Meshplorer users can toggle wireframe and solid rendering independently via new entries in the View menu. Meshplorer2 users cannot toggle wireframe or solid rendering or auto rotation.
- Users can move & rotate the camera in viewports. In third person mode, left-click-drag is orbit, middle-click-drag is pan, right-click-drag or scroll is zoom. In first person mode, left-click-drag is rotate view, the WASD keys are move and middle-click-drag is still pan.
- Meshplorer users can toggle first person mode via a new entry in the View menu. Meshplorer2 users cannot toggle first person mode.
- Meshplorer users can press the F key with the viewport focused to frame (center) the camera on the model. Sometimes this is inaccurate, perhaps because it considers vertices that are not actually in use by the model's triangles.
- The viewport now supports rendering more than one section per model. This is important because many models use different materials and textures per section.

Texture cache:
- Meshplorer scans game pccs for textures in the background at launch. This is because some material instances reference textures outside their own pcc, making a scan necessary. This will only happen one time per launch of Meshplorer. This means that many more meshes will correctly preview their textures in the viewport.
- Located textures will appear on the viewport model as they are loaded.

Material assignment:
- Static mesh sections can have their materials reassigned. In the Meshplorer mesh tree, open Materials -> Lods -> Sections, and select the section. Use the toolbar to pick a material and click the 'Set as material' button.
- Skeletal meshes have a materials list, and each section references the items in this list by index (0 through count - 1). To modify a material in the materials list, open the Materials node and select the material slot to change, and then use the toolbar to pick from materials in the open pcc. To modify which material-slot in the list a section uses, open LOD Models, open the LOD that you want to edit, open the Sections node, select a section, and use the toolbar to pick which slot in the mesh's materials list the selected section will use.


I'm excited to see what people think! :D

Ben

benji has been thanked by:
benji
User
 
Posts: 18
Joined: 07 Nov 2016, 05:24
Has thanked: 1 time
Have thanks: 6 time

PreviousNext

Return to ME3Explorer Toolset Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron
suspicion-preferred