Boolean Texture plug-in

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  07 July 2003
Boolean Texture plug-in

Anybody using it? It sounds simple enough - apply to 2 objects, render. *Riiight.* Not working at this end, and any help/ideas from those using it would be greatly appreciated!
__________________
"Now if I can just find a midget with some gin, I'll be in business..."


http://www.maxxwv.com
 
  07 July 2003
Hi Maxx. Fi's Junkbox has a good fake boolean in the Shaders 4.1 pack. Here's the basic rundown on its use.

-----------------------------------------------------------------------------

*NOTE* For a tutorial on SHIFT's Fake Boolean, scroll down to the bottom of this page.

-----------------------------------------------------------------------------

You'll need four surfaces to pull off Fi's Fake Boolean. They are:

1. The Source surface. This is the object that will be affected by the boolean.

2. The Source Inside surface. Contrary to what you would expect, this is not the surface you'll see on the inside of the Source object. I'll explain more on this in just a bit.

3. The Target surface. This is the object that will do the cutting.

4. The Target Outside surface.

Of course, in order to get four distinct surfaces, you'll need four distinct objects. Here's a simple example to show you how to set this up.

In Modeler, create a box in the first layer. Give it a surface name called "Source."

Copy this box to a new layer. Flip the polys so that their normals face inward and give it a new surface called "Source Inside."

Now this is the important part. You must set the following surface attributes for the Source Inside object:

Color = pure black
Luminosity = 100
Diffuse = 0
Transparency = 100

Cut the Source Inside object from the second layer and paste it back into the first layer. You should now have what appears to be a simple box. But if you select it, you will find that it is really two boxes. One has its normals facing outward (this is our Source object) and one with its normals facing inward (this is our Source Inside object).

Now we're going to create our boolean object. For this example, let's create a simple sphere in layer two. Here's where it gets interesting. The surface of your Source object (the box) faced outward. But the Source Inside object faced inward. We need to do the opposite for our Target object. So begin by flipping the polys of your sphere so the normals face inward.

Now give it a surface name called "Target." Since this is a sphere, go ahead and turn on smoothing. And while you're at it, give this surface color something unique. If your box is the generic white, make this a bright blue. You'll see why in just a minute.

Copy the Target object to layer three. Give it a new surface name called "Target Outside." Now watch this. Since our Target object had its normals facing inward, our Target Outside object needs its normals facing outward. You're just doing the reverse of what you did with the Source object. So use the Flip command to flip the polys. Set it's surface the same as the Source Inside:

Color = pure black
Luminosity = 100
Diffuse = 0
Transparency = 100

Finally, cut the Target Outside from layer three and paste it into layer two.

You should have what appears to be a box in layer one and a sphere in layer two. Save your object.

Fire up Layout and load your object. Then bring up the Surface Editor. We need to apply the Fake Boolean shader to two of our surfaces: The Source and the Target. The Source Inside and Target Inside are alread set, and we don't need to do anything with them from here on out.

Apply the Fake Boolean shader to both your Source and Target surfaces. We're almost done, but first we need to tell the shader which object is the Source, which is the Target, and which layers they reside on.

With your Source surface selected, double click on the Fake Boolean shader. This will bring up two drop down options:

Effective Space: You have two options here. Outside and Inside. Outside is the Source object. Inside is the Target (or boolean) object.

Intersecting Item: This is where we specify which layer our Source and Target items are on.

Since this is our Source object, set Effective Space to Outside. And we need to tell it that our Intersecting Item (our Target object) is on Layer 2.

Repeat the process for the Target surface, but choose the opposite settings. Effective Space will be Inside, and Intersecting Item (our Source object) will be Layer 1.

As far as setup goes, that's it. You can now move your objects around and whenever the ball intersects with the box, it will cut it away. If you set your Target surface to blue, you will notice that anywhere that was cut leaves a blue surface. Contrary to what you would expect, the Source Inside is not actually what you will see on the "inside" of the box. Rather, this surface is necessary for the Target surface to show up.

From here, you can play with the surface settings for the Source and Target. As long as you don't tweak the Source Inside and Target Outside, everything will turn out fine.

Hope this helps!

Steve
__________________
Author: ZBrush ZPipeline Guide for LightWave
Co-Author: Essential LightWave [8] / v9
Co-Author/Editor: LightWave Tips and Tricks

www.stevewarner.com

Last edited by Steve Warner : 07 July 2003 at 07:45 PM.
 
  07 July 2003
Man, Steve, you are like a personal encyclopedia of plugins
 
  07 July 2003
wow! Talk about a comprehensive bit of plugin help.
 
  07 July 2003


I'm attaching a zip file with the objects and a scene built from the above description.

And here's a Divx 5.05 video sample

