XPS -- How to make items optional

Post any XPS Tutorials here!

Moderators: Dazzy, Runa

Post Reply
User avatar
Anx
Posts: 146
Joined: Wed Aug 22, 2012 2:52 am
Location: Gravlex Med

XPS -- How to make items optional

Post by Anx »

The request "XPS How to add an item to an Optional Item list" for this tutorial was here viewtopic.php?f=12&t=1676&p=82248#p82248

XPS -- How to make items optional

1) Load you model in XPS (File->Add or Drag&Drop or Modify-Load)

2) Launch the "Modify->Material Editor" (Ctrl+T)

3) Select the mesh part to edit

4) The dialog "Material Form" has a panel "Render parameter". In the field "Optional Item menu", enter your menu name for the "Optional Item"

4a) Make that, when loading the model, the item "happy" is shown (by default).
In this examaple, I have choose the facial expression "happy", so I type "happy" as menu name :)
Image
I want that this is the default item, so the sign (left of the menu name) is '+' (show optional item by default 'yes')
Image

4b) Do not show the item "sad" when loading the model
The next facial expression "sad" should be optional but not shown by default.
Image
The menu name is "sad"
The sign is '-' (show optional item by default 'no')

4c) Do not show the item "neutral" when loading the model
The next facial expression "neutral" should be also a optional item, but also not shown by default.
Image
The menu name is "neutral"
The sign is '-' (show optional item by default 'no')

That's all.
Save it (Modify>Flags->OK or Modify->Save)

The result is:
Image
happy

Image
sad

Image
neutral

How to group Optional Items ?
If we have many "optional items", we can organize it in groups like:
Image
All "Facial action units" (FAU) as sub-menu

That is easy to do. Just enter as "optional item menu name"
a) the "group name"
b) the pipe symbol '|' as separator
c) the "menu name"
Image
So
'+' "FAU|happy"
'-' "FAU|neutral"
'-' "FAU|sad"

What if element consists of several mesh names?
Such as glasses, consist of a frame (metallic) and the glass (semi-transparent).
Easy. Both the mesh glass, as well as the mesh "frame", get the same menu name "glasses":
-glasses.glass
-glasses.frame

Are there any more options?
I know another technique called "toggle button". I use this if a character has 2 hair styles (this technique only works if there are exactly two choices).
Both optional items have the same menu name but a different sign.

Code: Select all

+hairstyle.hair1
-hairstyle.hair2
Thus either the one mesh (hair1) or the other mesh (hair2) is visible. The menu name for both is "hairstyle"

That's all.
JohnHunterIII
Posts: 3
Joined: Sat Jun 13, 2020 11:57 am
Custom Rank: Searcher

Re: XPS -- How to make items optional

Post by JohnHunterIII »

That helps so much. Was trying to get rid of some stuff and it simply did not work. Thank you.
Post Reply