| |
Cybernator
Registered: Jun 2002 Posts: 154 |
3D stuff - need recommendation
I'm working on a glenz vector, and I need some recommendations about what techniques to use. I've already done one, which I'm not very pleased of. (I've read a lot of docs regarding 3D, if that matters!)
Ok, first of all I need a routine, which will be able to handle arbitrary coordinates of the vertices, ie. not just 1, 0, -1... It should be fast, and accurate enough to produce nice-looking effect. Now, I wonder which way to use for multiplying. Using a table f(x)=(x*x/4) is not very accurate, especially if I include the divide by 64 in it. If I use the mathematical way, it doesn't seem to have enough accuracy if I use an 8bit result (the original 16bit divided by 64). This is what I'm talking about:
x'=x*ma + y*mb + z*mc
If I divide each of the multiplies (x/y/z * ma/mb/mc) by 64 and add them up, it'll lose accuracy (at least that's what I get on screen). I may need to multiply and add everything and THEN divide by 64. But this needs 16bits, and that means even slower calculations.
I wonder if the loss of accuracy is maybe something else I'm doing wrong, thus I ask. Do you think the table should work ok, or is there any better method? I'd like to get something like the vectors in Attack of Stubidos III, or the transforming cube in Loaded/Fairlight (near the end, with the freak at the left :))
Well, this is all for now.
|
|
... 10 posts hidden. Click here to view all posts.... |
| |
TDJ
Registered: Dec 2001 Posts: 1879 |
I agree with Oswald here: there's no shame in asking other people for help. After all, the coding is only part, how you 'use' it is what's important and that's something you've got to come up with yourself. |
| |
Puterman Account closed
Registered: Jan 2002 Posts: 188 |
Oswald: Feel free to disagree with me, but I think some questions are completely out of line (like your question on linecrunching a while ago). Other questions are okay. To borrow your example, FLI: it's very easy to check someone else's code to find out how it works. Posting a question about it is just lame. |
| |
tecM0
Registered: Jan 2002 Posts: 40 |
puterman: so if you dont like the questions why not STFUP
and read something else?
btw., i thing looking someone else's code and doing it the
same way (this mostly ends up in doing it without knowing how
it really works) is even lamer than asking a question
and doing a own code with some simple hints.
tecM0 |
| |
Puterman Account closed
Registered: Jan 2002 Posts: 188 |
tecmo: My reasons for not shutting the fuck up and reading something else are probably similar to the reasons why you're not shutting the fuck up and reading something other than my posts. |
| |
Optimus
Registered: Jan 2002 Posts: 122 |
I don't think Cybernator's message is bad at all! It shows that he has already worked a lot on something and just stumbled upon some errors and asks for help. The replies and technical details of this thread are preety interesting for me and other newbie coders too I believe.
The definition of lame would be to come here and ask: "I am new in 6510. Could you please write pleaz pleaz pleaz a code for me, which does a 3d glenz cube and giving me the opportunity to move it with the arrow keys and change shading or texture with space? I can send you also the music to insert it into the demo and send it back to me please. Thanks in advance!" (Which reminds me some real letters with stupid programming requests (I actually got the inspiration for the message in the quotes from them ;) that I was once reading in an old greek computer magazine,.. ahhh those were the times :)
But Cybernator is a very motivated new scener and has done a lot alone, asking for recomendetion about his mistakes and not the code itself! |
Previous - 1 | 2 - Next |