About Store Forum Documentation Contact



Post Reply 
Mesh Variations
Author Message
Esenthel Offline
Administrator

Post: #1
Mesh Variations
Esenthel is soon going to have Mesh Variations - ability to create multiple variations of an object, where each variation can have its own materials set for each mesh part.

   
01-02-2015 10:42 AM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #2
RE: Mesh Variations
Another great addition to the engine, many thanks smile
01-02-2015 11:19 AM
Find all posts by this user Quote this message in a reply
georgatos7 Offline
Member

Post: #3
RE: Mesh Variations
Awesome, thanks.
01-02-2015 02:10 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #4
RE: Mesh Variations
That's cool. Will each have it's own UID, or will it be an array within the mesh?
01-02-2015 02:38 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #5
RE: Mesh Variations
How does this differ from setting MaterialLock before drawing a mesh?
01-02-2015 04:25 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #6
RE: Mesh Variations
Each mesh part can only have a single material as far as I'm aware and you can set MaterialLock between drawing each part. Perhaps Mesh Variations is just a way to do this without code?
01-02-2015 11:47 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Mesh Variations
Esenthel 1.0 used MaterialLock which could be configured in Object Parameters, however it forced that 1 material onto entire object.

The new system allows to specify materials for each mesh part separately.

Selecting which variation to use, is done by calling:
SetVariation(Int index); // set custom variation
mesh->draw(..);
SetVariation(); // restore default variation.

There will be an option to select the variation in the World Editor object parameters.

This system works on 1 object (it does not create different objects with different UID's).
However I have an idea how to allow making secondary objects, with different UID's, and different mesh variation selected by default, but of course with re-using the same mesh.
01-03-2015 05:24 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #8
RE: Mesh Variations
(01-03-2015 05:24 AM)Esenthel Wrote:  Esenthel 1.0 used MaterialLock which could be configured in Object Parameters, however it forced that 1 material onto entire object.
I thought MaterialLock could be called between drawing individual mesh parts?

So will MaterialLock be removed and replaced by this system?
01-03-2015 09:08 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Mesh Variations
(01-03-2015 09:08 AM)fatcoder Wrote:  I thought MaterialLock could be called between drawing individual mesh parts?
Yes it could, but the Editor/game object classes didn't handle that in any way.

Quote:So will MaterialLock be removed and replaced by this system?
Yes it will.
01-04-2015 01:52 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #10
RE: Mesh Variations
(01-04-2015 01:52 AM)Esenthel Wrote:  
(01-03-2015 09:08 AM)fatcoder Wrote:  So will MaterialLock be removed and replaced by this system?
Yes it will.
Hang on, so what would happen to all my code that uses MaterialLock if I upgrade to the latest EE? Will there still be an equivalent way of doing the same thing in code without having to set up the variations first in the editor?
01-04-2015 05:32 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #11
RE: Mesh Variations
Yes, I'm guessing so too, but just want to make sure there is an equivalent way of doing what MaterialLock allowed via code (i.e. without having to set up the mesh variations in the editor first).
01-04-2015 10:23 AM
Find all posts by this user Quote this message in a reply
Fex Offline
Gold Supporter

Post: #12
RE: Mesh Variations
It would be nice if you left MaterialLock in or someway to change individual material rendering from code at runtime, it does have its uses, mesh "dyeing" for instance.
01-05-2015 01:03 PM
Find all posts by this user Quote this message in a reply
Post Reply