Is the P in sop vop type different with it is in vop?
I created an attribute in sop vop type, so, does each P on the model has the attribute value? Does the P mean to the points on the model?
If this attribute is in the vop(to make shader), does P mean to shading point. not the P on the model?
Is there any way to convert my attribute on each P in model(sop type vop) to the shading P value? I want to use the sop type vop attribute to make the displacement shader, so I can visualize the attribute in the viewport, also use this attribute for displacement shader.
Thanks for any anwser.
is the P in sop vop type different with it is in vop?
5881 11 2- ykcosmo
- Member
- 288 posts
- Joined: 7月 2005
- Offline
- Tamis
- Member
- 58 posts
- Joined: 9月 2007
- Offline
P simply stands for position.
In SOP context it means Point Position.(sinse were essentially loop thrue all the points)
In shading Context it means the position on the model that corresponds to the pixel that is being rendered.
Be amazed of my Picture !
Pixels, Ray per pixel, Intersection Point AKA: Position “P”
Pixel||————————–>/X
Pixel||———————— >/XX
Pixel||————————>|XXX
Pixel||————————>|XXX OBJECT
Pixel||————————>|XXX
Pixel||————————->\XX
Pixel||————————–>\X
So “N” will mean the Normal of the object at that position “P”.
Or “Cd” Texture color at that position “P”
ect ect.
In SOP context it means Point Position.(sinse were essentially loop thrue all the points)
In shading Context it means the position on the model that corresponds to the pixel that is being rendered.
Be amazed of my Picture !
Pixels, Ray per pixel, Intersection Point AKA: Position “P”
Pixel||————————–>/X
Pixel||———————— >/XX
Pixel||————————>|XXX
Pixel||————————>|XXX OBJECT
Pixel||————————>|XXX
Pixel||————————->\XX
Pixel||————————–>\X
So “N” will mean the Normal of the object at that position “P”.
Or “Cd” Texture color at that position “P”
ect ect.
- Pagefan
- Member
- 519 posts
- Joined:
- Offline
- ykcosmo
- Member
- 288 posts
- Joined: 7月 2005
- Offline
- mark
- スタッフ
- 2598 posts
- Joined: 7月 2005
- Offline
ykcosmo
thanks for these information. but I still want to know how to convert attribute P in sop value into attribute shading P value.
In your surface/displacement shader, if you do:
vector pp = transform(“spacebject”, P);
Then pp will be in the same space as the SOP.
However, the initial space in a mantra shader is in “camera” space. So, the P in your shader is dependent on which camera you are rendering from. I hope this helps.
- Tamis
- Member
- 58 posts
- Joined: 9月 2007
- Offline
- mark
- スタッフ
- 2598 posts
- Joined: 7月 2005
- Offline
- ykcosmo
- Member
- 288 posts
- Joined: 7月 2005
- Offline
- mark
- スタッフ
- 2598 posts
- Joined: 7月 2005
- Offline
ykcosmo
vector pp = transform(“spacebject”, P);
hmm….. understand, so can I transform the P in vex into sop? from shading object P into sop P?
I want to use the displacement value to affect the model, then create attribute based on this value and emit particles.
Try the attached .hip file.
There's a displacement shader attached to the flat grid which transforms the P into “spacebject”. There's also a SOP which deforms the SOP's P using the same set of VOPs.
The image you render should be similar (but a little smoother) than the deformed geometry.
Oh, the grid is turned on for rendering, the deformation SOP is turned on for templating.
I believe this technique was first used in X-Men for Senator Kelly's death (since the heart monitors had to be animated to match the displacement shader).
- ykcosmo
- Member
- 288 posts
- Joined: 7月 2005
- Offline
- ykcosmo
- Member
- 288 posts
- Joined: 7月 2005
- Offline
- scottp
- Member
- 26 posts
- Joined: 11月 2008
- Offline
I would like to set the color of points to the color of a background image, as seen through the camera. I tried using the transform command, but it I don't think it works in a VOP SOP.
The spaces.hip example goes the wrong way for me (i.e. the shader converts camera -> object space). I need object-> NDC in a VOP SOP.
Any ideas?
The spaces.hip example goes the wrong way for me (i.e. the shader converts camera -> object space). I need object-> NDC in a VOP SOP.
Any ideas?
Scott Peterson, Machine Learning Graphics Engineer, Unity
-
- Quick Links