Cheers!

Steve
__________________
Author: ZBrush ZPipeline Guide for LightWave
Co-Author: Essential LightWave [8] / v9
Co-Author/Editor: LightWave Tips and Tricks

www.stevewarner.com
 
  07 July 2003
Nice bit of demo there. It's nice to see that there are still other talented LWaver's that contribute to this forum.
 
  07 July 2003
wow. Steve, you're officially my hero . Thank you for the info! Man, I gotta admit I didn't expect a full-blown tutorial (let alone a movie example) from the question! Thank you!
__________________
"Now if I can just find a midget with some gin, I'll be in business..."


http://www.maxxwv.com
 
  07 July 2003
Great little tutorial there! thx
__________________
R!ch
 
  07 July 2003
That's a cool technique on the video, will have to check it out properly.
__________________
http://www.halogenic.com
 
  07 July 2003
Quote: Originally posted by Steve Warner
Hi Maxx. Here's the basic rundown:

You'll need four surfaces to pull off the Fake Boolean. They are:

1. The Source surface. This is the object that will be affected by the boolean.

2. The Source Inside surface. Contrary to what you would expect, this is not the surface you'll see on the inside of the Source object. I'll explain more on this in just a bit.

3. The Target surface. This is the object that will do the cutting.

4. The Target Outside surface.

Of course, in order to get four distinct surfaces, you'll need four distinct objects. Here's a simple example to show you how to set this up.

In Modeler, create a box in the first layer. Give it a surface name called "Source."

Copy this box to a new layer. Flip the polys so that their normals face inward and give it a new surface called "Source Inside."

Now this is the important part. You must set the following surface attributes for the Source Inside object:

Color = pure black
Luminosity = 100
Diffuse = 0
Transparency = 100

Cut the Source Inside object from the second layer and paste it back into the first layer. You should now have what appears to be a simple box. But if you select it, you will find that it is really two boxes. One has its normals facing outward (this is our Source object) and one with its normals facing inward (this is our Source Inside object).

Now we're going to create our boolean object. For this example, let's create a simple sphere in layer two. Here's where it gets interesting. The surface of your Source object (the box) faced outward. But the Source Inside object faced inward. We need to do the opposite for our Target object. So begin by flipping the polys of your sphere so the normals face inward.

Now give it a surface name called "Target." Since this is a sphere, go ahead and turn on smoothing. And while you're at it, give this surface color something unique. If your box is the generic white, make this a bright blue. You'll see why in just a minute.

Copy the Target object to layer three. Give it a new surface name called "Target Outside." Now watch this. Since our Target object had its normals facing inward, our Target Outside object needs its normals facing outward. You're just doing the reverse of what you did with the Source object. So use the Flip command to flip the polys. Set it's surface the same as the Source Inside:

Color = pure black
Luminosity = 100
Diffuse = 0
Transparency = 100

Finally, cut the Target Outside from layer three and paste it into layer two.

You should have what appears to be a box in layer one and a sphere in layer two. Save your object.

Fire up Layout and load your object. Then bring up the Surface Editor. We need to apply the Fake Boolean shader to two of our surfaces: The Source and the Target. The Source Inside and Target Inside are alread set, and we don't need to do anything with them from here on out.

Apply the Fake Boolean shader to both your Source and Target surfaces. We're almost done, but first we need to tell the shader which object is the Source, which is the Target, and which layers they reside on.

With your Source surface selected, double click on the Fake Boolean shader. This will bring up two drop down options:

Effective Space: You have two options here. Outside and Inside. Outside is the Source object. Inside is the Target (or boolean) object.

Intersecting Item: This is where we specify which layer our Source and Target items are on.

Since this is our Source object, set Effective Space to Outside. And we need to tell it that our Intersecting Item (our Target object) is on Layer 2.

Repeat the process for the Target surface, but choose the opposite settings. Effective Space will be Inside, and Intersecting Item (our Source object) will be Layer 1.

As far as setup goes, that's it. You can now move your objects around and whenever the ball intersects with the box, it will cut it away. If you set your Target surface to blue, you will notice that anywhere that was cut leaves a blue surface. Contrary to what you would expect, the Source Inside is not actually what you will see on the "inside" of the box. Rather, this surface is necessary for the Target surface to show up.

From here, you can play with the surface settings for the Source and Target. As long as you don't tweak the Source Inside and Target Outside, everything will turn out fine.

Hope this helps!

Steve


More difficult please!!!! I get off on convoluted plugins!

Mike
 
  07 July 2003
Actually the plug-in isn't difficult to use. The whole process of setting it up can be done in about two minutes. But explaining it in terms that anyone can understand and follow is not an easy process. That's what takes time.

Cheers!

