How to import fully 3D objects (Final post)

@Ignatz Terrific work!

I really like the 3d chair model. Someone needs to make an eXtreme Sitting sim game. :slight_smile:

There are lots of models for household furniture and other objects on the net.

But the problem with chairs is the people sitting in them. Finding good models of people is hard enough without trying to get them to move about.

Too many vertices to map and apply textures to. Thatā€™s why animators use motion capture. And my animations look like South Park. First season.

I have a friend that likes to design 3d models of buildings for one of the Sim games. Theyā€™re just standing still and sometimes heā€™s screamingā€¦

lol, Iā€™ve been billboarding (using 2D images and turning them to always face the camera). This works well for trees but not so well for living thingsā€¦

So I figure vehicles are best because at least they donā€™t changeā€¦

@syntonica - @John had made a cool entry for Ludum Dare where you had to get down stairs by breaking the chair and not killing yourself at the same time. It was really cool. Sadly, I canā€™t find it.

Hi @Ignatz,

Still making great strides in the 3D area - now into sound - very impressive!!!

Not much into animation myself, but to add a little more realism - you need to make the prop rotate and move the landscape - the latter should be easier if youā€™re in a Sky box. I think you are down to the model for the prop - Blender has these facilities built in but I havenā€™t even tried to use them.

Keep up the great work - Iā€™m still trying to understand your 3D code and models in general.

Bri_G

^:)^

@Bri_G - the landscape will move when the plane moves - at the moment itā€™s pinned to one spot. The background is actually a complete sky sphere, and the plane is inside, so there is a 360 degree view.

wrt the prop, that is a problem, how to find those vertices in 20,000 others and then alter them, but Iā€™m not trying to make a finished game, so Iā€™m not bothered.

Iā€™m not sure if ā€œtrying to understandā€ includes 3D in general, wrt OpenGL. If so, I started writing an ebook on 3D in Codea. I havenā€™t got terribly far because Iā€™m figuring out which way to approach it, but the basics are there. See below.

https://www.dropbox.com/s/6rkqoqvvj7zhwhz/3D%20in%20Codea.pdf

I also did a blog post on how the models are put together, here

http://coolcodea.wordpress.com/2013/12/13/139-importing-full-3d-models-into-codea/

I added a cloud effect, discovered almost by accident.

https://www.youtube.com/watch?v=DOt0mp9oJ0U

Itā€™s really simple, just two white rectangles, one in front of the aircraft, and one behind, with the alpha value cycling up and down to create transparency, with some random variation.

It gives quite a nice impression of swirling misty cloud even though each frame is a single colour.

@Ignatz is there anything you could do with noise to make it looks like youā€™re travelling through a 3D cloud at speeds

@Ignatz Couldnā€™t you make the propellers a different object, and rotate them that way it looks like they are working? But great work!

Funny you should mention propellors. I spent several hours this evening finding the propellor vertices in 25000 rows of data and extracting them to separate meshes so I could rotate them, as shown below.

http://www.youtube.com/watch?v=L_3LuVZLdcY

It looks better on the iPad because video recording slows FPS.

Real cloud is possible but if I want to add other planes, I have to watch the strain on FPS.

=D>

@Ignatz - Good work fella! Ideally, youā€™d delete the vertices of the prop and just put a 2d plane where the propeller blades are. You can then prep an image like the one below and map it to the plane:

The trick then is to animate it with a very slow rotation (and perhaps vary the opacity with a slow random change via the noise function) to give it a degree of realism.

This is a standard 3D ā€˜cheatā€™ to fool the eye into thinking youā€™re looking at a very fast rotating object - the motion blur is pre-computed in the propeller image and works surprisingly well.

Iā€™m a huge fan of optimising effects such as this in 3D, especially where resources are a bit tight. You could also poly-reduce your spitfire model significantly to keep your FPS high as high as possible.

Thereā€™s also other cheats Iā€™d recommend, I might write a list over the weekend and post a few ideas. :wink:

@andymac3d - all advice is very welcome, thank you!!

@andymac3d iā€™d love reading your advices!

Iā€™ve got the plane flying (with some basic quaternions managing rotation), and drew myself a spinning propellor

https://www.youtube.com/watch?v=63e3efa4XNg

Andrew Stacey is working on flight controls so I expect to improve what I have here, but I like it already!

Iā€™ll post code as soon as we have all this sorted out. At the moment, the code is pretty messy.

Very impressive! I wonder if it will wok on ipad1, thoughā€¦

Dog fighting!

Thatā€™s where Iā€™m headingā€¦

Amazing work, keep it up! Could be the one to release Codeaā€™s first full 3D game =D>