Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Help with drawing different regions  (Read 10139 times)

0 Members and 1 Guest are viewing this topic.

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Help with drawing different regions
« on: June 28, 2007, 11:56:05 PM »

I just can't wrap my brain around the different regions philosophy. Is it possible to have your entities mostly part of the background, then use regions to make actors walk behind certain set pieces? As it stands, here's how my scene is set up: I have a background. I have a desk in the foreground. I make a region in the shape of the desk and put it below the background. This, however, doesn't work. How can I make this work? And without using sprite entities.
Logged
Cavernite/URUman

Mac

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 136
    • View Profile
    • Homepage
Re: Help with drawing different regions
« Reply #1 on: June 29, 2007, 12:08:57 AM »

There's no way to let your actor walk behind something without using a sprite entity. It's not possible to mark something up in your background picture. You have to make your desk a seperate object and place it in the right order in scene edit. The tutorial in the documentation covers the rest.

Mac
Logged

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Re: Help with drawing different regions
« Reply #2 on: June 29, 2007, 01:05:16 AM »

Why is that? That doesn't make any sense. There's no way for me to make my objects into sprites. You can do it in AGS...

EDIT: How about this...could I make a region entity instead of a sprite entity? Or use a large, entirely transparent image ontop of my set piece? I need to work around this.
« Last Edit: June 29, 2007, 03:24:35 AM by Kato »
Logged
Cavernite/URUman

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: Help with drawing different regions
« Reply #3 on: June 29, 2007, 04:45:24 AM »

Are you painting your scenes or what?  There are some simple things you can do.  Paint in layers, making your entities on another layer.  If you're using a modeler, do the scene, then delete everything except the entity and do another render with an alpha background.
« Last Edit: June 29, 2007, 04:47:50 AM by fireside »
Logged

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Re: Help with drawing different regions
« Reply #4 on: June 29, 2007, 04:58:01 AM »

I'm not painting, I'm using pseudo-realistic 3D graphics. I can't render one entity at a time because I would lose shadows and other things (example: in my scene right now, the desk lamp projects a visible cone which is seen over other stuff, I wouldn't get that if I rendered it alone and masked out the background. My 3D graphics program (Blender) can't render to alpha natively AFAIK.
Logged
Cavernite/URUman

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: Help with drawing different regions
« Reply #5 on: June 29, 2007, 05:02:00 AM »

Quote
My 3D graphics program (Blender) can't render to alpha natively AFAIK.

Yes it can.  Set it to png rgba. Use a grey world color because you get a slight color mix from alpha blending.
« Last Edit: June 29, 2007, 05:11:05 AM by fireside »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Help with drawing different regions
« Reply #6 on: June 29, 2007, 08:45:14 AM »

Quote
Why is that? That doesn't make any sense. There's no way for me to make my objects into sprites. You can do it in AGS...
You can do it in AGS, if you paint over all the areas that can obstruct your character. I don't see any difference between painting the area of the object (AGS) or painting the area surrounding the object (WME). Besides, separate sprites allow you to use antialiased edges, transparency etc. And as mentioned above, you typically do paint scenes in layers (when painting the scene by hand) or can render separate objects (when using 3D art), so in my very humble opinion WME's approach is much more flexible (but of course, I'm biased and I don't follow recent developments of AGS).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Re: Help with drawing different regions
« Reply #7 on: June 29, 2007, 07:57:29 PM »

But I will completely lose shadows if I render them as separate layers.

In AGS, you simply define the region where you want the character to not show, and nothing behind that region will show.
Logged
Cavernite/URUman

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Help with drawing different regions
« Reply #8 on: June 29, 2007, 08:23:12 PM »

You can still use gimp or any other similar tool to cut of the sprites if you can't render the items one by one. What you are describing as "simply define the region" is 1)the exact same method if you are painting the zbuffer on an image or 2)a way to cut of a sprite with the lowest possible quality with really bad cut off edges if you are using a vector region.
Please, since I haven't used AGS for a few years, if I miss something post a screenshot of what you are saying.

The approach of wme with layers is offering: 1)flexibility since you can move / remove / paint / change the sprite, 2)high quality antialiased objects, 3) Sprites with trasparency, for example you can have a semi trasparent glass and when the character walks behind you can see him through the glass.  ;D
Logged
fl*p

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Help with drawing different regions
« Reply #9 on: June 29, 2007, 08:46:26 PM »

Or you just render it one time with all layers enabled and then do a box render of only the layer with the object in. That way you have both the shadows in the background as well as the separated object which you can use just like it is (if you chose png).

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Re: Help with drawing different regions
« Reply #10 on: June 29, 2007, 09:13:13 PM »

I've been trying to work with this, using, among other things, the Hidden Geometry Exporter from the wiki.

Here's a major problem: I can't render the scene with just those two layers and the lights active because then I don't get the light collision that happens (for example, my "sun"-style spotlamp doesn't collide with the wall, creating the wrong lighting on the desk). I can't turn the background white and render it then mask it out--because my spotlights are visible (they have halos). If I turn the halos off then the bucket (which is behind the halo but still can be walked around by the character) won't have the halo ontop of it but the part under it will in the background. Any suggestions here?
Logged
Cavernite/URUman

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Help with drawing different regions
« Reply #11 on: June 29, 2007, 10:25:36 PM »

Render out your entire flat scene, then render out the objects that need to be walked behind to a PNG/TGA with alpha channel, from the same camera view. Then, load the alpha channel selection over the top of your full scene render, and cut out that section. That will give you a separate sprite that can be walked behind, and because it's cut from your full scene render, all your shadows will be intact. When you place it over the top of your scene in WME, it will be totally seamless. You can then discard the individual object render because you only need it to get the alpha selection for that object.

How's that?
Logged

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: Help with drawing different regions
« Reply #12 on: June 30, 2007, 12:18:04 AM »

Could you please post some screenshots? I guess no one has a real idea what you mean.

Otherwise my advise is still: Render the complete scene (with ALL layers enabled), then do a box render with only the layers that contain objects in front (and for correct lightning put your lights on a separate layer and leave that activated, too if necessary).

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: Help with drawing different regions
« Reply #13 on: June 30, 2007, 05:52:35 AM »

Quote
But I will completely lose shadows if I render them as separate layers.

I think I've made objects completely alpha and turned on shadows in blender and they cast a shadow but don't show up.   You have a lot of options.  Paint around it and cut it out, or make a sprite.  AGS also has low res and doesn't do any kind of 3d acceleration, or 3d or a bunch of other things.  If that's what you want, use AGS.  No offense or anything, but I don't think you can argue graphic quality between the two.  AGS is a pixel artist thing .  The painted stuff looks nice, but Blender renders?

edit:  I just tried it.  Set the object's alpha to 0 and turn on z transparency and it will cast a shadow but not show in the render.
« Last Edit: June 30, 2007, 06:26:28 AM by fireside »
Logged

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Re: Help with drawing different regions
« Reply #14 on: June 30, 2007, 05:47:50 PM »

Render out your entire flat scene, then render out the objects that need to be walked behind to a PNG/TGA with alpha channel, from the same camera view. Then, load the alpha channel selection over the top of your full scene render, and cut out that section. That will give you a separate sprite that can be walked behind, and because it's cut from your full scene render, all your shadows will be intact. When you place it over the top of your scene in WME, it will be totally seamless. You can then discard the individual object render because you only need it to get the alpha selection for that object.

How's that?
This method seems to be working perfectly for me right now. Fireside's suggestion (alpha to 0, ztransp) would also work, I believe. Thank you all very much.
Logged
Cavernite/URUman
 

Page created in 0.304 seconds with 23 queries.