georgatos7
Member
|
RE: Mesh Variations
Awesome, thanks.
|
|
01-02-2015 02:10 PM |
|
Rubeus
Member
|
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 |
|
fatcoder
Member
|
RE: Mesh Variations
How does this differ from setting MaterialLock before drawing a mesh?
|
|
01-02-2015 04:25 PM |
|
fatcoder
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|
fatcoder
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|
fatcoder
Member
|
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 |
|
fatcoder
Member
|
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 |
|
Fex
Gold Supporter
|
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 |
|