3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2

Author Topic: What's better?  (Read 2024 times)

« on: May 06, 2011, 12:02:14 PM »
...If you want to export a model like a...fan and to have much performance what's better? An animated fan or to add from 3d rad a spin...  ??? (only for simple rotation)
Currently using 3d rad v7.12(hw)
pc specs:Core 2 duo e8600 @3.33 Ghz, 6mb cache
windows 7 32-bit
nvidia geforce 9500 gt 1024mb
4 gb of ram
160 hdd
« Reply #1 on: May 06, 2011, 12:07:53 PM »
Create the blade and the rest seperately and add a transform to rotate the blade.

jestermon

« Reply #2 on: May 06, 2011, 12:48:44 PM »
The performance is really minor in all cases.
The attached project uses two skinmeshes. One is attached to the car, and rotated by setting it's spin vector to 200. The other is located to the car and spun by script, Note: it is not linked to the car.
You can also use the transform object as silveman suggested.
You can also animate your mesh rotation with bones, or make a frame by frame animation.
So it REALLY does not matter which solution you use. There are a millon ways to peel an orange.
« Last Edit: May 06, 2011, 01:05:20 PM by jestermon »

psikoT

« Reply #3 on: May 06, 2011, 01:33:40 PM »
nice question...

So it REALLY does not matter which solution you use. There are a millon ways to peel an orange.

That depends on how many oranges you need to peel... ;D ;D
« Reply #4 on: May 06, 2011, 01:35:09 PM »
Oh...Thx anyway guys  ;) I will use the spin..
Currently using 3d rad v7.12(hw)
pc specs:Core 2 duo e8600 @3.33 Ghz, 6mb cache
windows 7 32-bit
nvidia geforce 9500 gt 1024mb
4 gb of ram
160 hdd
« Reply #5 on: May 06, 2011, 02:31:33 PM »
there's a little consideration being overlooked here and that is you can use the skinmesh default spin vector to rotate the fan only if its axis is perfectly aligned at X, Y or Z axis.

this is because the fan will rotate on the world axis and not local, meaning... if you rotate the fan skinmesh (for example: a lot aligned along a curve looking at the road) then fans will continue to rotate on world axis, ignoring their local orientation, and wont look good at all.

you can see this running jestermon's example and driving the car up some of the cliffs at the terrain, when the car is close to vertical the fan's blades of the fan rotated by the spin vector cross throught the car's body...

to overcome this... the only way is the scripted solution, fortunatly also included in jestermon's example.

so today's oranges are peeled one way only.

----------
btw, what I understand for the initial question is a comparision between using some 3drad animation (skinmesh spinvector or script) Vs. an animated skinmesh (frame by frame or bones), which answer I believe is use some 3drad animation will be better.
« Last Edit: May 06, 2011, 02:33:33 PM by loop »
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!

psikoT

« Reply #6 on: May 06, 2011, 02:44:25 PM »
well, another solution for a fan is using a skinmesh attached to a small RB, then link it to the main RB with a joint and use it as rotor... that's the technique I've used to make my hover... of course you will need a script to start/stop/control the rotation velocity but you don't need a script to make the rotation...

that's why I asked how many oranges you will have to peel... ;D

http://www.youtube.com/watch?v=JQcYuir4UXY
« Reply #7 on: May 06, 2011, 02:53:56 PM »
that dosnt looks very performance wise, and pretty cheap if you allow me criticize your work  :P
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!

psikoT

« Reply #8 on: May 06, 2011, 03:03:16 PM »
ooops! sorry, I thought it was very cool... ;D

about performance wise, let's talk in two years...
« Reply #9 on: May 06, 2011, 03:20:36 PM »
Komodo has a ton of rotating parts. The fan was really easy though.. just in 4 lines.. and seems to perform just fine

{//Rotate Fan
iObjectOrientation(OBJ_1408,qbod);
iQuaternionFromEulerAngles(qfan,0,0,time*100,"xyz");
iQuaternionMultiply(qfan,qfan,qbod);
iObjectOrientationSet(OBJ_1342,qfan);
}

« Reply #10 on: May 06, 2011, 03:26:06 PM »
about performance wise, let's talk in two years...

sure, whatever  :D

I'm just saying that... to begin with there are 2 extra objects (I'm not couting the main rigidbody as you have the boat), being those the fan RB and the rotor joint. I dont know how these impact on perfomance but I imagine they have to do something...

I would use your solution (partially, I'm not sure about the joint) if there were the posibility of crashing agaisnt the fan blades, but as scenary only.. IMnotsoHO there's not a single reason to involve RBs and joints.
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!

psikoT

« Reply #11 on: May 06, 2011, 04:21:26 PM »
it's my way to rotate things... the same concept I've used in the digger project: http://www.youtube.com/watch?v=bOpZl5U1wb8

I know it's a waste of resources but I felt too lazy to analyze tikiwiki jess' local2parent geek functions... ;D

jestermon

« Reply #12 on: May 06, 2011, 05:38:30 PM »
There you have it 1stSebi.
A million lines of answers to a 2 line question. And the solutions and options can grow, based on the game maker. Find whatever works for you, and master it, and spin your fans the way you want, Rush's 4 lines of code are the heart of good local rotations, even l2p is based on the simple concepts. Really worth studying and understanding, if you are into maths stuff. But even RB's are fine, if you want to go that way. It's the game that matters after all.
« Last Edit: May 06, 2011, 05:40:30 PM by jestermon »
« Reply #13 on: May 06, 2011, 06:06:50 PM »
and me here thinking this was about optimization!!  :D :D
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!

jestermon

« Reply #14 on: May 06, 2011, 07:19:20 PM »
You are correct loop - but performance was was only half of the question.
"... and to have [a] much [better] performance"
Since  one blade as apposed to hundreds, should have very little impact on performance, no matter what method used. Given, that a script may be a little slower than spin, and RB's maybe faster - (no test done to say which) - They all can be managed in under 1/60th of a second with ease; making the performance a no-issue in this case.

"[I wish to know this ...] (only for [use in a] simple rotation)" Is in my view, the real intention of the question.
But then, "context is in the eye of the reader" :P

« Last Edit: May 06, 2011, 07:33:30 PM by jestermon »
Pages: [1] 2