dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

3ds faili
Goto page Previous  1, 2
 
dev.gamez.lv Forum Index -> Grafikas programmēšana un teorija
View previous topic :: View next topic  
Author Message
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sat Feb 18, 2006 1:31 pm    Post subject:

Tas nozīmē, ka kodā ir kļūda, kura notiek izpildes (runtime) laikā. Neviens te nelasīs piecus kilometrus garu penteri.
Nokompilē programmu ar debug informāciju un tad palaid debugerī. Kad notiks kļūda, tad debugerī paskaties, kurā rindā izpilde apstājusies. Un tad arī domā, kas par vainu tur varētu būt.
Back to top
View user's profile Send e-mail
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Thu Mar 09, 2006 4:19 pm    Post subject:

Vai tam ir kautkada noziime kaadu failu formatu es izmantoju?? Piemeram .3ds vai .MD2. Kuru butu labaak izmantot un kapec?
Back to top
View user's profile Send e-mail
eXeM



Joined: 22 Mar 2005
Posts: 155
Location: Ape

PostPosted: Thu Mar 09, 2006 4:32 pm    Post subject:

Pa manam noziime vairaak uzspeeleejaas uz preformanci, es gan nezinu bet nu cik es esu dzirdejis tad kaa nu kursh engine ir optimizeets uz kaukaadu failu formaatu.
Back to top
View user's profile
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Sun Apr 02, 2006 9:00 am    Post subject:

Vai kaads nezin labu tutoriali, kuraa stradaa ar 3ds failiem. Es mekleeju bet neko ipashi labu netradu
Back to top
View user's profile Send e-mail
fest



Joined: 07 Apr 2003
Posts: 187
Location: Madona

PostPosted: Sun Apr 02, 2006 9:55 pm    Post subject:

Nedomāju gan, ka tam būtu kāda nozīme, galu galā visi formāti tiek pārveidoti tādā, kuru var uzzīmēt ar OpenGL/DX, piemēram, vertex list'os.
Tiesa gan, varu kļūdīties.
_________________
Signature for rent. Good as new.
4 lines max. 80 letters.
Ls 0,02/post
Back to top
View user's profile Send e-mail
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Sun Apr 02, 2006 10:04 pm    Post subject:

Man vajag tutoriali, kuraa paraada kaa ielaadeet 3ds failus un darboties ar tiem.
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sun Apr 02, 2006 10:16 pm    Post subject:

Ja der C valodā, tad pasklaties lib3ds. Tai nāk examplis līdzi.
Back to top
View user's profile Send e-mail
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Tue Apr 18, 2006 6:55 am    Post subject:

Shjajaa webaa http://www.levp.de/3d/index.html ari ir tutorialis prieksh 3ds failiem. Bet tur nav nekaa par tekstuuraam. Kaa lai es uzlieku textuuras objektiem, tajaa tutoriaalii??
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue Apr 18, 2006 8:18 am    Post subject:

Kā tas jāsaprot, tur nav tekstūru?
Ja tu domā tajā "Loading 3DS files" atrodamo sourci (l3ds.h/cpp failus), tad tur ir gan tekstūras. Materiāla objektam ir GetTextureMap1() un GetTextureMap2() fjas, kas atgriež informāciju par materiālam izmantoto tekstūru. Atliek tik ielādēt to.
Back to top
View user's profile Send e-mail
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Tue Apr 18, 2006 9:36 am    Post subject:

Kaaa pielietot GetTextureMap1()???????
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue Apr 18, 2006 12:34 pm    Post subject:

Apskaties struktūru, kuru viņa atgriež (.h failā vai dokumentācijā).
Back to top
View user's profile Send e-mail
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Thu Apr 20, 2006 6:59 am    Post subject:

Bet es taapat nesapratu kaa to pielietot. Vari paraadiit??
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Thu Apr 20, 2006 8:24 am    Post subject:

Tur taču viss izskaidrots:
Quote:
struct LMap
{
float strength;
char mapName[255];
float uScale;
float vScale;
float uOffset;
float vOffset;
};

This is a structure that represents a "map". Maps are a part of a material. A material has a diffuse map, a specular map etc.
Here's a description of members:

* strength - the opacity of the map, it is 1 for opaque maps and 0 for completely translucent maps.
* mapName - this is a name of texture file that should be used with the map.
* uScale, vScale - the scaling factors of the texture coordinates.
* uOffset, vOffset - the translation of the texture coordinates.

mapName - faila vārds, no kura jāielasa tekstūra.
uScale, vScale - reizinātāji tekstūras u un v koordinātēm
uOffset, vOffset - nobīdes u un v koordinātēm

Neesmu nekad šīs bibliotēkas kodu lietojis un arī netaisos tuvākajā laikā, bet manā izpratnē vajag taču ielasīt to mapName OpenGL tekstūrā un lietot zīmējot to (attiecīgi pareizinot ar tiem u/vScale un pieskaitot u/vOffset pie tekstūras koordinātēm).
Back to top
View user's profile Send e-mail
coderpp



Joined: 20 Aug 2005
Posts: 167
Location: Rīga, Koknese, Gajiena

PostPosted: Thu Apr 27, 2006 6:52 am    Post subject:

Isteniibaa tekstuuras tur bij viegli uzlikt! Paraugaaa sho rindu: glEnableClientState(GL_COLOR_ARRAY);
jaaizstaaj ar glEnableClientState(GL_TEXTURE_COORD_ARRAY);

Taalaak glBlindTexture(GL_TEXTURE_2D, tekstuura);

Un tad sho rindu glColorPointer(3, GL_FLOAT,0, &mesh.GetBinormal(0));
jaaizstaaj ar glTexCoordPointer(2, GL_FLOAT,0, &mesh.GetUV(0));
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> Grafikas programmēšana un teorija All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group