PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

E3DSurface questions

Hi all

I'm in the end of my project and i decide to make small changes at some graphics of my project.
So i try the E3DSurface, but i have some questions.

1) What is the best way to calculate exactly the pixel of a 3d graphic (width, height) after render it with a specific way (I mean after rotate, scale)

2) When i try to make more complex and low polygon 3d graphic i saw that edge library don't draw it right when the object rotate. Big surfaces confused with other. For example i attach a low polygon 3d graphic. I try to rotate it with the sample project "View3D".

3) Is there any way to change colors of surfaces with no code; When i try to color a surface from a 3d model create application, the E3DSurface don't render the object of the 3d model. It render only objects with white color.

4) What graphic cost less memory? E2DSurface Image (for example 100Kb) or E3DSurface with vertex and surfaces (for example 50Kb)? I mean the E3DSurface store in memory only the information of vertex and surfaces or it creates in memory and other things like virtual E2Dsurface? I'm asking that for low memory machines, like phones.

5) Do you know any free 3ds viewer that it can display the id of surfaces? Because if i had to change color with code, then i must know the id of the surfaces.

Thanks for your help!

Have a good Christmas!!!
Attachments:
SampleHouse.rar (2 KB)
Hi Mimispa,

I will answer your questions one by one:

1. To have more control over the render size in pixels, use ClassEDisplay::SetRenderSize as documented here:
http://www.edgelib.com/index.php?node=195

By default it takes the width or height of the backbuffer (depending on which is the smallest).

2. The renderer isn't able to display the object properly because it isn't totally hollow. It can't sort the polygons correctly.

3. Unfortunately, we haven't found color information in our sample .3ds files. If you have a sample file where color information is stored (it can be seen in a .3ds viewer), please send us the file for testing.

4. A 3D surface can definitely be smaller than a 2D surface depending on the number of used vertices and polygons.

5. At the moment we don't know a free .3ds viewer that can see the ID's of polygons. We're using Cinema 4D for 3D modelling and for information gathering, maybe there is a demo version available.
Hi Edge

1. I noticed than if the width or height of 3d model is 512 (max coordinate of all vertices of object is 256) in 3d model coordinate system, then the renderer by default set size in pixels the width or height of the backbuffer (depending on which is the smallest). Is it true? If this formula is true then i can calculate the pixel size depending of scale and rotation.

2. What do you mean totally hollow? How can i make an object totally hollow (for example the sample i sent)? That sample looks ok with other 3d viewer (like 3d photo browser light).

3. I sent the same sample of house with red roof. But viewing in the 3d viewer (3d photo browser light) i noticed that after coloring the roof, the 3d model now have two objects. I don' t know why. Maybe that's the reason i can't see the roof? When i'm trying to color all the 3d model i can't see the 3d model.

Thanks for your time and your help.
Attachments:
house.rar (2 KB)
Hi Mimispa,

1. Yes you're right. You can use this for your formula.

2. I can explain better by using your house model as an example. The floor polygons just below the house should stop when touching the walls. Right now it goes through to the other side. There are polygon fragments 'inside the model' which should be removed.

3D viewers may display this properly, because they sort and draw polygons per pixel using a depth buffer. Edge doesn't use a depth buffer, but draws polygons to increase performance.

3. We plan to improve our E3DSurface format for upcoming releases to handle .3DS files with multiple objects.
Ok, now i understand and i can calculate the pixel of 3d model.
But what about the color? How can i color a surface without code and without make more objects?

Thanks for your help!
Hi Mimispa,

Unfortunately this can't be easily solved with the current Edge release yet. The only solution would be to create a custom loader.

I recommend searching for a 3DS viewer that can show polygon ID's, and use the method we use in the View3D sample for coloring the Edge logo.