3d model

Previous topic - Next topic

mars_chaos89

can any1 teach me how to put a mark on my 3d model?and how can i save it?

when i try to view my model it took like half an hour to view the model. i think maybe it because of the model large size(43.7mb).do you guys know how to make it more faster?

mentalthink

HI mars, I think is a bigger model in the weigth, probably you can watch but if you tray to move rotate, the FPS will down very much.

When I make something in 3D, I divide the model or scene in parts, triying to modeling whit the minus polygons how as posible.

I stay making probes and about 3000 4000 polys whit textures of 1024*1024 runs fines, above 5000 polys the geometry turn a bit more slower.

Best regards,
Iván J.

PS:Think what, in example, models about 2Mb of weigth, in my iPod took aboout 35 40 seg to view a geometry with textures , a model of 40Mb is very hardest, and you have in mind, if the application goes to Apple Store, the limit what are beetwen standard for apple aprobe the app, is about 40MB 50Mb (this is commnent on Unity Forums), you can see how work your iPhone whit the Application "Instruments" on your MAC.

Best Regards,
Iván J

mars_chaos89

hi ivan..
currently i develop the application on windows os and i hav no intention to use it on  iphone or mac....im still new in GLBaisc actually just started using it about 3 weeks ago...and about the model.i hav no authority to change anythng...

mentalthink

ok, Mars, I think was confused, I thinked what do you want for iPhone.

Well I think is very heavy model, in PC, I don´t make probes in 3D
If you can´t touch the model, well, the unique solution,I can tell you, is and  if you don´t modeler, or don´t know how to use a 3dsoftware, use some optimizer software, and try to reduce the mesh to the max without loose the basic geomtry.Whit this you can go down too much the size in bytes of your model (I hope).
Sorry but I don´t occurs nothing more.

Good luck,
Iván J.

Cliff3D

I'm not a GLBasic guru - far from it, I'm just trying to get back into programming after years and years of not doing any - but I think that the more information you give, the easier people will find it to be able to help you.

For example - the model youa re loading. What file format is it in? If it's text-based rather than compressed binary, that might have a direct effect on the speed. What are you trying to load it INTO? A GLBasic program that you are writing, or the GLBasic "Convert3D" program, or...?

What EXACTLY do you mean by "putting a mark on it". This is unclear especially if you are not supposed to change anything. Do you mean changing a texture (so... if it's a model of a house, that would be like painting on a wall) or changing the 3D to contain some custom ID/Logo/3D glyph of your own, or "watermarking" the model in such a way as to be able to prove ownership/copyright in a court of law, but undetectable to people who might break the copyright and pass it around?

The more info you provide, and the clearer (less ambiguous) you are, the easier it will be for people to suggest possible solutions, or at least avenues to explore. IMHO :)

mars_chaos89

sorry...

the program is that it view a 3d model which is in my case it is a plane model.the model is create by another person(plane.3ds).so i convert the model to*.ddd by using the ac3d software.the program that i want to create is that to view an access the damage on the plane by putting a x-mark on the model to indicate that that part of the plane is damage. Right now the problem is that i cant put the mark on the plane and i dont know how to save the data...


Cliff3D

#6
OK. Well, I haven't had time to pull out a 3d Plane to illustrate this post with so bear with me.

I'm going to assume that you're not all that up on 3D models, so if you know more than I assume then this post will probably sound patronising - for which, apologies. You can skip the "early learners" bit by jumping to the bit labelled BACK TO THE POINT :)

3D models can contain a lot of data in a lot of different guises. for example, there's the basic 3D shape of the model. Vital, obviously, can't be done away with or ignored or worked around - it must be there. A lot of the other bits, however, can be done in different ways and it's very difficult (beyond my skill) to offer an all-ine "Oh, this is the wya you do it" for EVERY style/type of model. even every style/type of model made in the same program.

In your specific case, you have a plane that you want to "paint" a big red X on, as I understand it. That will either be very easy or very difficult, depending on how the model was made. The crucial issue comes from a problem that cartographers have known - somewhat in reverse - for centuries. If we study their problem, they have a somewhat spherical shape (the Earth) which needs to be flattened out in order to fit neatly onto a sheet of flat paper for people to look at cnd call "map". The problem is that an unwrapped shphere doesn't actually fit on a flat plane very well at all, without hugely stretching it in some parts and squashing it in others. Alternatively, the cartographer could perhaps have a lot of holes in the map - imagine flattening orange peel or apple peel onto a page and sticking it in place. But then there would be these strange gaps between bits of land and sea. to make it worse, the surface of the Earth isn't even smooth - it's all bumpy giving rise to the same problem at lower and lower scales too.

