View Full Version : Render to texture, using alpha on source objects?
EarthQuake
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:
http://img509.imageshack.us/img509/6838/ivynormalsnx4.jpg
Rob Galanakis
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 ;)
Tumerboy
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.
EarthQuake
07-12-2008, 08:59 AM
Do you guys have any of tutorials for that sort of thing?
Rob Galanakis
07-12-2008, 09:38 AM
http://www.bencloward.com/tutorials_normal_maps11.shtml
EarthQuake
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.
EarthQuake
07-12-2008, 10:34 AM
Using max.
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.
EarthQuake
07-12-2008, 11:03 AM
oh, yeah duh. thats pretty smart. Ok thanks, i'll try that if i'm not too lazy =)
Popeye9
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.
http://www.scriptspot.com/3ds-max/normaltexmap
Hopefully it helps. I made the environment a 127 127 255 rgb and rendered and came up with this
http://img182.imageshack.us/img182/3820/ivynormmf9.jpg (http://imageshack.us)
http://img182.imageshack.us/img182/3820/ivynormmf9.81c2267d74.jpg (http://g.imageshack.us/g.php?h=182&i=ivynormmf9.jpg)
hopefully that helps
jogshy
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?
Eric Chadwick
07-15-2008, 06:26 AM
Added to the wiki.
http://wiki.polycount.net/Normal_Map#BakingTransparency
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?
EarthQuake
07-15-2008, 07:16 AM
Yeah of course eric, here i posted this in my other thread, will it be enough?
http://img112.imageshack.us/img112/7676/leaveprocessdh8.jpg
Eric Chadwick
07-15-2008, 07:20 AM
This is great, thanks!
MALicivs
09-16-2008, 02:32 PM
Hey people!
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.
http://www.ididitforthepoly.com/public_img/wip/column03S.jpg http://www.ididitforthepoly.com/public_img/wip/ivyyyyyyyyyyyyyyyysssS.jpg
cheers!
Eric Chadwick
09-16-2008, 02:36 PM
Maybe you can set the ivy generator to generate pure-geometry leaves instead of transparency-mapped planes.
MALicivs
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.
MALicivs
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.
Eric Chadwick
09-16-2008, 03:18 PM
Sounds like a plan. :D
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.