3d model

Previous topic - Next topic

Cliff3D

#30
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...

Did you tick the 21 Frame2 tick box when trying to convert? If you did not, the converter may have tried to convert your model into an animation, perhaps several hundred frames long...

How large is the .OBJ file? Perhaps the model is too large/complex?

Does the plane have a "skin" (the outer metal hull) or is it an internal structural model only? (it looks like the latter - which would probably be very difficult to paint an X on the texture map as nicely as you would like).

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

I beleive GLBasic can probably do what you want it to do, given a PC with a good enough video card. That doesn't mean that it will necesseraliy be easy to get GLBasic to do it. The act of opening, viewing, rotating a 3D model and placing an "X marks the spot" would be easier in Poser or DAZ Studio (or Cinema4D or Lightwave or Hexagon or Wings3D or blender or...) than writing a bespoke program to do the job IMHO.

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

By seeing the actual .OBJ I mean I'd have to HAVE the actual .OBJ (and .MTL and any other associated files) to examine, poke with a stick, figure out what's not working. So far I've been working blind somewhat, and I can't see what I'm doing :(

If you can get .ddd files working (or just use DAZ Studio) then a lot of difficulties just go away :D

mars_chaos89

i hav the .ddd file but i dont have the texture image for that model...so is this what i need to do cliff?

:| i need to start from the .obj file again by creating the texture image using the uvmapper right?then convert?
(the obj file size is about 100mb.)

i already created the program to load the .ddd file and to zoom and rotate the plane model...

i hav been trying to send you the plane model.is there any way that i can send you the file privately?

i think it just the internal structure model...


Cliff3D

Please let me annotate your post with numbers so tha tI can come back to the points in a slightly clearer manner than might otherwise be the case.

Quote from: mars_chaos89 on 2010-Sep-21
4. i hav the .ddd file but i dont have the texture image for that model...so is this what i need to do cliff?

5.  :| i need to start from the .obj file again by creating the texture image using the uvmapper right?then convert?
(the obj file size is about 100mb.)

3. i already created the program to load the .ddd file and to zoom and rotate the plane model...

1. i hav been trying to send you the plane model.is there any way that i can send you the file privately?

2. i think it just the internal structure model...

Ah, I hadn't recalled that you were the chap who had a model that took half an hour to load! Seeing the model in .OBJ format (far larger!) I can see why my program "doesn't load" the model - the GLBasic demo times out at aboout 5 minutes, which will close my program before it has much chance to display anything very much. This is a GLBasic demo issue - the demo deliberately times out at 5 minutes, and I know of no way of overcoming that except purchasing the language.

Did GLBasic go up recently from aboout E60 to about E80? {blink}

Think of it this way - imagine you're in a toyshop looking for a toy model to approximate the level of complexity that GLBasic can handle. It's a large shop, so it has a Boeing 747 in different styles from different companies. First is a Fisher-Price "cute" plane, at the bottom of the accuracy/complexity range, followed by a Dinky die-cast metal toy, followed by an airfix plastic build-it-yourself model, all the way up to an ACTUAL boeing 747 in the carpark out back.

If your 3D model is an airfix kit (I would say it is higher up the scale) then GLBasic is designed to cope with perhaps the Dinky toy level, but the DEMO version of GLBasic only handles the Fisher-Price cute and cuddly toy level of 3D model.

This is not meant in any way to be derogatory towards GLBasic, the Demo version, or indeed Fisher-Price. It's just "what is". You don't go to a fast-food restaurant for a gourmet meal, and it isn't wrong to suggest that an expensive gourmet meal is better or more complex than a fast-food joint would provide.

OK - so, there it is. It is my belief that the DEMO version of GLBasic is not up to the job of displaying THIS model - as it currently is - using any of the "premier" features of GLBasic (like all the 3D routines). Let me respond to your post piecemeal first, then have some discussion about "where to go from here".

NUMBERED ANSWERS:

1. Ah, I have the plane model thankyou - and it shows me a lot, really helps understand the position you are in and hopefully discuss dealing with THIS specific model. It's over 100MB as a .OBJ file (.OBJ is a text-based files, so is not very compact).

