|
|
vec_for_uv() return World Pos
#110861
02/05/07 17:18
02/05/07 17:18
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Could a function be created that returns the world position of the uv coord on a models skin? Or is there a work-around to do this that I havn't seen yet?
If this were implemented, then Users could create their own lightmaps/shadowmaps for their model levels. (My plan for this feature)
xXxGuitar511 - Programmer
|
|
|
Re: vec_for_uv() return World Pos
[Re: jcl]
#110863
02/05/07 21:34
02/05/07 21:34
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
My goal is to scan through the skin of a model, and do a trace to the sun pos to see if the light hits it. however, unlike the shadowmap gen. already made, I was planning on using it for more complex models with normals facing in any direction, such as on a sphere for example.
However, I could not find any way to get the position in world space from the models skin corrds. I was planning on using a black uv mapped skin, then using similar code to the previous terr. shadow gen.. Hoewever, that used the simple fact that the taerrain was "flat", or only on the x and y planes, I was hoping to use z also...
So my goal here lies that I need a way to take a texture, get which face the current pixel is located on, and get the world corrds of where that pixel is being displayed...
If I'm still not making any sense, please let me know...
xXxGuitar511 - Programmer
|
|
|
Re: vec_for_uv() return World Pos
[Re: jcl]
#110867
02/08/07 15:49
02/08/07 15:49
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
I was planning on using c-script, but I guess c++ is the way to go. Now to finally learn c++
Thank you Jcl for your support and replies. I will get started immediatly, and if it works, then I will upload it to the user contributions for free...
xXxGuitar511 - Programmer
|
|
|
|