3d model

Previous topic - Next topic

mars_chaos89

then how can i create the texture map cliff3d?i try using the uv mapper profesional...but it fail..
i get the general idea...tq..but how to put the 'X' mark on the model...

and where did u learn your tutorial...im also still learning GLBasic right now...

Cliff3D

#16
Quote from: mars_chaos89 on 2010-Sep-09
then how can i create the texture map cliff3d?i try using the uv mapper profesional...but it fail..
i get the general idea...tq..but how to put the 'X' mark on the model...

Terminology - the bitmap which UV Mapper Classic (and UV Mapper Pro) produce is a guide - it shows you WHERE to paint to achieve the desired result. For example, if I wanted a white plane with a blue cockpit/front/nose and red wings, I would paint over the while image in white, but paint over the wings (seen clearly left-and-right on both sides of your texture map) in red and paint over the nose (at the top, both left and right) in blue. Voila!

The texture map is a map or guide, on a bitmap, to how the modeller has created the link between 2D bitmap and 3D model.

You have UV Mapper Pro? Must be version 3.x... not what I'd recommend buying but there we go. Load the model up in that, and then load as a texture the bitmap you showed earlier. Switch to 3D view (probably by pressing the tab key) and you'll be able to see where the texture map fits the 3D model. UV Mapper is designed, to a degree, to allow you to edit a bitmap and then try it out on the 3d model using a seperate (ANY seperate) paint program. It's not as good as (say) 3Deep Paint, but it's a cheap/free alternative.

Quote from: mars_chaos89 on 2010-Sep-09and where did u learn your tutorial...im also still learning GLBasic right now...

GLBasic comes with a help file that has tutorials in it - and my sig links to the official online help file. I'm trying to update some fo the tutorials (#10 is done, am semi working on #1 now) for the Wiki, also linked to in my sig.

bigsofty

Well done Cliff, you've spent a lot of time and patience helping out this new user. Its good to see.  :good:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Cliff3D

Well - you know what they say. An eye for an... no, that's not right. What goes around..? No... Ah! Do unto others! (treat others as you yourself would like to be treated, or somesuch). Others have helped me - it'd be churlish to join a community like this and NOT offer some help to others, if I can. IMO :)

mars_chaos89

it just the demo that i downloaded...can i do it with the demo version?




when i try to convert the obj file to the *.ddd file this error occur..

Exception occured in command ddd_export_plugin
Last Error(not necessarily the problem): Not enough storage is available to process this command.


do you know anything about this problem?
or maybe you know where i can find some coding to directly read from -obj or other files typer such as 3ds without converting it.

i dont understand how to use the 3Dconvert in the GLBasic editor...can you teach me about this also?





sorry for asking toooo many question cliff3D because i only can read your answer the next day due to the area time zone...
getting tense everyday due to this problem...help me!!!

Cliff3D

#20
Hi Mars (and I answer fairly readily to just "Cliff" or sometimes even "Oi! You!" ;)

I'll answer your latest queries out of order using quotes for context, if I may :)

Quote from: mars_chaos89 on 2010-Sep-15sorry for asking toooo many question cliff3D because i only can read your answer the next day due to the area time zone...
getting tense everyday due to this problem...help me!!!

If you're getting replies (from me or indeed anyone else) then you probably have not asked too many questions. You seem to be in a slight pickle because you are approaching two different types of topic - programming and 3D - at the same time. As Gernot warns in his help file, learning GLBasic AND 3D at the same time can be...ah...taxing ;)

Try not to get stressed. I myself suffer from a few ailments - including one that is like having multiple appendicitis, so it's good to avoid stress. This community seems pretty helpful overall, so it shouldn't be anything but a pleasure to post here. Don't rush it. Ask as many questions as you feel like - the worst I can do is not have the time, inclination, or knowledge to reply - which isn't so bad. Practically stress free!

Quote from: mars_chaos89 on 2010-Sep-15it just the demo that i downloaded...can i do it with the demo version?

