PDA

View Full Version : What are clipmaps called outside of lightwave



Dan Ritchie
03-08-2019, 03:31 PM
I was doing a google search for clipmaps in opengl, and it seems to refer to some kind of level of detail map. Was wondering what the rest of the world calls clipmaps as we know them?

MarkAH
03-09-2019, 08:08 AM
The clipmap acts like a mask. It tells the render engine that the 'clipped' part of polys aren't even there.
So usually you would use a monochrome image, and if I remember correctly the white area clips.
In Pshop a mask is used to cut out part of a layer.
But what is happening in LW is the removal of areas of surfaces so they don't effect ray tracing.
Sometimes there are transparency maps included with image mapped surfaces.
But those often 'blend' layers of surfaces by having degrees of lightness, or shades of white as it were.
They are unpredictable as clipmaps but in that kind of surface you still need a clipmap.
So what I do is bring the transparency map into Pshop and increase the contrast and sharpness until it gets to the point of being just black and white.
Then save as a seperate mask image, and use it in the clipmap.
Takes some experimentation to get it nice and clean sometimes.

MonroePoteet
03-09-2019, 08:15 AM
"Blending mode", maybe? I don't know at all, but this article:

https://www.opengl.org/archives/resources/faq/technical/transparency.htm

Has section 15.080, which talks about making "part of my texture maps transparent or translucent":


15.080 How can I make part of my texture maps transparent or translucent?

It depends on the effect you're trying to achieve.

If you want blending to occur after the texture has been applied, then use the OpenGL blending feature. Try this:

glEnable (GL_BLEND); glBlendFunc (GL_ONE, GL_ONE);

You might want to use the alpha values that result from texture mapping in the blend function. If so, (GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) is always a good function to start with.

However, if you want blending to occur when the primitive is texture mapped (i.e., you want parts of the texture map to allow the underlying color of the primitive to show through), then don't use OpenGL blending. Instead, you'd use glTexEnv(), and set the texture environment mode to GL_BLEND. In this case, you'd want to leave the texture environment color to its default value of (0,0,0,0).

mTp

Ztreem
03-09-2019, 09:45 AM
I was doing a google search for clipmaps in opengl, and it seems to refer to some kind of level of detail map. Was wondering what the rest of the world calls clipmaps as we know them?

Transparent cutout shader , alpha cutout shader, Alpha clip shader or cutout shader?

gar26lw
03-09-2019, 04:03 PM
1 bit alpha

MarkAH
03-09-2019, 04:47 PM
From the LW Documentation:

"The Clip Mapping function, located on the Rendering Tab of the Object Properties Panel, offers a way to quickly alter an object.
Basically, it allows you to cut away portions of an object using a texture.
This is a great way of creating 2D pop-ups, as well as holes, tears, or grids in objects without having to model them."

So in LW 'Clip Maps' have nothing at all to do with Open GL.
There, a clip map could be something entirely different, like an LOD selector it seems.

Another way that I use Clip Mapping in LW is for creating Logos that need to be applied to curved surfaces.
I copy an area of polygons from the surface where the logo will be applied. Then UV map them.
Paste them back a millimeter or two out from the original polys and maybe put like a chrome shader on them.
Create the logo in Pshop with a 3D effect but just make it grey scale.
Also make another layer of the logo as a mask, like a black and white cuttout.
Now add the logo image map to the bump channel, and put the mask on the Clip map.
Really nice and complex 3D look logo's can be created with only a few polygons.
Renders great!

MarkAH
03-10-2019, 05:10 AM
Here is an example of the technique described above:
144371

Tatoos can be created with Clip Mapping also.
Use a paint tool to create the tatoo art, create the mask layer, and also a transprency layer with blurred edges for blending.
Use very bright colors and a transparency level of about 80%.
Then make sure the duplicated polys have their points on the weight maps so they will flex with the skin surface.
Saves editing a huge skin texture and makes the tatoos removable.

Dan Ritchie
03-10-2019, 03:15 PM
Thank you all. That's a lot to catch up on.