  | | | dot product? | dot product? 2004-06-04 - By Rick Walia
Back err sorry "θ" should be theta. Thought I was typing in html.
/R
Quoting Rick Walia <xsilist@(protected)>:
> I don't know if this will work but.... > > Since the dot product function is busted in the Vector to Scalar node: > > How about getting a scalar share node in your render tree and for the Input > param, > set a scriptedOp. In your scriptedOp you can say, do your calculations for the > dot product? > > You should be able to use the XSI Math functions for calculating the dot > product. > If that is broken too then you can always calculate it yourself: > u � v = |u| |v| cos θ > > Where θ is the angle between the 2 vectors. > > Maybe? > > /R > > Quoting Guy Rabiller <guy@(protected)>: > > > It should also be noted that a normalized dot product is [-1...+1] range, > > and if you want to see the full range of it you have to 'remap' the values > > to [0-1] range or else you will see 'half' of the effect. > > -- > > guy rabiller | 3d technical director @ LaMaison > > > > > > -- -- Original Message -- -- > > From: "Matt Lind" <speye_21@(protected)> > > To: <xsi@(protected)> > > Sent: Friday, June 04, 2004 9:19 PM > > Subject: RE: dot product? > > > > > > > If the docs say 'output' shader, then it's a misprint. It should say > > 'texture' > > > shader as texture shaders are the only class of shader that can be > > connected to > > > almost any other type of shader in the rendertree. Output shaders are > > only > > > called after rendering has completed and generally only deal with the > > image > > > buffers and whatever 3d information may be hanging around in memory that > > hasn't > > > been flushed yet. > > > > > > As for the dot product, the vector_state node doesn't compute dot product > > > correctly. What it computes, I don't know, but it certainly isn't the dot > > > product. This bug has been around since version one unfortunately. > > > > > > However, even if the dot product were computed correctly, you might run > > into a > > > different problem which may be the cause of the constant red color - you > > have to > > > make sure all your input vectors are described in the same coordinate > > space. > > > Primary (eye) rays are usually described in internal space where as > > geometry > > > normals may sometimes be computed in object space. If a vector is coming > > from > > > the wrong coordinate space, there's a chance it's value doesn't change on > > a > > > per-ray basis because it's frame of reference is local the to component > > your > > > querying which is why you see the constant red. It shouldn't matter which > > > coordinate space you choose to do the computations just as long all the > > vectors > > > are described in the same coordinate space. > > > > > > > > > Matt > > > > > > -- ---- ---- ---- ---- ---- ---- --- > > > Matt Lind > > > Animator / Technical Director > > > Softimage certified instructor: > > > Softimage|3D > > > Softimage|XSI > > > Matt(at)Mantom.net > > > > > > > > > > > > dot product? > > > Date : Fri, 04 Jun 2004 12:57:24 -0400 > > > To : XSI(at)Softimage.COM > > > From : Sam Cuttriss <samc(at)quietman.net> > > > Subject : dot product? > > > > > > hello, im trying to use the dot product "Vector math scalar" node in the > > render > > > tree. > > > so i have an eyeray and a geometry normal vector state as inputs. > > > the dot product is just driving a gradient mixer so i can see whats going > > on, > > > but im just getting constant red? > > > > > > the dot product help refers to vector output shaders (bumpmap generator > > and > > > Texture Space Controllers) > > > > > > are vector state shaders not output shaders? > > > or is there something im doing wrong? > > > > > > i was expecting to see something similar to putting an incidence node > > directly > > > into the gradient mixer? > > > thanks > > > _sam > > > --- > > > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > > > unsubscribe xsi > > > > > > > > > > > > > > --- > > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > > unsubscribe xsi > > > > > > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi >
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |