place object on UV @ x,y

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  09 September 2009
place object on UV @ x,y

If I have an object with a clean UVmap like a plane or something and I want to place a object at UV coords nX,nY is there a quick way to get me there. Or do I always have to go through querying the mapfaces, and get the meshfaces from that then use the bary to get the exact position?!

Basicly I want patchDeform but for poly objects. Quickly query a UV position on a mesh, and with quickly I mean it should be able to handle 100 nodes in realtime. Patchdeform handles that perfectly but it's a compiled plugin offcourse.

Any pointers would be great!

-Johan
__________________
Online: LinkedIn
 
  09 September 2009
I did something like that a while ago,
you can build a mesh from the uvw channel
or simply copy the uvw channel to the mesh channel
then fire a ray at the wanted uv coordinates and you get the index of the face
and barycentric coordinates on it which you can convert to actual position on the original geometry.
 
  09 September 2009
Matan, I thought about something like that, but how fast is it, I'm talking 100 objects moving constantly. I will definitely look into it though, thanks! Really would like to not use patches, since they're so poorly supported in max/maxscript.

-Johan
__________________
Online: LinkedIn
 
  09 September 2009
Originally Posted by JHN: If I have an object with a clean UVmap like a plane or something and I want to place a object at UV coords nX,nY is there a quick way to get me there. Or do I always have to go through querying the mapfaces, and get the meshfaces from that then use the bary to get the exact position?


do you want to calculate [X,Y,Z] position using [U,V] position as quick as possible?
 
  09 September 2009
Hi Denis, yes that is basically it. I know for my particular case I always have a homogeneous UV set, so no 2 faces sharing the same UV. I know I can query UV's with the mapfaces etc. But I worry about the speed when it's done a lot.

-Johan
__________________
Online: LinkedIn
 
  09 September 2009
Originally Posted by JHN: Hi Denis, yes that is basically it. I know for my particular case I always have a homogeneous UV set, so no 2 faces sharing the same UV. I know I can query UV's with the mapfaces etc. But I worry about the speed when it's done a lot.

-Johan


it will be quick enough if you will do all calculations on tri mesh level using meshop interface
 
  09 September 2009
You'd fire a ray or use the mapface route?

Thanks,
-Johan
__________________
Online: LinkedIn
 
  09 September 2009
Originally Posted by JHN: You'd fire a ray ?

Thanks,
-Johan



of cause not! calc [u,v,0] point to bary -> bary to [x,y,z] point ...
 
  09 September 2009
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:59 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.