Cartographers have come up with a few specific and rather ingenious ways to display the Earth with the minimum distortion that they can manage (there isn't just one - the default "map of Earth" isn't that great, there are versions which improve/decrease the amount of distortion so that the overall size of countries/areas is more balanced).

With 3D models, there's a very similar issue in that there needs to be a way to place a texture - a 2D picture - onto the model in order to create the surface colouration of the model correctly - and it needs to be as distortion-free as possible (to make creating the texture as simple as possible and to make the results as realistic as desired). again, this often results in some distortion on the texture so that the texture does not look exactly like a photo of the model, but (at least) like a warped one. The way that the 3D model co-ordinates correlate to locations on the texture image is called "UV Mapping" (see the cartographer connection there?) and it's this mapping that makes answering your question... tricky.

BACK TO THE POINT - in the case of an airplane, the modeller could have done any one of several things. He might have NO mapping at all, and modelled the aircraft with incredible detail, such that each different "material" on the plane is modelled in a different virtual "material", and each piece is simply coloured e.g.

Glass - all the parts made out of glass use this material
WhiteMatt - all the parts made of white matt materials use this
WhiteGlossy - you're getting the point here.

If the modeller has done this, and there is no UV Mapping, then you are going to have a hard time putting a big red X anywhere.

Alternatively he/she may have used planar mapping - that is to say that perhaps a photo of the plane from left and right is just projected onto the side. Examine any bitmaps you have that came with the plane, if you see images like that then you should be able to paint an X anywhere you like, within reason.

Yet again they might have made the mapping on a small segment of plane - say an aisle/window segment of the fusilage - very detailed, but then "tiled" that over the length of the plane. In that instance putting an X next to one window would likely repreat the X over all windows...

Yet ANOTHER way they could have done it is to perform a cylindrical mapping of the plane, perhaps improving on the basic cylindrical mapping technique with some unwrapping and fudging about. If that's the case then again you should be able to spot that by looking at any bitmaps that you have for the plane and see if any of them look like a neatly flattened plane.

There are probably alternatives that I haven't thought of - but the upshoot is that without actually seeing the model, a fixed specific answer is going to be tricky. The only single answer I can imagine is that you produce a 3D model of an "X" to include in the scene with the plane, such that the X can be moved into position and sized appropriately.

I hope that's not too discouraging, sorry I didn't have time to try and draw any of it out (actually one of the reasons I'm here is to learn GLB well enough to make some tools that might help me explain some of these issues better!)

Cliff3D

#7
Here's a quick video/animation showing how a 3D cube might be mapped to a flat plane for drawing on. Throughout this animation the cube is rendered using the texture bitmap that is actually shown in the last frame, as the box "unfolds" to lay itself out onto a flat plane to visually demonstrate how the 3D and 2D link together.



Obviously, even a sphere would have a much more complex texture bitmap, with either a lot of stretching or a lot of "tears" as the model is flattened. An aircraft is considerably more complex than a sphere, so it's VITAL to know how the aircraft was constructed in order to answer how to paint a mark on it :)

Please accept my apologies if any of this is considered a bit low grade - I myself am quite visual, so I learn a lot more by "seeing" than by "reading".

mars_chaos89

tq for the information...i think i have a view on how to do marking...

but when we export the 3ds file format to *.ddd file the texture is change right cliff3d??
is there any way or a software that can help me keep the texture or create the texture file from the model(*.bmp) after i export it ?

currently im using AC3D to export the file....
and if you havent had time to pull out a plane maybe you you can just show me with just a simple 3d object( such as sphere or donut)...

Cliff3D

The texture certainly should not change! The UV mapping should remain constant. I have not looked at the .ddd format yet - I prefer .OBJ as a 3D container so I am trying to write some .OBJ handling capabilities - but even if it does incorporate the bitmap texture, that would simply mean you have to paint/mark the x on the bitmap before converting to .ddd?

How do you see the workflow - are you hoping to write a program that will let the user place an X on the model at runtime, at will?

Most other issues really hinge on the way the model is built - the way the UV Mapping has been done is CRUCIAL. trying to respond is like trying to tell you how to raise a lifeform without knowing if it will be an amoeba, a daisy, or a lion (or indeed one of the other of the millions of lifeforms around).

If the plane has more than one bitmap associated with the texture then - you currently have no choice but to change the model. Because the only 3D format I am aware of GLBasic supporting at present - .ddd - does not support multiple texture files. There are some sortof good solid reasons for this if you consider GLBasic in light purely of writing games.

It really does come down to how the model is constructed - and I can't see that without seeing some files or at least some images of the model being worked on :(

Can you show us the UVMap?

As for painting on a texture map - tha tCAN be fairly easy. Look at the last frame of my little animation - that's a texture map. If you paint on a face then what you paint will show up on the sube seen in the first frame. Replace "f1" on the texture with "Cliff3D" and the cube will have "Cliff3D" on the front surface :)

mars_chaos89

yup...that is what i want to do.....

i try to upload the 3ds file but i failed each time i try..

Cliff3D

#11
Hmm....I'm not an expert on uploading or good sites to upload files to, but perhaps a different route? If you can make a UV Map you can show us the bitmap of that...

If you don't have any tools, uv mapper classic is free (and worth every penny) from : http://www.uvmapper.com/downloads.html

There are probably other free alternatives that are even better. You would need to save your file as a .OBJ for UVMapper and then load it into UVMapper and save a template as a .bmp, then convert THAT into a .png or .jpeg or .gif, and upload that for us to see. That wouldn't be as good as "the model" to decopher, but it might be better than nothing! :)

mars_chaos89

#12
thanks for the info...

is this the texture file that usually use with the *.ddd file, cliff3d?


mars_chaos89

this is the uv map of the plane

[attachment deleted by admin]

Cliff3D

#14
Thanks for that UV Map - that greatly clears things up and makes it easier to give specific answwers that are a bit less...wooly :)

