Login | Register 
Products Applications Downloads Features Wiki forum Store
 

TOP -> SOP

Still a little green? Ask your beginner's questions here

TOP -> SOP

Postby vesabios » Fri Jul 03, 2009 11:46 am

we were trying to figure out how to make a pincushion style network without using the technique in the included example (which uses GLSL to offset the vert positions at rendertime)

right now, the only method i can figure out is using a TOP To CHOP to convert every row into it's own channel, and then either a) reformatting the chop so it's the proper format to use in conjunction with an Add SOP or b) access it directly using a Point SOP and a chopi() expression in the $TY field.

i thought there might be a way to apply the TOP to geometry using the Texture SOP, and then somehow access a single value from a texture correspondent to a point, but i've only been able to get to the UV coords using $MAPU,$MAPV.

so... is there any way to perform fast texture lookups in SOP contexts, before it gets to a shader?
vesabios
 
Posts: 30
Joined: Thu Apr 30, 2009 2:36 pm

Re: TOP -> SOP

Postby malcolm » Tue Jul 07, 2009 5:48 pm

You can also use the Channel SOP to convert CHOP data into SOP data.

Is the main issue here usability, or performance? The Channel SOP may be the easiest way to do this.

For performance the main issue here is that TOPs live entirely on the GPU, while SOPs live on the CPU. Reading data from the GPU back to the CPU is very slow (as you can see from the speed of the TOP to CHOP node). In the next build (coming soon) the TOP to CHOP will have the ability to do a delayed/asynchonous readback, which means the node will have last frame's data, but the node will cook much faster.

However doing the texture sampling and vertex attribute modification in a GLSL shader will be orders of magnitude faster than any of these solutions (which is why pushpins did it this way).

Thinking far into the future, we'll likely have a new breed of SOPs that live entirely on the GPU and are modified using CUDA/OpenCL. When these come around direct communication between TOPs/SOPs will be super fast.
User avatar
malcolm
Staff
 
Posts: 2183
Joined: Tue Nov 13, 2007 12:11 am

Re: TOP -> SOP

Postby obscura » Wed Jul 08, 2009 2:14 pm

yea performance is the primary concern, as the TOP To CHOP is pretty slow, and that's what i suspected... thanks for the info!
obscura
 
Posts: 25
Joined: Tue Jun 02, 2009 3:23 pm


Return to Beginners

Who is online

Users browsing this forum: No registered users and 1 guest