Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 27-09-2004 , 10:07 PM
Quads's Avatar
Registered User
Join Date: Jul 2004
Posts: 12

Rendering painteffects

I've modeled a house in which I later on plan to add some grass around. Since the render looks much better in Mental Ray I prefer this, but Mental Ray doesn't render painteffects...
So I just tried to render layers using some flowers instead of grass to begin with, and I started with just rendering in Maya Software (I'm a real newbie when it comes to rendering).

I rendered the house only - looks great - even the shadows from the flowers appear on the house although the flowers themselves did not render. Perfect! I saved this as a bmp.

I rendered the flowers - looks great - the flowers standing behind the house are almost black from the shadow of the house - which itself wasn't rendered. Perfect! I saved this as a tga.

I opened Photoshop and loaded the two images. But when I put them together it just doesn't work. All of a sudden you can see that the flowers don't belong there - it looks like they've been cut in. I expected a result which looks exactly the same as if I would have rendered the whole image together (the house and the flowers).
What did I do wrong?

/Thanks!

# 2 28-09-2004 , 08:34 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
you need to have an alpha channel to allow photoshop to see where the flowers should show through and where they shouldnt. It's like a transparency channel. And for that you have to save as tiffs or tgas (never save as bmps!)

What I would do is think of it in layers, front middle and back. Have anything behind the house as the back layer, the house as the mid layer. When you render the flowers it's probably worth assigning a matte black object to the house so that it mattes out anything it's covering (go to matte opacity in the shader and change it to black hole and render the flowers again and you will see what I mean).

Then comp them together in photoshop as normal.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 3 28-09-2004 , 02:48 PM
Quads's Avatar
Registered User
Join Date: Jul 2004
Posts: 12
I'll try that. Thanks!!!

# 4 29-09-2004 , 04:26 AM
Quads's Avatar
Registered User
Join Date: Jul 2004
Posts: 12
Nope. I got the same result user added image So let me put it this way:
What would you do if you wanted to render a house in mental ray with a lots of grass around it? I know I can convert painteffects to polygons, but I'll end up with too many if I wanted a whole field or something...

# 5 29-09-2004 , 08:26 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
exactly what I said above. I'd render the house as the mid layer and a layer of back and front grass/flowers etc. Think about what lies in front of the house and what lies behind it. Could you post a pic of what you are getting so that I understand better.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 6 29-09-2004 , 08:06 PM
Quads's Avatar
Registered User
Join Date: Jul 2004
Posts: 12
Ok... First here is an image of what I get when I render all layers:

user added image

This is the house and the ground:

user added image

And here are the flowers I put there just to try things out:

user added image

I saved the last two images as tga:s, and when I put them together in photoshop I get this result:

user added image

As you can see it doesn't look the same as the first image which Maya rendered. Am I missing something obvious? I tried the matte-thingy you explained, but I noticed no difference. I don't know exactly what it does, but when I changed the texture of the outer wall of the house (the red) it turned completly black. The flowers looked the same after...

Edit: Wait a minute... It looks like the flowers caught some of the blue background... Am I on the right track here?

# 7 30-09-2004 , 02:53 AM
wchamlet's Avatar
Registered User
Join Date: Nov 2002
Posts: 195
It looks like the anti-aliasing is causing the alpha channel to bleed into the blueish background. Did you try doing the renders without anti-aliasing (on the flowers), and see if that worked?

# 8 30-09-2004 , 03:02 AM
roach105's Avatar
Subscriber
Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
its definetly the matting. you may be missing a step or something. Another thing it seems like your camera color is the sky color can you just render out the flower layers on a black camera environment this may help.

# 9 30-09-2004 , 04:04 AM
roach105's Avatar
Subscriber
Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
I couldnt help trying this out my self. Here are my results. The top shows all the layers without removing the matte. You can see the white around the house and the flowers.

bottom you can see that after I remove the white matte for the house layer and than for the PFX layer it totally removed the white outline.

Attached Thumbnails
# 10 30-09-2004 , 04:07 AM
roach105's Avatar
Subscriber
Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
actually I was just taking a closer look at your render and it may not be the matte at all. make sure in your global renders in the paint effects section turn on oversampling on paint effects on. This should fix some of the antialiasing happening.

# 11 30-09-2004 , 07:31 AM
Quads's Avatar
Registered User
Join Date: Jul 2004
Posts: 12
Yes, I've already tried that. Actually I think it has to do with what is in the background of the flowers. My first render were light-blue, and when I put it into photoshop the edges were too bright. I now tried to render again and change the background to black. The result was better, but still the flowers don't sort of melt in into the picture.
What I would really like is a function where you can render the flowers and at the same time calculating what's behind them to get the correct colors - without actually rendering the background.

Is layer-rendering the only way to do this? Because this seems to advance to get a descent result... user added image And then the next step is to render everything in mental ray except for the flowers, and that result should get even worse...

And yes - I suppose rendering without anti-aliasing would get a better result between the two tga:s, but rendering without AA is not what I want.


Last edited by Quads; 30-09-2004 at 07:35 AM.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads