I changed a Sphere's texture to use custom texture with TextureId serving as main.diffuse texture, all set at declarations etc. But it does not look shiney enough and as the texture is similar to Aiur and I want to make these lights on the planet brither, the planet itself more real, I decided to make a Specular and Normal map for the Sphere.
I followed this tutorial, in my case I have Diffuse, Specular and Normal maps. So like there I have Declarations - 0 Index , to the same declaration I add 3 indexes in Adaptations - 0,1,2. In 0 i typed main in Slot, Diffuse in Trigger on Substring. Sphere on Prefix which was incorrect as when I do that it gives me the Sphere.dds texture and I use ActorEvent Set Timer Duration 00000 1, Timer Expires Name=1, Texture Select by Id..
Still, I typed Sphere there and I did the same for Specular and Diffuse Textures, also I have in Textures the 3 Texture items, one saying main.diffuse. other texture in the Slot: main.specular, third texture: main.normal.
Because I used Sphere as prefix and Trigger on Substring- even with Timer Expires only Sphere.DDS appeared textures didnt change at all,
So I went to my method of doing it where CHANGING texture actually works - Leave ''Trigger on Substring' and 'Prefix' field empty for all 0 1 2 Indexes of Adaptations in Models Tab. in SLOT of the models, I dont just type 'main' but rather Index 0>> Slot: main.diffuse Index 1>> Slot: main.specular Index 2>> Slot: main.normal. etc..
Now texture changes but they repalce each other - I set the Diffuse one with Actorevents, good, then I create Event to TextureID specular - the Specular REPLACES the diffuse,. then add Normal - normal replaces the Specular, cant get all 3 textures there :/ (all this with ActorCreation Set Timer1,2,3, Expires Timer 1,2,3 etc..)
So in short, can you show me a case where you can make Sphere model use 3 textures - say Diffuse, Specular, Normal, as in my case it didnt work? Have in mind by default MATERIALS: Sphere.DDS for both specular and Diffuse it has no Nomal in the materials. Or what am i doing wrong?
For a start you will see in the previewer the model does not have a normal texture to replace. Also look at kueken531's texture test map since he uses the model there. For understanding how textures work read this thread: http://www.sc2mapster.com/forums/development/artist-tavern/24629-terrain-textures/#posts. You are limited to the diffuse and specular.
Also as the texture you want to replace lacks Diffuse in it's name it wont work. If you look in the previewer the textures full name is just Sphere. Have that in the prefix and the trigger on string and it should work with the diffuse and specular.
I deleted Normal texture, its Texture Data, its Adapation Index 2, its Actor events from the Actor leaving iust Diffuse and Specular ones.
Thats what I use. As I left 'main' in the Model's Slot for both 0 and 1 indexes there is no way to recognize if it has to use diffuse or specular.As now indexes have exactly the same fields. The result is I get the Sphere with diffuse texture only, as it would otherwise shine or darken if specular were also used.
If I type 'main.diffuse' in index 0 and 'main.specular' in index 1 like the names in the Texture's slot, with the Actor Events it covers the Sphere with just specular as it is the second/latest actor event after the one with the diffuse.
As in the tutorial above under the same Declaration, in Adaptations I add Index 0 and Index 1 and yes on both indexes I use 'main' in slot and 'Sphere' in trigger on substring. I didnt understand what being different?
If I change the left indexes like I did with changing the bottom line left indext to 1 from 0 (it was 0) a new Declaration is added and even if I type the same things for the Adaptations under Index 1 Declaration (the one created by changing the left index), same result, either getting just diffuse of I type Slot: main,
Prefix On substring: Sphere, or the specular instead of diffuse if I add main.diffuse and main.specular in the slots.
Could it be problem in the textures themselves? - No, I changed textures to Command Center Diffuse and Speculars and I get the same results. My custom dds textures use alpha channel so it's not it.
Could it be because Sphere.dds is set for Diffuse and Sphere.dds is set for Specular in the Materials in Previewer? Like it only accepts one dds file for both?
Because when I once imported a custom model not related to this case, I set its diffuse, normal, specular, textures in 3ds max and ingame the model shined based on how dark/light my specular was. And with this Sphere I see only diffuse showing or only specular if I type main.diffuse/specular in Slot in 'Model'
Texture select by id can only replace a specific texture used by the model. If the model uses the same texture multiple times, all of those textures will be swapped. Afaik, there is no way to change one of them without editing the model file.
However, it is quite easy to modify the texture pathes for a model. I used notepad with great success ;). Just keep the texture path length the same.
Also, you can easily use a non-existing texture path and swap this path to your desired texture.
From my understanding, the index does not have any influence. Also, the slot does not matter at all, as long as your use of it is unique. You can use main.specular to swap a diffuse map just as well as generic01.normal
Has it worked for you? I edited Sphere.m3 in notepad by just renaming the second dds to ballan.DDS (6 letters and exists in Assets) so it now would have Sphere.dds and Ballan.dds, I imported the model back and it cant load it, in Previewer when I double click the imported model I get INFO of Sphere.m3 .. and when i restart editor 'Unable to create this model Korhal.m3' which is the name I gave the M3 after editing the second texture's name..
Geez if I installed 3ds max would've done this in no time, at least I know custom models when their textures set with the M3 plugin do show ingame correctly. Prob is I dont want to use 3Ds max as I only used it for setting a model's Diffuse/Normal/Specular textures and exporting to M3, I never model with it... and it takes GBs and installs tons of things I dont use
Before changing the name of the 2nd DDS I called it Spheer.dds while the first texture was Sphere.DDS. Same result - every time I open the editor if my Doodad is on the map using this model, it says it cannot load the model and loads the Default sphere model for missing model apparently.
I changed a Sphere's texture to use custom texture with TextureId serving as main.diffuse texture, all set at declarations etc. But it does not look shiney enough and as the texture is similar to Aiur and I want to make these lights on the planet brither, the planet itself more real, I decided to make a Specular and Normal map for the Sphere.
http://www.sc2mapster.com/forums/resources/tutorials/20772-data-actor-events-message-texture-select-by-id/
I followed this tutorial, in my case I have Diffuse, Specular and Normal maps. So like there I have Declarations - 0 Index , to the same declaration I add 3 indexes in Adaptations - 0,1,2. In 0 i typed main in Slot, Diffuse in Trigger on Substring. Sphere on Prefix which was incorrect as when I do that it gives me the Sphere.dds texture and I use ActorEvent Set Timer Duration 00000 1, Timer Expires Name=1, Texture Select by Id..
Still, I typed Sphere there and I did the same for Specular and Diffuse Textures, also I have in Textures the 3 Texture items, one saying main.diffuse. other texture in the Slot: main.specular, third texture: main.normal.
Because I used Sphere as prefix and Trigger on Substring- even with Timer Expires only Sphere.DDS appeared textures didnt change at all,
So I went to my method of doing it where CHANGING texture actually works - Leave ''Trigger on Substring' and 'Prefix' field empty for all 0 1 2 Indexes of Adaptations in Models Tab. in SLOT of the models, I dont just type 'main' but rather Index 0>> Slot: main.diffuse Index 1>> Slot: main.specular Index 2>> Slot: main.normal. etc..
Now texture changes but they repalce each other - I set the Diffuse one with Actorevents, good, then I create Event to TextureID specular - the Specular REPLACES the diffuse,. then add Normal - normal replaces the Specular, cant get all 3 textures there :/ (all this with ActorCreation Set Timer1,2,3, Expires Timer 1,2,3 etc..)
So in short, can you show me a case where you can make Sphere model use 3 textures - say Diffuse, Specular, Normal, as in my case it didnt work? Have in mind by default MATERIALS: Sphere.DDS for both specular and Diffuse it has no Nomal in the materials. Or what am i doing wrong?
For a start you will see in the previewer the model does not have a normal texture to replace. Also look at kueken531's texture test map since he uses the model there. For understanding how textures work read this thread: http://www.sc2mapster.com/forums/development/artist-tavern/24629-terrain-textures/#posts. You are limited to the diffuse and specular.
Also as the texture you want to replace lacks Diffuse in it's name it wont work. If you look in the previewer the textures full name is just Sphere. Have that in the prefix and the trigger on string and it should work with the diffuse and specular.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I deleted Normal texture, its Texture Data, its Adapation Index 2, its Actor events from the Actor leaving iust Diffuse and Specular ones.
Thats what I use. As I left 'main' in the Model's Slot for both 0 and 1 indexes there is no way to recognize if it has to use diffuse or specular.As now indexes have exactly the same fields. The result is I get the Sphere with diffuse texture only, as it would otherwise shine or darken if specular were also used.
If I type 'main.diffuse' in index 0 and 'main.specular' in index 1 like the names in the Texture's slot, with the Actor Events it covers the Sphere with just specular as it is the second/latest actor event after the one with the diffuse.
Try haveing the left index numbers being different and you using Sphere in both and giving them a different slot?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
As in the tutorial above under the same Declaration, in Adaptations I add Index 0 and Index 1 and yes on both indexes I use 'main' in slot and 'Sphere' in trigger on substring. I didnt understand what being different?
You will find there are two different index numbers. Try using a different slot for the diffuse and specular?
I advise using these settings on the data editor: http://www.sc2mapster.com/forums/general/wiki-discussion/20995-info-data-editor-fieldnames/#p1
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I set the Indexes
0 0 Enabled
1 1 Enabled
If I change the left indexes like I did with changing the bottom line left indext to 1 from 0 (it was 0) a new Declaration is added and even if I type the same things for the Adaptations under Index 1 Declaration (the one created by changing the left index), same result, either getting just diffuse of I type Slot: main,
Prefix On substring: Sphere, or the specular instead of diffuse if I add main.diffuse and main.specular in the slots.
Could it be problem in the textures themselves? - No, I changed textures to Command Center Diffuse and Speculars and I get the same results. My custom dds textures use alpha channel so it's not it.
Could it be because Sphere.dds is set for Diffuse and Sphere.dds is set for Specular in the Materials in Previewer? Like it only accepts one dds file for both?
Because when I once imported a custom model not related to this case, I set its diffuse, normal, specular, textures in 3ds max and ingame the model shined based on how dark/light my specular was. And with this Sphere I see only diffuse showing or only specular if I type main.diffuse/specular in Slot in 'Model'
Texture select by id can only replace a specific texture used by the model. If the model uses the same texture multiple times, all of those textures will be swapped. Afaik, there is no way to change one of them without editing the model file.
However, it is quite easy to modify the texture pathes for a model. I used notepad with great success ;). Just keep the texture path length the same.
Also, you can easily use a non-existing texture path and swap this path to your desired texture.
From my understanding, the index does not have any influence. Also, the slot does not matter at all, as long as your use of it is unique. You can use main.specular to swap a diffuse map just as well as generic01.normal
Has it worked for you? I edited Sphere.m3 in notepad by just renaming the second dds to ballan.DDS (6 letters and exists in Assets) so it now would have Sphere.dds and Ballan.dds, I imported the model back and it cant load it, in Previewer when I double click the imported model I get INFO of Sphere.m3 .. and when i restart editor 'Unable to create this model Korhal.m3' which is the name I gave the M3 after editing the second texture's name..
Geez if I installed 3ds max would've done this in no time, at least I know custom models when their textures set with the M3 plugin do show ingame correctly. Prob is I dont want to use 3Ds max as I only used it for setting a model's Diffuse/Normal/Specular textures and exporting to M3, I never model with it... and it takes GBs and installs tons of things I dont use
When I rename textures, I usually only replace 1 letter, for example I replace
Assets/Textures/Sphere.dds
with
Assets/Textures/Spher2.dds
I didn't try it specifically for the sphere, but it worked with other models for me.
But if I had 3dsMax, I would probably use it ;)
Before changing the name of the 2nd DDS I called it Spheer.dds while the first texture was Sphere.DDS. Same result - every time I open the editor if my Doodad is on the map using this model, it says it cannot load the model and loads the Default sphere model for missing model apparently.