Certainly! The free demo version of GLBasic is all that I am using to evaluate the language, and it seems to have two modes:

1. Free for non-commercial "lite" use. This is the basic functionality and is free for personal use. I havne't looked into whether programs are distributable simply because I'm not at that stage with the language yet - just fiddling about really, not quite sure it's good enough for what I want.

2. DEMO mode if you use any advanced features. For example, 3D commands are advances features so the programs you compile will run with an on-screen "DEMO" watermark for about 5 minutes.

In my spare time I am writing a .OBJ (Wavewfront 3d model .OBJ) reader in the free/Demo GLBasic. Here's some samples of how well it's going so far:





Quote from: mars_chaos89 on 2010-Sep-15when i try to convert the obj file to the *.ddd file this error occur..

Exception occured in command ddd_export_plugin
Last Error(not necessarily the problem): Not enough storage is available to process this command.


do you know anything about this problem?

It SOUNDS like you've not got enough hard drive space (or possibly memory, but hard drive space would be my bet) to save the .ddd model to - check for space on the destination and also temorary workspace drives/partitions.

Quote from: mars_chaos89 on 2010-Sep-15or maybe you know where i can find some coding to directly read from -obj or other files typer such as 3ds without converting it.

As mentioned above, I'm working on a .OBJ reader. It's going slowly because I'm only meddling about when I have free time. There's a slightly buggy version in the thread at: http://www.glbasic.com/forum/index.php?topic=4908.0 which you could give a try to see if it will load the plane for you.

One of the major reasons I'm writing it is because I couldn't find any other support for .OBJ models. I'm afraid I don't know of any .3DS support as that file format interests me less :(

Quote from: mars_chaos89 on 2010-Sep-15i dont understand how to use the 3Dconvert in the GLBasic editor...can you teach me about this also?

Sadly, this is the area where I personally am weakest - *.ddd format files interest me even less than .3DS files, so the only time I have loaded up the converter has been in response to a post from you :(

However, if it's quitting with an error that does suggest either a problem with the model, the drive space available, or with the conversion process itself. Try my simple model viewer (don't forget to change the name of the texture in the source code) and see if that can read the .OBJ model in OK.

Cliff3D

#21
I've tried uploading a "Library" version of my current code at:

http://www.glbasic.com/forum/index.php?topic=4908.msg38735#msg38735

which works okish with single texture models (which I suspect yours is/may be) to produce on-screen imagery like this:



from a .OBJ file (no file conversion to .ddd!). Beware! As I am still writing this, there could be all SORTS of traps for the unwary! I've also included code showing how to call the library and how to display the .OBJ model in 3D. Hope it helps!

mars_chaos89

#22
tq for the obj reader cliiff...
i think you misunderstand something cliff...the demo version is not the GLBasic but the UVmapper professional...
its true that we easily get lost when trying to learn 3d and programming...
and i think i want to focus on the programming 1st because that is the only thing i can change right now

what i am trying to do is something like the one you showed me (the aeroplane example).but i need to add the 'x" marking and saving the data(where we mark at the model)....this is basically what im trying to do right now..

i downloaded your library but the extension is quite different from the other GLBasic file...so how can i use the library??

mars_chaos89

here is the snapshot of my program....
the x mark is there because i hold the left mouse button when i snap the image....


[attachment deleted by admin]

Cliff3D

#24
Quote from: mars_chaos89 on 2010-Sep-17
tq for the obj reader cliiff...
i think you misunderstand something cliff...the demo version is not the GLBasic but the UVmapper professional...

Ooops! Good, because I wouldn't pay that author for software again. But I digress. The UV Mapper Pro or Classic programs (Classic is free and unhindered but limited) can produce UV MAPS. I believe showing a current texture as you work on it is limited to the pro version - I use a v2 copy of Pro, so I'm not up to date with the software...but see below.

Quote from: mars_chaos89 on 2010-Sep-17what i am trying to do is something like the one you showed me (the aeroplane example).but i need to add the 'x" marking and saving the data(where we mark at the model)....this is basically what im trying to do right now..

i downloaded your library but the extension is quite different from the other GLBasic file...so how can i use the library??

Did Slydog's comments help you? I deliberately gave you a non-editable version of the library as it was then (it has since changes as I am working on it almost daily, to improve it) for a couple of reasons - one of which was to prevent you from getting bogged down in the way that the program loads the .OBJ data from the file.

As it's changed it'd be a bit of a PITA for me to try and reproduce exactly what you need to do, but SlyDog's comments looked good to me - you don't need to edit it, just to attach it to your project. the code you COULD see whould be in the main part of the project.


OK - I think I could do with being treate like an idiot. Or, well - a machine (there is a difference?). Could you outline for me EXACTLY what you need to do? For example, here are two versions tha tI could imagine from what you have shown - first what I originally interpreted as:


! need to be able to:

A)
1. Mark on a bitmap a red X where damage has occurred.
2. Load up an .OBJ model in memory.
3. Load the bitmap to "paint" the surface of the model.
4. Display the model on-screen, with the surface painted including my red "X".
5. Rotate and zoom the model at will to better see/illustrate the location of the X.
6. Goto 5

