Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Why does my model turn white above 12,500 polys?

Author
Message
PiaPoi
11
Years of Service
User Offline
Joined: 4th Dec 2012
Location:
Posted: 4th Dec 2012 12:37
Hi there,

My friend is working on a wonderful model of a boat which he's exporting as a .X with colours. It was working fine until the model reached about 12,500 polys - after that it loaded into DBP, but without any of the colours. The exporter was fine, though, because other programs like 3DCrafter loaded it with the colours.

I have no idea how to create a .BMP texture for the model. Is there a way of getting round this problem within DBP, or do we have to look at splitting the model into bits, which is possible but maybe CPU hungry because the boat is bobbing about in all directions using EZRotate!

Ocean Waves
Also, I've been trying to make a nice looking ocean for the aforementioned vessel to bob about upon, not looking at shaders because it needs to respond to the waves... people seemed fairly impressed five years ago with this code, but the link it contains seems to be broken - any idea where to find it now?

I am very very grateful for any help you can offer with this! Thank you!!

Pia x
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Dec 2012 03:39
I'm not sure about your model problem, but there was a DBPro Coding Challenge to make waves at one point - you can check out the entries starting here.

http://brianmacintosh.com
"'Who's that primitive entity accessing sliding collision data from my bridge?!', the troll roared." - TheComet
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 24th Dec 2012 03:03 Edited at: 24th Dec 2012 03:27
Quote: "It was working fine until the model reached about 12,500 polys - after that it loaded into DBP, but without any of the colours."


No doubt a strange issue. Assuming the 12,500 poly object is showing up as black; in which case the FVF diffuse is missing; using the Color Object Rgb(255,255,255) call should fill it with white.

If the colouring command fails, then the object either has a texture already specified in the .X file or it is missing normals, which [set object normals] will resolve.


There are other ways to diagnose the problem; applying textures, converting to a mesh, analysing a memblock conversion.

If all fails, post up the code and the mesh so we can see the issue. Post up the mesh that works aswell so we can see the difference.

Quote: "Also, I've been trying to make a nice looking ocean for the aforementioned vessel to bob about upon, not looking at shaders because it needs to respond to the waves"


To make ocean effects you'd need methods for animating vertices of a flat mesh. As you can see from the following, the vertices need to wave like the line points.



If you can understand this example I rush coded in a few minutes, you can expand it to look interesting.

The vertices on your 3D ocean can move just like that line. Apply the principle to the tile height of a Matrix, or the vertex height of VertexData or an objects memblock. You can always post up any more questions as you work.

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Dec 2012 13:10
I've encountered this problem before. What I've found is that DBP has a 32 byte index for vertices and indices, but seems to store both at the same time, which only gives you 16 bytes for vertices and 16 bytes for indices. This means you can effectively only store 65536 vertices and 65536 indices.

Since a polygon consists of 3 vertices each, and models usually contain more polygons than what you exported (for example for backfaces), you're stepping over this limit and overwriting the excess of vertices somewhere.

Could you run this code on your model and tell me what results you get?



TheComet

Login to post a reply

Server time is: 2024-03-28 13:57:34
Your offset time is: 2024-03-28 13:57:34