(solved) [terrain_graphics] layering question

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Dovolente
Posts: 140
Joined: April 17th, 2007, 9:02 pm
Location: USA, Mountain West
Contact:

(solved) [terrain_graphics] layering question

Post by Dovolente »

Hi all,
I'm working with terrain embellishments and have the same problem that some of the current embellishments like the windmill have with overlap on stone walls:
overlay_problem.jpg
I see that desert plants seem to layer correctly (they don't get cut off when in front of the wall), and I'm trying to get the same behavior.

This is how desert plants work in the core terrain_graphics.cfg:
Spoiler:

I'm trying to get the same behavior by calling the same macro, but it doesn't work--I get results as shown above:
Spoiler:
After tracing through the macros and reading the terrain_graphics documentation my head just spins--any help appreciated! :)
Last edited by Dovolente on January 17th, 2011, 2:47 am, edited 2 times in total.
Brilliand
Posts: 80
Joined: July 11th, 2009, 12:15 am

Re: [terrain_graphics] layering question

Post by Brilliand »

Okay, I've looked through the macros (in 1.8.1, but hopefully it hasn't changed since then), and my recommendation is to use OVERLAY_L instead of OVERLAY_P. OVERLAY_L assumes a 100% chance of your embellishment showing up, and uses the number you give to decide what it overlaps over... anything greater than 0 should appear over nearly everything else. My guess is the desert plants get around the problem by virtue of coming earlier in the code than the walls do.

(Come to think of it, that would probably cause a problem with your embellishment covering up walls where they shouldn't... but you can fix that by adding extra instructions to put the tops of walls over your embellishments where appropriate.)
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: [terrain_graphics] layering question

Post by bigkahuna »

Brilliand wrote:(in 1.8.1, but hopefully it hasn't changed since then)
Almost all the terrain graphics macros were altered/redone.
Check out my campaign Sweet Revenge!
Join the new R2D forum!
User avatar
Dovolente
Posts: 140
Joined: April 17th, 2007, 9:02 pm
Location: USA, Mountain West
Contact:

Re: [terrain_graphics] layering question

Post by Dovolente »

re: Brilliand, thanks for the suggestion. I had already tried that. OVERLAY_L is basically doing the same thing P is (just manually setting probability with P).

Btw, this is oddly just an issue for stone and stone-lit walls. For cave walls everything works OK using the macros.

I've gotten to the point where I can set up new tile rules with a higher-numbered layer so that my overlays will place over stone walls if a wall is to the n/ne/nw. It is almost a fix. But when walls are *also* to the s/sw/se (in 1-hex-wide tunnels, doorways) then I've still got overlap issues.

I'd just shrug it off as another WML mystery, but it must be possible to layer with stone walls correctly (or in the way I'd like) somehow, since the desert plants do it. Baffling.

:hmm:
User avatar
bigkahuna
Posts: 657
Joined: September 11th, 2010, 6:24 pm
Location: In your mind.

Re: [terrain_graphics] layering question

Post by bigkahuna »

Dovolente wrote:I'd just shrug it off as another WML mystery, but it must be possible to layer with stone walls correctly
First of all, desert plants are lucky (and they are at ground level. Any non-transitioning things go within the wall).
Secondly,
Terrain Commentary Thread wrote:The fact that nothing interfaces with cave wall has been around for ages so I imagine it is quite a knotty problem.
Nothing really interfaces with cave wall very well - even cave wall itself. You have a single image. You'd have to make a transitionary image to cave wall for it to work.

Finally,
Alarantalara (Art Contributor) wrote:Actually, that estimate was just for cave to castle/keep. I've been thinking about it a little more and it's an underestimate. One castle, including its keep, needs 360 images if it wants to work with all possible cave wall patterns. There are 13 castle types. That's over 4000 images.
This is just castles to cave wall. Granted, you have a single set of images you want to transition with. However you would still have to create images to interact with all possible cave wall patterns.

P.S. The double-door image you have doesn't work well for anything - even flat hexes. I've tried.
Check out my campaign Sweet Revenge!
Join the new R2D forum!
User avatar
Dovolente
Posts: 140
Joined: April 17th, 2007, 9:02 pm
Location: USA, Mountain West
Contact:

Re: [terrain_graphics] layering question

Post by Dovolente »

Thanks for the info. I'm just putting on overlay embellishments, though, so I shouldn't have to make any transition images.

It seems that it is the order of the macros in core terrain_config.cfg that makes the difference for the desert plant. I guess they are lucky. :P

When I set up my stuff with the basic OVERLAY macro at that point in the core file they also work well. Not sure how to get it to work from my add-on data, though. Back to the drawing board.
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Re: [terrain_graphics] layering question

Post by Eleazar »

Unfortunately, those walls are very problematic, built in a somewhat non-standard way. They have lots of layering issues, which i haven't previously been able to resolve.

The ultimate solution is, i think, to redo the wall macros and images in a more standard way so they work with the cave wall, etc.

Sorry i don't have a quicker fix.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
User avatar
Dovolente
Posts: 140
Joined: April 17th, 2007, 9:02 pm
Location: USA, Mountain West
Contact:

Re: [terrain_graphics] layering question

Post by Dovolente »

Np, thanks for the notice.
User avatar
Dovolente
Posts: 140
Joined: April 17th, 2007, 9:02 pm
Location: USA, Mountain West
Contact:

Re: [terrain_graphics] layering question

Post by Dovolente »

I found a non-elegant and temporary solution: I can just set up a new [terrain_type] with stone walls and copy the [terrain_graphics] macros in my own terrain_graphics.cfg.

The 9-10 hours spent puzzling over terrain_graphics were very educational--in an Anathema penance sort of way. :)
Post Reply