View Full Version : Render to texture, using alpha on source objects?
07-11-2008, 10:09 PM
So i've been messing with this little app, trying to render out some vine decals. I've got a scene set up in max because its the only app i can think of that would let me do this. I want to apply an alpha texture to the highres and bake. I've got it set up and it looks good when i do a standard render, but when i try to RTT, it doesnt actually mask anything off in the normals... or well, it does something, but still leaves an outline of the plane.
Heres what i'm getting:
07-11-2008, 11:59 PM
I ended up lighting it with Red, Green, and Blue lights, and rendering it myself to create normals (and the other maps) when I did this a while ago (you used one of those ivy generators for that, right?). I will say, though, it didn't end up nearly as nice as I'd hoped, but you are a much better artist than I, so see what you can do.
Yep, I ended up doing the same as what Rob described. Set up lights to fake normalmap lighting (use a grey material on your "normals" with the opacity enabled) and render it out from a fixed camera (obviously you might have to be careful about measurements/alignments).
I made the color/normal match up by having two instanced cameras rendering onto instanced geometry - one set of geometry had the "normalmap" grey material and was only affected by the normalmap lighting, and the other had the diffuse texture on with 100% self illumination and excluded from the lighting.
Obviously if you're just after the normals then you won't need to do the double setup.
Mine, however, did end up as nicely as I'd hoped ;)
07-12-2008, 08:43 AM
Ya, that sounds like what I did to render some bushes i made to a camera facing plane. Kind of complicated, but ended up working quite well.
07-12-2008, 08:59 AM
Do you guys have any of tutorials for that sort of thing?
07-12-2008, 09:38 AM
07-12-2008, 10:00 AM
Ok awesome thanks! I think i'll be able to figure out how to do D,N, and AO with this, do you guys have any ideas on how you would create a height/depth map from this?
What are you rendering in? In Maya I think there's a node that gives a gradient depending on the distance to the camera that should be able to do it... erh.. but I haven't tried it for render to texture I guess but I assume it should work all the same.
07-12-2008, 10:34 AM
Yeah, you could just planar map the geometry from the side in a 2nd UV channel, and use a Gradient map from black to white, rendered on a black background.
07-12-2008, 11:03 AM
oh, yeah duh. thats pretty smart. Ok thanks, i'll try that if i'm not too lazy =)
07-14-2008, 10:06 PM
so I was having the same problem with my ivy and found a script that adds the normal colors in the diffuse slot and then set the self illum to 100 and render with your normal map with a ortho camera. Pretty much the same thing that ben's tutorial does but without the light setup. you can find the script at scriptspot.
Hopefully it helps. I made the environment a 127 127 255 rgb and rendered and came up with this
hopefully that helps
07-14-2008, 10:24 PM
Now I understand why you told me about that alpha-mask feature for xNormal :p
Popeye9: That normalmap looks a bit wrong... or were all the leaves actually pointing upwards a LOT?
07-15-2008, 06:26 AM
Added to the wiki.
EQ, I'd like to add your leaf renders (before and after) to that page as a visual example. Would you be cool with this? Could you post the corrected render too?
07-15-2008, 07:16 AM
Yeah of course eric, here i posted this in my other thread, will it be enough?
07-15-2008, 07:20 AM
This is great, thanks!
09-16-2008, 02:32 PM
so hasn't anyone been able to do this on a typical render to texture scenario?
I wanted to bake the vegetation on the prop's uv's so I could put them up in the texture in photoshop, but I get all those transparency errors.
Since the prop is not a simple plane I cannot use the technique you guys describe, so my though was, if max is able to identify the pixels where the alpha is, there is got to be a way to make rtt ignore those pixels and render whats beneath them. Hasn't anyone find out any way to do that? maybe some other program like XSI or Modo are able to do something like that.
oh, here are examples to ilustrate what I want to do in case you were not able to decode my bad english.
by the way, I just wanted to bake the diffuse for now.
09-16-2008, 02:36 PM
Maybe you can set the ivy generator to generate pure-geometry leaves instead of transparency-mapped planes.
09-16-2008, 02:46 PM
I forgot to mention I'm using Guruware's plugin for max, and I don't think it is possible to do that in it.
But that would still leave us with the problem of not being able to bake objects with transparency, a problem that I guess everyone would like to see solved :\
anyway i'm gonna check it out if the plugin can do that, and if it does, I'm gonna shoot myself.
09-16-2008, 03:05 PM
Oh damn, I am such a n00b, I pity myself.
It is possible to use meshes as the leaves like you said man, thank you for enlightening me and making me read the plugin list of features that I should have read in the first time :poly136: http://www.guruware.at/main/ivy/index.html
anyway, this thingy can be quite cumbersome even without using meshes as leaves so I still think that transparency problem needs to be solved.
Anyway thank you so much EricChadwick, my problem is semi solved. for now.
ok, time to go shoot myself.
09-16-2008, 03:18 PM
Sounds like a plan. :D
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.