Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Reference object for 3D texture

Reference object for 3D texture

2004-02-18       - By Dave Lajoie

 Back
Reply:     1     2  

Hello Jim, the idea is to create a spatial texture projection before the deform
operator is applied. by making the deformation at the top of the operator stack
, the deform will "move" the 3d texture spatial with it.

in case the spatial texture operator and deform has been created already,
simply open Scene Explorer and DnD the spatial texture projection operator onto
the deform op, that will put the texture op at the top of the stack, thus
ignoring the deformation

if you Dnd the deform op onto the Texture op, that will make the deform op be
at the top of the stack, which will deform spatial UVs as well.

' create a sphere, apply a spatial texture, apply a deform op
CreatePrim "Sphere", "NurbsSurface"
CreateProjection "sphere", siTxtSpatial, siTxtDefaultPlanarXY, , "Texture
_Projection"
ApplyShader "Material\Constant", , , , siLetLocalMaterialsOverlap
SIApplyShaderToCnxPoint "Cell", "sphere.Material.Constant.color"
ApplyOp "Twist", "sphere", 3, siPersistentOperation
SetValue "sphere.Material.Constant.Cell.max.x", 1
SetValue "sphere.Material.Constant.Cell.max.y", 1
SetValue "sphere.Material.Constant.Cell.max.z", 1

' at this point, the deform op is the last one applied, so it will deform the
uvs as well.

' DnD the texture op onto the deform op, the deformation will make the texture
swim
CopyPaste "sphere.surfmsh.cls.Texture_Coordinates_AUTO.Texture_Projection
.GeoTxtOp", , "sphere.surfmsh.twistop", 1

' dnd the Deform op onto the texture op, will make the deform op at the top of
the stack , which will deform the UVs as well.
CopyPaste "sphere.surfmsh.twistop", , "sphere.surfmsh.cls.Texture_Coordinates
_AUTO.Texture_Projection.GeoTxtOp", 1

I hope this helps
dave.


-- --Original Message-- --
From: owner-xsi@(protected) [mailto:owner-xsi@(protected)]On Behalf Of Jim
Rothrock
Sent: Wednesday, February 18, 2004 4:30 PM
To: XSI@(protected)
Subject: Reference object for 3D texture


I want to put a 3D procedural texture on a deforming object.  The texture needs
to remain locked to the object as the object deforms.  I have mental ray
shaders for doing the rendering, but I need to know how to lock the object
-space vertex coordinates of the original "reference" object into the texture
coordinates associated with each vertex of the deforming object.  In Maya, I
would simply select the object, then click on the "create reference object"
menu entry.  The vertex coordinates of the reference object would then be
stored in one of the deforming object's texture spaces.  In RenderMan, this
technique is sometimes referred to as "PRef," because it can be implemented by
providing a PRef (P Reference) varying parameter that is interpolated along
with the P parameter.  How can I accomplish a similar effect in XSI?
--
Jim Rothrock | jimr@(protected)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">


<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff size=2>Hello
Jim, the idea is to create a spatial texture projection before the deform
operator is applied. by making the deformation at the top of the operator stack
,
the deform will "move" the 3d texture spatial with it.</FONT></SPAN></DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff size=2>in
case the spatial texture operator and deform has been created already, simply
open Scene Explorer and DnD the spatial texture projection operator onto the
deform op, that will put the texture op at the top of the stack, thus ignoring
the deformation</FONT></SPAN></DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff size=2>if
you
Dnd the deform op onto the Texture op, that will make the deform op be at the
top of the stack, which will deform spatial UVs as well.</FONT></SPAN></DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff size=2>'
create a sphere, apply a spatial texture, apply a deform op</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>CreatePrim "Sphere",
"NurbsSurface"<BR>CreateProjection "sphere", siTxtSpatial, siTxtDefaultPlanarXY
,
, "Texture_Projection"<BR>ApplyShader "Material\Constant", , , ,
siLetLocalMaterialsOverlap<BR>SIApplyShaderToCnxPoint "Cell",
"sphere.Material.Constant.color"<BR>ApplyOp "Twist", "sphere", 3,
siPersistentOperation<BR>SetValue "sphere.Material.Constant.Cell.max.x",
1<BR>SetValue "sphere.Material.Constant.Cell.max.y", 1<BR>SetValue
"sphere.Material.Constant.Cell.max.z", 1<BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=870374721-18022004>' at
this point, the deform op is the last one applied, so it will deform the uvs as
well.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=870374721-18022004>' DnD
the texture op onto the deform op, the deformation will make the texture
swim</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>CopyPaste
"sphere.surfmsh.cls.Texture_Coordinates_AUTO.Texture_Projection.GeoTxtOp", ,
"sphere.surfmsh.twistop", 1<BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=870374721-18022004>' dnd
the Deform op onto the texture op, will make the deform op at the top of the
stack , which will deform the UVs as well.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>CopyPaste "sphere.surfmsh.twistop",
,
"sphere.surfmsh.cls.Texture_Coordinates_AUTO.Texture_Projection.GeoTxtOp",
1<BR></FONT></DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff size=2>I
hope
this helps</FONT></SPAN></DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff
size=2>dave.</FONT></SPAN></DIV>
<DIV><SPAN class=870374721-18022004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
 <DIV class=OutlookMessageHeader><FONT face="Times New Roman"
 size=2>-- --Original Message-- --<BR><B>From:</B> owner-xsi@(protected)
 [mailto:owner-xsi@(protected)]<B>On Behalf Of</B> Jim
 Rothrock<BR><B>Sent:</B> Wednesday, February 18, 2004 4:30 PM<BR><B>To:</B>
 XSI@(protected)<BR><B>Subject:</B> Reference object for 3D
 texture<BR><BR></FONT></DIV>
 <DIV><FONT face=Arial size=2>I want to put a 3D procedural texture on a
 deforming object.&nbsp; The&nbsp;texture needs to remain locked to the object
 as the object deforms.&nbsp; I have mental ray shaders for doing the
 rendering, but I need to know how to lock the object-space vertex coordinates
 of the original "reference" object into the texture coordinates associated
 with each vertex of the deforming object.&nbsp; In Maya, I would simply
select
 the object, then click on the "create reference object" menu entry.&nbsp; The
 vertex coordinates of the reference object would then be stored in one of the
 deforming object's texture spaces.&nbsp; In RenderMan, this technique is
 sometimes referred to as "PRef," because it can be implemented
 by&nbsp;providing a PRef (P Reference) varying parameter that is interpolated
 along with the P parameter.&nbsp; How can I accomplish a similar effect in
 XSI?</FONT></DIV>
 <DIV><FONT face=Arial size=2>--<BR>Jim Rothrock | <A
 href="mailto:jimr@(protected)">jimr@(protected)</A></FONT></DIV><
/BLOCKQUOTE></BODY></HTML>