Jump to content

  • Log In with Google      Sign In   
  • Create Account


Gavin Williams

Member Since 04 Dec 2010
Offline Last Active Jul 22 2014 06:14 PM
*****

Topics I've Started

Exporting non-indexed vertex data from 3DSMAx

05 July 2014 - 09:36 AM

Hi,

 

I'm trying to export model data from 3DSMax to be used in my own program, but it seems that any export (eg OBJ) always outputs the vertex data in an unusable format. I am not currently using a model library, I'm loading/using raw vertex data. So I need the vertex data as just that ... vertex data. I'm not using indices, as I want hard edges.

eg:

Vertex 1 : position, normal, texcoord

Vertex 2 : position, normal, texcoord

etc

Take a look at the OBJ file for a cube, below. that vertex data can't be used to reconstruct a cube ! There needs to be 36 vertices for a cube, but only the normals are presented in the correct way. There is face data, but I can't make sense of it, normally such facet data would be referred to as index data, and it would reference the vertices by index. But the face data is indexed upto 36, and there are only 8 vertices in this file description.

Can anyone help me export models in a usable format ?

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 06.07.2014 01:05:57

#
# object Box001
#

v  -8.5282 0.0000 16.5679
v  15.5268 0.0000 16.5679
v  -8.5282 0.0000 -13.1042
v  15.5268 0.0000 -13.1042
v  -8.5282 29.3498 16.5679
v  15.5268 29.3498 16.5679
v  -8.5282 29.3498 -13.1042
v  15.5268 29.3498 -13.1042
# 8 vertices

vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 1.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
# 36 vertex normals

vt 0.0000 0.0000 0.0000
vt 1.0000 0.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
vt 1.0000 0.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
vt 1.0000 0.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 1.0000 1.0000 0.0000
# 12 texture coords

g Box001
f 1/10/1 3/12/2 4/11/3
f 4/11/4 2/9/5 1/10/6
f 5/9/7 6/10/8 8/12/9
f 8/12/10 7/11/11 5/9/12
f 1/5/13 2/6/14 6/8/15
f 6/8/16 5/7/17 1/5/18
f 2/1/19 4/2/20 8/4/21
f 8/4/22 6/3/23 2/1/24
f 4/5/25 3/6/26 7/8/27
f 7/8/28 8/7/29 4/5/30
f 3/1/31 1/2/32 5/4/33
f 5/4/34 7/3/35 3/1/36
# 12 faces

How to install latest SharpDX from GitRepository.

17 June 2014 - 09:20 PM

Hi,

I have SharpDX 2.6.3 synced in GitHub. But I'm not sure on how to actually install it, other than how I've done it in the past and just copied the bin folder and the documentaions folder over to my main drive. But should I also copy packages and external or not?

Thanks for any help.

 

Gavin

 


ReportLiveObjects() isn't giving me enough information.

25 April 2014 - 11:00 PM

Hi,

 

I just notices a post in which someone included there output for ReportLiveObjects() and it looked like this:
 

D3D11 WARNING: Live ID3D11Device at 0x007A201C, Refcount: 2 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING: Live ID3D11Context at 0x007A3620, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING: Live ID3DDeviceContextState at 0x007ADBB0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING: Live ID3D11BlendState at 0x007B3D84, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: Live ID3D11DepthStencilState at 0x007B3ECC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: Live ID3D11RasterizerState at 0x007B403C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]

 

While my output looks like this:

 

D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Producer at 0x00A2E43C, Refcount: 35. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A307D8, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A3E300, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A3C944, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING:     Live Object at 0x00A4422C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]

 

As you can see, my version is sadly lacking, and particularly unhelpful. Is there something I need to do to get the correct information ?


Relative or absolute coordinate system

04 April 2014 - 12:00 AM

Hi,

 

In a game I'm making for college, I'm using a relative PlayRegion (0,0 - 100,100). It's a sprite based game. I started using relative because the monitors at school are slightly smaller than my HD screen at home, and I figured i may as well support both. But it becomes a bit strange working with relative, because it always has to be rounded to real coordinates.

 

Now, considering that it's best to render sprites at their true resolution, my new thinking is that i should instead have profiles for supported resolutions and each profile load a different sprite set and set PlayRegion and Actor.Size's appropriate to each resolution.

 

Does that sound preferable ? I guess I'm asking if relative coordinates always tend to run into problems with sprite based games?

 

Thanks


Support Vector

01 April 2014 - 02:57 AM

Hi,

 

Is the following function for a support vector correct?

class Vector2
{
     public Vector2 SupportVector()
     {
         if (Math.Abs(X) > Math.Abs(Y))
             return new Vector2(X, 0);
         else
             return new Vector2(0, Y);
     }
}

PARTNERS