PDA

View Full Version : possible to render a solid colour transparent ?


F1Racer
09-28-2008, 02:24 PM
Im sure my topic title explains little, but to put it simply, I have a scene which is of a racing track in a game.
When rendered in the game, it knows that the colour 255,0,255 is to be treated as transparent. The track editor does too and so it show up fine there.

However LW doesnt seem to recognise this (why would it?) and so I get lots of pink everywhere.
Normally these textures are given to me as TGA's which have an alpha mask and that makes all the nasty pink go away.
Of course in that instance with a TGA I can't seem (or don't know how) to make LW recognise the alpha mask of a TGA short of creating a clone and telling it 'alpha only' and using that in the transparency layer. Any help there would be great if someone knows a better way around that.

However this time all my textures are BMPs so no alpha layer.
Is there a way to tell lightwave to treat all occurances of 255,0,255 as transparent and render them that way ? Or a plugin ?

Or am I destined to process them all and manually create my own maps for each texture ??
I have attached a sample pic.

serge
09-28-2008, 05:23 PM
If you're using LW9.x you can use this nodal solution: see attached image.

JeffrySG
09-28-2008, 05:28 PM
^pretty darn cool solution!

That's about the 1000th thing I didn't know you could do in the node editor.

F1Racer
09-29-2008, 02:39 PM
Brilliant serge ! Thank you very much :thumbsup:

Tobian
09-29-2008, 03:03 PM
http://pagesperso-orange.fr/dpont/plugins/nodes/Additionnal_Nodes_2.html

Dpont did a node specifically for doing this, which has a tolerance feature for bleeding edges and such, called 'color key', though in this case that should be sufficient, if you don't have any edge aliasing :)

Also I recommend you do this in the clip map, not transparency map (clip is found in the object settings, in layout, not in surface properties), because with the number of trees in that scene you could end up with ray recursion issues, plus transparent objects take more time to render and are not completelly 'invisible' unlike clipped objects.

F1Racer
09-30-2008, 03:38 PM
Great stuff Tobian. Yeah there are a LOT of trees on the whole track as you can imagine.
I`ll follow your advice with the clip maps and also try that node.

Thanks a lot.

JamesCurtis
10-01-2008, 12:01 AM
I'm interested in a variation of this. However, what I need is a way to use the nodes to key out the blue tones from bluescreen shots that are mapped to a flat plane and placed into a scene into isolated areas of the shot - kinda like inserting it into a matte shot area.

I know editing/compositing software such as Sony Vegas, After Effects, and others can do this, but I need it more for using it for virtual set previs/construction of set pieces from directly within LW.

I was looking at the DPFilter Colorkey option, but haven't been successful in getting/finding a way to key out the varing blue tones of my video footage/frames. It somewhat worked with a solid color with the color parameter, but haven't been able to do a variable toned key with the Color key Parameter. I'm somewhat of a noob when it comes to nodes.

Below is a screen grab of my setup so far. It keys out solid blue fine but I need it to also key out much of the blue strip at lower center of this sample test image seen in the render window.

Can anyone help me with this? It would be much appreciated.