2. Yes, it looks to be an internal structure kind of model. This complicates things somewhat, and helps to explain why the model is "not loading" in my program (it's loading, but GLBasic Demo is timing out before my program can convert it to .x and display it in OpenGL).

3. Excelelnt! This should save lots of heartache/trouble :D

4. I need to look at the model more closely than I can right now (I don't REALLY have time for this response as I have prep work to do for a bunch of kids I'll be teaching this afternoon, but I'm trying to be helpful) but there are a number of issues. The kickers are that the UV Mapping is not what you showed me (I cannot say without putting more time in - tonight perhaps, after classes) and neither you nor I have a full copy of GLBasic to take account of the amount of time it takes for GLBasic to load 3D models. The time available to work in and the UV Mapping MUST both be addressed first, before you even consider painting a texture. I personally would dump the idea of "painting" an X on the surface and use a 3D "X" model that can be scaled, rotated, and moved into place - because that will cut out a lot of work elsewhere that requires a better understanding of 3D than you currently seem to have.

5. Wow. 100MB. Unless we can reduce the complexity of the model somehow, you need the full GLBasic even to evaluate whether GLB will be good enough for you.

Ways to reduce the model complexity/load time MIGHT BE to save it as a .x (I have not investigated how long that would take, or whether it would save any time at all). I HAVE looked at it enough to know there are things to look at it that MIGHT offer some time savings.

Let me get back to you. This post is a stall (hopefully an informative stall) until I can look at things in another light, with more time. I want to post a new version of my code for testing, and do the prep work for my pupils this afternoon. If I get that done before lunch time I may be able to check on your plane problem a bit deeper.

Cliff3D

Quote from: mars_chaos89 on 2010-Aug-30
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?

Please, a quick question, are you using  X_LOADOBJ file$, num# to load the *.ddd version of the model? I can't think of anyything which would load that model, unmodified, into GLBasic as a GLBasic-recognised 3D model if you are :(


Kitty Hello

Will the loading take more than 5 minutes!? That can't really be, can it?

mars_chaos89

which loading?the application that i am working on?or the loading when the file is convert?

Cliff3D

#36
Quote from: Kitty Hello on 2010-Sep-21
Will the loading take more than 5 minutes!? That can't really be, can it?

Yes, very easily. I am slightly time constrained today, but I shall see if I can find some time reporting commands and time a few models on my E6600 dual core 2.4GHz desktop PC.

Quote from: mars_chaos89 on 2010-Sep-21
which loading?the application that i am working on?or the loading when the file is convert?


Loading the converted *.ddd into your program, the one you've written in GLBasic.


Right - I think I've got as much prep work done for the kids as I can, so I should be able to turn some attention to this. Thanks, mars, for the PM taking the pressure off me. I DO tend to try and push myself when helping others, as I don't know what your urgency/time pressures may be - so I try to be as timely as possible. Often beyond what is good for me. So no worries, I'll do what I can in the few minutes I have free now :)

Cliff3D

#37
SIMPLE CUBE (2KB  ) Default texture
Timing:
.OBJ model and all textures loaded in 0 minutes and 0 seconds
.OBJ model in memory converted to .x in a further 0 minutes and 0 seconds
.x model shown on screen using X_DRAWOBJ and SHOWSCREEN for first time in a further 0 minutes and 0 seconds

SPACE RELIC: (3,639KB), 24 bitmaps for texture
.OBJ model and all textures loaded in 0 minutes and 17 seconds
.OBJ model in memory converted to .x in a further 0 minutes and 1 seconds
.x model shown on screen using X_DRAWOBJ and SHOWSCREEN for first time in a further 0 minutes and 0 seconds

HI-RES HUMAN MODEL (7,795 KB) Default texture
.OBJ model and all textures loaded in 0 minutes and 17 seconds
.OBJ model in memory converted to .x in a further 0 minutes and 13 seconds
.x model shown on screen using X_DRAWOBJ and SHOWSCREEN for first time in a further 0 minutes and 0 seconds

HI-RES MECH MODEL (7,887 KB) 16 bitmaps for texture
.OBJ model and all textures loaded in 0 minutes and 34 seconds
.OBJ model in memory converted to .x in a further 0 minutes and 6 seconds
.x model shown on screen using X_DRAWOBJ and SHOWSCREEN for first time in a further 0 minutes and 0 seconds

mars_chaos89's PLANE MODEL (100,906 KB) Default texture
.OBJ model and all textures loaded in 3 minutes and 18 seconds


...over 7 minutes after that the CPU as still working hard, but no resultss. I'll have to put some more debug detail in, though that will slow it down further :(

I have no experience with *.ddd files as they don't interest me at all, but if I get time I'll try to do some rough time test with them on the same files - using 3D Convert and X_LOADOBJ. Mars is free to beat me to it!

Obviously, this all runs MUCH slower on my netbook - I'm quite surprised at how fast the second step is when using a timer on my desktop (but then I mostly use my netbook I guess - and a watched pot never boils)

Cliff3D

#38
Timing of converting using 3D Convert is rather approximate, relying on human hand and stopwatch function of digital watch ;)

SIMPLE CUBE (2KB  ) Default texture
Timing:
Instant!

SPACE RELIC: (3,639KB), 24 bitmaps for texture
10 seconds (seperate textures presumably lost)

HI-RES HUMAN MODEL (7,795 KB) Default texture
1 minute 3 seconds

HI-RES MECH MODEL (7,887 KB) 16 bitmaps for texture
26/27 seconds (seperate textures presumably lost)

mars_chaos89's PLANE MODEL (100,906 KB) Default texture
Over 40 minutes after reporting "Converting Frames (1)" the program has not visibly moved on. I am guessing it will take an hour or so to perform the conversion, and load times of the *.ddd will be relative to these conversion times.

I'll leave it running in case the created/modified file attributes can tell us anything later.


There are many ways to look at things. One can see a glass half full where someone else sees a glass half empty. Here, either the Demo of GLBasic is over too quickly (or runs too slowly) or the model is too large - it will depend who you ask. Personally, I feel the model is large and overly complex - but I don't know the final use properly, so perhaps it NEEDS to be that complex.

My point is, this isn't a "GLBasic sucks" post, or a "The Demo is too short" post. This is a "this is how long it takes" post. If I were mars, I would do exactly what I have actually done for my own (continuing) testing of GLBasic - re-evaluate the platform I am compiling on (VirtualPC is OUT!) and the data I am working with, and find a compromise that works, or at least proves the case. In mars' place I would probably be using a simpler - MUCH simpler! - plane model as a proof-of-concept. The downside to this will be if the model simply takes over half an hour minimum to load into GLBasic - would that be too slow for his application/clients? WARNING:- it doesn't load quickly into other applications either. This isn't a GLBasic-only issue... the model is BIG! Using a simpler plane model to start with sounds like a good plan, to me - though again, I don't know the project constraints. I can time it in a variety of other applications, but loading the basic data in and displaying it in 3D are two different things. I DO know that the basic project description sounds better suited to GLBasic than my own projects do, and I suspect GLB can do what I need well enough - so this seems a matter of finessing the data to suit the language to me.

Kitty Hello

post me the loading code, please. I think there is something trange going on. Loading a 5 MB file can't be that long.

Cliff3D

It's not 5MB - it's 100MB as a .obj file. the conversion completed to .ddd while I was at school - it's 64,084 KB (over sixty MegaBytes)!

As I say, it's a pretty big and complex model, from the looks of things. It's not game-level 3D, it's higher end than that IMHO.

What "loading code" did you want? You have the code to 3D convert (sadly I can't tell from the file how long it took to actually convert to .ddd).

Cliff3D

Here's some code for loading the .ddd files, and some timings. Note that as I am using the Demo copy of GLB I cannot load Mars' .ddd model because the program exceeds the 5 minute limit (and then some!) :(

Code (glbasic) Select
// --------------------------------- //
// Project: TimeDDD
// Start: Tuesday, September 21, 2010
// IDE Version: 8.085


// FREE-VERSION:
// Need Premium for Features:
// 3D Graphics
// Network Commands
// INLINE C/C+++ code

SETCURRENTDIR("Media") // seperate media and binaries?


LOCAL starttimesec#, starttimemin# , starttimehour#, tempsec#, tempmin#, temphour#, seconds#, minutes#, hours#, FileName$



main:
FileName$=FILEREQUEST$(TRUE, "DDD filesJ|*.ddd|All|*.*")
SHOWSCREEN
starttimesec# = GETTIMERALL()
starttimemin# = GETTIMERALL()
starttimehour# = GETTIMERALL()

X_LOADOBJ FileName$, 1

tempsec# = GETTIMERALL() - starttimesec#
tempmin# = GETTIMERALL() - starttimemin#
temphour# = GETTIMERALL() - starttimehour#
seconds# = INTEGER(tempsec# / 1000)
minutes# = INTEGER(tempmin# / 60000)
hours# = INTEGER(temphour# / 3600000)

DEBUG ".DDD model loaded without textures in "+ minutes + " minutes / " + seconds + " seconds\n"



And the timings...

OK - some timings loading *.ddd files follows:

Same objects, but obviously they have lost all their bitmaps:

SIMPLE CUBE (1KB  )
Timing:
Instant!

SPACE RELIC: (2,065KB)
.DDD model loaded without textures in 0 minutes / 6 seconds

HI-RES HUMAN MODEL (7,180 KB)
.DDD model loaded without textures in 1 minutes / 68 seconds

HI-RES MECH MODEL (3,758 KB)
.DDD model loaded without textures in 0 minutes / 17 seconds
Over 10 minute sin it hasn't finsihed!

mars_chaos89's PLANE MODEL (63,172 KB)
Over 15 minutes have passed and the CPU is still churning, but I've got to go have supper!

Maybe it will finish loading while I have lunch, though :D

Cliff3D

It looks like it did - mars' model timing, from the program listed above:

.DDD model loaded without textures in 29 minutes / 1791 seconds

WPShadow

How many polys do you have at the "plane" - model?
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Cliff3D

According to Uv Mapper, the model has:
Vertices: 822,125
texture verts: 578,110
normals: 221,004
facets: 735081 (don't assume these are all triangles - they could easily contain some quads)
groups: 468

In addition I happen to know (having peeked) that each "Group" seems to be a seperate "Object" as well (but neither UV Mapper nor my OBJ import library for GLB support the "Object" command - at least, so far).

I'm going to try it without any UV data, and if that's a VAST improvement perhaps with planar mapping.