Problems loading a created mesh

Blitz3D Forums/Blitz3D Programming/Problems loading a created mesh

Billp(Posted 2006) [#1]
I'm fairly new to blitz3d but have programmed in a few other langauges (apple basic,atari basic, graforth, 6502 asm). I have written a program which takes a single surface .3ds mesh( created from a heightfield by cybermesh) and rebuilds it, creating surfaces based on elevation. then fetching tris from the source and assigning them to the proper surface. the program then saves the mesh using the b3dfile.bb functions, however when blitz loads the mesh it is not visible, I have tried everything I can think of (flipmesh, updatenormals) even retexturing the mesh to no avail....any ideas ?

Here is the created mesh prior to saving (quite visible lol)




GfK(Posted 2006) [#2]
I take it you've created a camera?

Post some code and I'm sure someone will take a look.


Billp(Posted 2006) [#3]
Glad to GfK, have not posted here before and am at a loss as to how to include html in my post etc.


big10p(Posted 2006) [#4]
I can't really tell what you're trying to do, from your description. We really need to see some code. However, you could try scaling the mesh up as the original .3ds mesh may be using a tiny scale.


Billp(Posted 2006) [#5]
tried scaling just prior to this reply...no luck, heres the source




Beaker(Posted 2006) [#6]
I don't know what is causing your problems, but I do have some tips for you:

1 - Looking at this:
CameraRange camera,.1,3000
I suspect you will have problems later with z-fighting. Find out more here:
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

2 - Your sun, moon & sky don't actually have to be that far away as long as you control your render order (using EntityOrder or multiple renders):
Render sky first.
Then Sun.
Then Moon.
Then clouds (If you have any).
Everything else can be left as normal.

3 - does shininess on a sprite actually do anything?

4 - you can post pictures and code here using the forum tags:
http://www.blitzbasic.com/faq/faq_entry.php?id=2


Billp(Posted 2006) [#7]
Thanks Beaker,
1. camera range doesn't cause problems with my hardware at this point and this program is intended to be a mesh terrain editor for my own use but steve's z-buffer page is very informative.

2. sun/moon as well as the skysphere just experimental play, have only had blitz for a couple of weeks

3. nope shininess has absolutely no effect ... see 2 lol

4. appreciate the faq link, I looked all over the forums but rarely hit the home page

I have dumped the model to the debug log but everything looks right (To my inexperienced eye at least)


Barliesque(Posted 2006) [#8]
You might try examining your B3D model with this...

http://www.blitzbasic.com/codearcs/codearcs.php?code=665