On seeing your latest image, I am concerned that it might be more like:

B)
1. Load up an .OBJ model in memory.
2. Display the model on-screen - possibly with an unmarked texture.
3. Rotate and zoom the model at will to be able to see any part of it
4. Move an "X" cursor to anywhere on the 2D screen to overlay the model.
5. Goto 3

or even....

C)
1. Load up an .OBJ model in memory.
2. Display the model on-screen - possibly with an unmarked texture.
3. Move an "X" cursor to anywhere on the 2D screen to overlay the model, and "Mark" it
4. Rotate and zoom the model at will to be able to see any part of it, with the marked "X" following the model.
5. Goto 4 (or 3 on request)


None of these are impossible - but C in particular could be a PITA, especailly without knowing more about the model construction. It looks like you may have an actual skeletal model of the airplane there? Based on the UV mapping as I've interpreted it, version C could really be awkward.

Is your "X" meant to be painted on the outside skin of an aircraft, or on the skeletal "innards"? Is it meant to be a free-floating 3D model of an "X" that you can place on the plane? (this would be harder on the program controller - perhaps - but easier to code). And so on - as much detail as you can give will help to understand how to aid you, I reckon!

Finally - writing a 3D object viewer without knowing much about 3D could be an exercise in bashing ones head against the wall - even without wishing to modify the model as well!

Thanks,

Cliff

mars_chaos89

#25
sorry again for asking help without giving more details..ok..this is what i want to do...

1)Load a the plane model (dont mind about the file format actually...which one is easier?*.obj or *.ddd file?)

2)Rotate and zoom the model while put an 'X' on the model to indicate damage (for the time being lets try putting an 'X' on the outside skin of the model.

3)Save the data(where the marking is put on the plane) so that the user can view again whenever the user want.

maybe later i want put GUI for my program.....for the time being i just want to stick on the shortcut keys..
is it possible for me to do this using GLBasic?

mars_chaos89

Exception occured in command ddd_export_plugin
Last Error(not necessarily the problem): Not enough storage is available to process this command.

can this error occur eventhough i hav a 70GB free space...i thnk the prolem lies with the memory...

Cliff3D

Quote from: mars_chaos89 on 2010-Sep-20
Exception occured in command ddd_export_plugin
Last Error(not necessarily the problem): Not enough storage is available to process this command.

can this error occur eventhough i hav a 70GB free space...i thnk the prolem lies with the memory...

I would report this as a bug/issue and hope it gets addressed.

mars_chaos89

tq clifff.....how about what i want to with my program?do you think GLBasic can support what i want to do??

mars_chaos89

this is the model in wavefront file...maybe when u see the obj file u can help me...im desperately in need of help...