Steve
__________________
Author: ZBrush ZPipeline Guide for LightWave
Co-Author: Essential LightWave [8] / v9
Co-Author/Editor: LightWave Tips and Tricks

www.stevewarner.com
 
  07 July 2003
That is so COOL!!! Read and watched now all these ideas to try are popping in and out of my head. There goes what I had planned to work on today. Thanks Steve.
Oh Steve FYI, I think I'm going to create 2 seperate tuts one for landscaping and a different one using the NormalMapper. I caved and am doing the landscaping different now to get/keep the high detail fast and easy like (sorta). It will make more sense after I get them done.
__________________
Shirow Project Webpage
 
  07 July 2003
Man, Steve, your evil! I have been having a blast playing with this plugin instead of working on what I should be working on!
A couple of cool things I did with this:
1- Using morphing you can do some awesome tunneling.
2- You can make pretty cool holes in walls open up for things to come through and then close. So much easier this way!
3- Since they stay transparent and if you don't need alot of them this is a great quick/easy method for footsteps in sand/dirt. Just clone your object(once surfacing is done) and then match the cloned object to your foot colliding with the dirt then leave it there as the foot leaves. Repeat as needed.
4- Laserbeams/bullets entering objects.

Heres a few things I did this morning. What other things have some of you tried thought of?
__________________
Shirow Project Webpage
 
  07 July 2003
Aurora, I can't wait to see your tutorials! They sound great! And I'm glad you're having fun with Fi's Fake Boolean. The footprints idea is fantastic!

Well, I had a chance to play with the SHIFT Fake Boolean plug-in this morning. WOW! You can get nearly identical results to Fi's Fake Boolean without all the troublesome setup. Here's a basic rundown of the SHIFT plugin.

If you've read the tutorial on Fi's Fake Boolean, you know that it utilizes a surface shader for the effect. SHIFT's Fake Boolean takes a different approach by using a procedural texture tied to a clip map.

In Modeler, create a box in Layer 1. Give it a surface named "Box." In Layer 2, create a ball. Give it a surface named "Ball" and color it blue. We're going to follow the same setup as we did in the Fi's tutorial where we have the ball cut away portions of the box. So in this case, where the box gets cut away, it will leave the blue texture of the ball.

Save your objects and load them into Layout. Position the ball so that it intersects the box and set your camera so that you can see both objects.

Select the box and open its Object Properties panel. On the Render tab, click the "T" button next to Clip Map to open the Texture Editor. Change the Layer Type to Procedural Texture and the Procedural Type to the SHIFT_Boolean_Texture.

We now have a few options. Texture Value, Target Item, and In/Out.

Texture Value simply determines how bright the clip map will be. Since clip maps really only work with stark black and white images, lowering this won't really do anything. Go ahead and crank this value up to 100%. Lesser values will still work, but if you drop it all the way to 0%, it will have the effect of reversing the texture. So keep it at 100%.

Target Item. Since we've got our box selected, our target object will be the ball. Click the drop down and select Layer 2, the ball layer.

In/Out. This tells the procedural texture which way the normals of our Target object are facing. And this is the most important part of the setup. In order for the fake boolean to work correctly, the object that gets cut (in this case, it's our box) needs to have its normals facing outward. It already does, so we're fine. But the object doing the cutting (in this case, our ball) needs to have its normals facing inward. Currently, however, the normals of the ball face outward. Now here's the thing. We could go back to Modeler and flip the polys. But an easier way is to simply turn on Double Sided in the Surface Editor.

With the Clip Map Texture Editor still open, open up the Surface Editor. Click on the Ball surface and check the Double Sided checkbox. Close the Surface Editor.

Now that we know the normals for our ball are facing inward, go back to the Clip Map Texture Editor and change the In/Out setting to In.

Click "Use Texture" to close the Texture Editor, then change your object to the ball in Layer 2. Open up the Clip Map Texture Editor for this object and apply the SHIFT_Boolean_Texture. Once again, ramp up the value to 100%. Change the Target to Layer 1, the box layer. And since we know that our box's normals face outward, set the In/Out property to Out.

That's it. You're done! Do a test render and you'll see that the ball is now cutting away your box.

Scene files are attached for your convenience.

Cheers!

Steve
__________________
Author: ZBrush ZPipeline Guide for LightWave
Co-Author: Essential LightWave [8] / v9
Co-Author/Editor: LightWave Tips and Tricks

www.stevewarner.com

Last edited by Steve Warner : 07 July 2003 at 07:42 PM.
 
  07 July 2003
Between the 2 plugins I definitently prefer the second one, Fake_Shift_Bool. Its faster and easier to use and I can do all the same things I can with the Fake Boolean Texture.
__________________
Shirow Project Webpage
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:07 PM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.