Quote from: mars_chaos89 on 2010-Sep-08
is this the texture file that usually use with the *.ddd file, cliff3d?

No, that is a "texture map". Imagine your aircraft is a plastic model kit, but instead of painting it you have to colour it JUST by applying stickers. Hopefully stickers which are included with the kit. The "texture Map" shows the layout that those stickers would have to be in order to fit the plane - if you paint on that texture map then you can apply it in GLBasic (or any halfway decent 3D program) to realise a textures aircraft. If this is the first bitmap you have seen associated with the plane then you may have a lot of work to do to fill in the other details!

As you seem to be just starting with 3D, you MAY find a 3D community (like the one at www.daz3d.com) to be quite helpful.

The manner of UV mapping used in your aircraft is quite clear now. To mark an "X" you would need a bitmap similar to the template - possibly created by painting over the template - and you'd paint you "X" to mark the spot.

Finding the relevant spot should be fairly easy, as the modeller has use the most simple, basic form of mapping - the whole aircraft is mapped using a split "plan" mapping. It isn't "unwrapped" - like my box example above - at all, it's just planar mapped from above and below.

HOW THE TEXTURE/BITMAP WILL APPLY TO THIS MODEL

OK, 3D novie. Hmmm.... imagine you have two lightbulbs - no, make that light panels, as long and wide as the plane. The plane is suspended with one light panel beaneath it, shining light upward, and one light panel above it shining light down. With me so far? Between each light and the aircraft was lay out a large sheet of acetate and draw our design on it - company logos, surface details which have not been modelled, and our "X marks the spot". Let's say we have a lot of sweeping "go faster" red lines. The light panels will project the colours from the acetates onto the top and bottom of the craft.

PROS

This mapping is very easy to do (it's a button click or two) and very easy to understand.

CONS

This mapping is as poor as it is quick. It causes problems. In this instance two leap out :

1. If your X is halfway down the side of the fusilage of the plane then part of your x needs to be on the top half of the template (the right-hand plane wireframe on your texturemap, I think) and the other part of your X will need to be on the matching part of the lower half. You may need a lot of trial-and-error to get these right if you do not use expensive 3D painting software. This problem is called a "texture seam", and the seam is placed in an awkward location - running down the left and right sides of the craft, from the looks of it.

2. Smearing is what we usually call the second problem this aircraft will suffer from. At the top of the plane - where the model is effectively parallel to the lightpanel in our example, the texture will transfer excellently from the image to the plane. However, the nearer we get to the side of the plane, the steeper the angle is between the plane geometry and the texture/acetate - until at it's shearest the plane's side is effectively at 90 degrees to the texture - at which point a single pixel-width of texture running down the texture map of the plane could convert into a several-feet-high smear on the model. Imagine the tail fin as perhaps the best example - there is no way to put a logo or "X" on there because the planaer top/bottom mapping simply does not allow it.

Now, I don't know the .ddd format, but I have quickly converted a .3DS aircraft to .ddd and judging by the file size it does not include the texture, no - so A texture bitmap would need to accompany the .ddd model. Personally, I would recommend that you remap the .obj version of the model to use planar mapping from left to right, split in half, rather than a top/bottom split, as this will make it easier to paint details on the side of the plane - but that is only a personal suggestion. I'm currently learning GLBasic myself - I'm on tutorial 10! - so I'm not familiar with much of its workings. The main thing I know about the .ddd format is that it does not hold models as complex as I would like, so I'm writing my own model import function. I'm pretty sure that there's a "3D model viewing" tutorial or example somewhere in the help though (check my sig for some useful tutorial sites) so I would advise trying that out to see how the aircraft actually looks with that texture map applied. Lots of trial and error, basically!