www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Texture Layers for Swapped and Unswapped zones « View previous topic :: View next topic » 
Author Message
Jaggedge
PostPosted: Fri Aug 15, 2008 2:43 am    Post subject: Texture Layers for Swapped and Unswapped zones Reply with quote



Joined: 08 Jul 2008
Posts: 56

Hi, I noticed that if you changed the texture in a Material Layer, the change does not update to the swapped out layers. I can see certain logic in doing this but it doesn't really work for me. Is there any way to effect the change to all zones without having to unswap all the zones first?

What I did:

1. Created 8 zones.
2. Created a Material Layer called Grass001.
3. Assigned all 8 zones to Grass001, and applied a distribution mask to cover the entire terrain.
4. Swapped out 4 zones.
5. While working on the remaining 4, decided that the grass texture, GrassA.tga, wasn't that suitable.
6. Opened the Material Layer Grass001 and changed the texture to Grass002.tga.
7. Now 2 textures exist within the Material Layer Grass001, GrassA.tga and GrassB.tga
8. My swapped out zones still use GrassA.tga while my unswapped zones use GrassB.tga


Wink Thanks for reading this!
Back to top
View user's profile Send private message
Jaggedge
PostPosted: Fri Aug 15, 2008 3:22 am    Post subject: Reply with quote



Joined: 08 Jul 2008
Posts: 56

I just figured out that one of the ways to do this is probably to overwrite the actual image in the library, ie. rename GrassB.tga to GrassA.tga. This is probably workable for now but it means I need a generic name for the textures that I assign to the layers, so as to avoid confusion when I want to switch my grass to snow for example.


*Edit:
I tried this out with a "Colour.tga", which was a flat red colour, then I tried changing it to blue and overwriting the same texture. Within Grome however, it did not update the changes. I tried Reparse but nothing happened. It only updated the change in the Library when I uploaded and loaded the texture again. This did not update in the terrain, however. Attempting to change the texture to a "Grass.tga" at this point caused the program to crash, "Exception C0000005 detected"..

After the crash, I restarted the file and the Resource Locator tells me the texture is missing, hitting Refresh fixes this though.

Is this a bug?
Back to top
View user's profile Send private message
ALicu
PostPosted: Fri Aug 15, 2008 7:00 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1327

Hi,

One method to change settings to the entire terrain is to write a script to do that. The script can go through all project zones and swap / unswap them and apply certain tools, change layer settings, delete old and assign new layers. You can find some sample scripts in this thread:

http://www.quadsoftware.com/forum/viewtopic.php?t=305

The same thing can be done with a plugin made with the SDK. You can create an utility plugin that does all the processing on all the zones.

Basically with a script or a plugin you can reproduce all the operations a user can do on all the zones and doing unswap/swap operations along the way.

Swapped zones have their data out of memory so no operation can be done on them before unswap (not even delete since we need undo to be constructed for that). In the future we consider adding an option that can be turned on to apply certain operations (like global stack operations) on a global level (to do the unswap/swap automatically in the background).

Also, can you send me a bug report for that crash? Is this reproducible? Can you tell me the exact steps you've made?

Regards,
Adrian L.
Back to top
View user's profile Send private message
Jaggedge
PostPosted: Fri Aug 15, 2008 7:55 am    Post subject: Reply with quote



Joined: 08 Jul 2008
Posts: 56

Hi Alicu,

Thanks for the reply! I'll check out the scripts and get back to you Smile

Regarding the crash, yes it is reproducible.

1. Create a 256 tile zone
2. Create a new Material Layer, assign to zone
3. Select "Colour.tga", Mask 512x512, Masked Texture, UV 1x1
4. Use MaskGenerator and make texture show up
5. In Photoshop, use Hue/Saturation to change the hue of "Colour.tga"
6. Save and overwrite "Colour.tga"
7. Back in Grome, open Texture Library. - Notice that the texture hasn't been updated.
8. Try to reparse. Nothing happens.
9. Right-click on "Colour.tga"
10. Select Unload.
11. Right-click on "Colour.tga"
12. Select Load.
13. The texture inside the Texture Library has been updated, but the terrain hasn't.
14. At the Materials tab, expand the Material Layer and click on the texture icon. - Notice that the icon has changed to an "X".
15. Select any texture, or just click OK.
16. Program crashes.

I have sent the crash report to Support Very Happy
Back to top
View user's profile Send private message
ALicu
PostPosted: Fri Aug 15, 2008 8:22 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1327

Hi, yes you are right, I've managed to reproduce the bug myself. I will make a fix to this for the next patch. In the mean time you need to reload the scene after you modify an image (in the future versions we will add a more evident refresh option).

Thank you for the report.

Regards,
Adrian L.
Back to top
View user's profile Send private message
ALicu
PostPosted: Fri Aug 15, 2008 12:35 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1327

Hello, we've fixed the bug and it will be present in the next update (next week). We've also added a Refresh option to the layer context menu which can be used to refresh the external textures changed in other programs.
Back to top
View user's profile Send private message
Jaggedge
PostPosted: Mon Aug 18, 2008 2:16 am    Post subject: Reply with quote



Joined: 08 Jul 2008
Posts: 56

Hi ALicu, that's great to hear! Your team is fast! Laughing Thanks a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group