Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: how to create a mask.  (Read 2963 times)
vsleepy
Customers
Community Member
*****
Posts: 247


« on: August 16, 2007, 05:19:24 AM »

given a planar mesh with a concave hull, how can i produce a texture that is the mask of that mesh? I could do it with a rendersurface and a camera, but how to get the bounding correct. Also the camera would need to be free of perspective effects...

I'm basically trying to create a alpha mask from a given direction of a mesh (normal to the plane in this instance)...

anybody done this?




« Last Edit: August 16, 2007, 05:44:16 AM by vsleepy » Logged
Eric
Customers
Community Member
*****
Posts: 808


« Reply #1 on: August 16, 2007, 08:25:05 AM »

just out of curiosity, what do you need this for?
Logged
vsleepy
Customers
Community Member
*****
Posts: 247


« Reply #2 on: August 16, 2007, 09:15:48 AM »

basically a first stage in an alpha mask for a shader. for exampe an auto generating alpha mask for zak's ocean shader.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4971


WWW
« Reply #3 on: August 16, 2007, 09:54:07 AM »

Actually yes Rendersurface and an Isometric camera seems to be the only easy way.
As for the bounding : you just put the camera in the center of mesh bounding sphere center, and add the sphere radius/2 to the y component. Then you just have to find the right "zoom" for the Isometric camera
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
vsleepy
Customers
Community Member
*****
Posts: 247


« Reply #4 on: August 16, 2007, 07:20:22 PM »

thanks sylvain, i didnt know you could define an iso camera, thanks for the tip.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks