CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 12-10-2011, 12:31 AM   #1
MrTom
New Member
 
MrTom's Avatar
portfolio
Gary Pitt
3D Artist
FGI Services
United Kingdom
 
Join Date: Mar 2006
Posts: 8
tangentBezier3D @ last/first spline segments. Random results?

Max 2010 SP1.
Re: tangentBezier3D @ last/first segment.



The image shows the results of obtaining the point3 tangent of a spline segment using tangentBezier3D.
There are four separate sets of results, those on the left use a 'param' value of 1.0, those on the right 0.99999.

Hopefully its evident to see that using a 'param' value of 1.0 gives different (random?) results each time, out of the four shown three of them are different, only the second and third 'run' gave identical results. I've even had it output "[-1.#QNAN,-1.#QNAN,-1.#QNAN]" as well but predictably it wouldn't when I needed a screen grab.

This seems to only happen with the last segment, all the others appear fine.

Is this something peculiar to Max 2010 SP1 or is it just me?
Does this also happen in later versions of Max?

If anyone can shed any light on this I'd very much appreciate it.

I've also asked this on Autodesk Area some 4 weeks ago but so far no joy.

Many thanks.
Regards.
__________________
The early bird may catch the worm, but it's the second mouse that get's the cheese.
 
Old 12-10-2011, 05:00 PM   #2
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,511
Send a message via ICQ to denisT
what the tangent is? i will not tell too much about the math but vulgarly it's a vector from p0 to p1, where p0 and p1 are first and next points on spline with some interval.
when you ask the last point on a spline (param 1.0) how can we get the next? no next - no vector - no tangent ...
the solution is to get not 1.0 path param but very close ~ 0.999 as you do in your sample.
 
Old 12-10-2011, 09:40 PM   #3
MrTom
New Member
 
MrTom's Avatar
portfolio
Gary Pitt
3D Artist
FGI Services
United Kingdom
 
Join Date: Mar 2006
Posts: 8
Thanks Denis, very much appreciated, i'm still a little confused though.

Are you saying that the last segment in a closed spline is treated as if it were the last segment of an open spline? If this is the case then by the same token wouldn't the first segment also suffer these random results for a param value of 0.0? Shouldn't I have to use 0.0001 as the param value for segment 1 in the same way?

The thing is, the results I get for the first segment at param 0.0 (in pink) seem to work out ok, both sides have exactly the same output.

I've also tried changing which knot is #1 but the problem just moves round with it, it's always the last segment in the spline.

Anyways, its not an issue for concern, 0.9999 will do for my needs, its more a curiosity thing than an actual problem. I'll just have to watch out for it in the future.

Thanks again.

Regards.
__________________
The early bird may catch the worm, but it's the second mouse that get's the cheese.
 
Old 12-10-2011, 09:40 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,480
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:59 AM.


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