Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1] 2
  Print  
Author Topic: Complete newbie seeking help...  (Read 7096 times)
Dark Baron
Community Member
*
Posts: 16


« on: October 11, 2004, 09:12:38 PM »

Hello!

Im currently a student at highschool, and I was able to fast track in computer classes.  I'm currently doing a grade 12 university prep course that teaches VB.  Im fairly comfortable in VB and I have been working on a text based RPG for quite some time...  this is my 3rd remake of this game.  My first attempt at making this game resulted in 13 thousand + lines of code for a game that basically did.. nothing lol.  My second attempt cut the code amount down to 1/3 of the original, and intruduced 2D Item graphics and a more complex item system.  Now, I am on my third attempt, and hopefully final.  Im using a structure similar to Diablo 2 in which my data is stored in text files (minus the fact that diablo 2 has these files stored in MPQs..) so that I can constantly expand on the amount of items and other things in my game.  I wanted to take it one more step up, and have 3d Items  and 3d enemies so you know what your fighting.

Now, Im a complete newbie when it comes to 3d graphics... like, I've never modeled a single thing in my life...  I have access to 3ds Max 5.1, TrueSpace, and something else from caligari....  Today I attempted to use a sword model I got from the internet in one of the demos provided from truevision, the tank one, but my sword displayed as a large black rectangle.  Obviously I did something wrong, and I dont know where to start....  My sword does not even display in the model viewer...  I would appreciate if someone can help me out, and please keep in mind Im a complete model newbie Smiley

Thanks in advance.

Nick
Logged
tweakbox
Customers
Community Member
*****
Posts: 1194


« Reply #1 on: October 11, 2004, 11:20:20 PM »

If your sword doesn't display in the model viewer, that means that for some reason or another there is something funky about the model and it confused TV (or at least that's been what I've concluded).  In other words, you're gonna have to find a new model.  Though I do find it odd that you said it shows up black in the demo app, and not at all in the model viewer.

Aside from that, if any more models load in the model viewer but show up black in a demo app, you need to set a material for that model.  A quick way to do it is to use mesh.setmaterial 0 where mesh is whatever the model object is called.  You'll want to create your own materials later, but for now just setting it to 0 will work fine.
Logged

I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
Onikaze
Community Member
*
Posts: 40


« Reply #2 on: October 11, 2004, 11:59:56 PM »

I think I had a similar problem last year when I was trying to get a demo together with tv 6.

for me, at least, the problem was that the models themselves were coming in with a default of black.

first thing , try to enable thebounding box so you will get the general size.

also use model.setcolor (rgba( 0,1,0,0))  ' or something look it up in the docs , it's been a long time.  that should set the model to blue.


hope this helps
Logged
AriusMyst
Guest
« Reply #3 on: October 12, 2004, 05:22:46 AM »

Quote from: "Dark Baron"
Hello!

Im currently a student at highschool, and I was able to fast track in computer classes.  I'm currently doing a grade 12 university prep course that teaches VB.  Im fairly comfortable in VB and I have been working on a text based RPG for quite some time...  this is my 3rd remake of this game.  My first attempt at making this game resulted in 13 thousand + lines of code for a game that basically did.. nothing lol.  My second attempt cut the code amount down to 1/3 of the original, and intruduced 2D Item graphics and a more complex item system.  Now, I am on my third attempt, and hopefully final.  Im using a structure similar to Diablo 2 in which my data is stored in text files (minus the fact that diablo 2 has these files stored in MPQs..) so that I can constantly expand on the amount of items and other things in my game.  I wanted to take it one more step up, and have 3d Items  and 3d enemies so you know what your fighting.

Now, Im a complete newbie when it comes to 3d graphics... like, I've never modeled a single thing in my life...  I have access to 3ds Max 5.1, TrueSpace, and something else from caligari....  Today I attempted to use a sword model I got from the internet in one of the demos provided from truevision, the tank one, but my sword displayed as a large black rectangle.  Obviously I did something wrong, and I dont know where to start....  My sword does not even display in the model viewer...  I would appreciate if someone can help me out, and please keep in mind Im a complete model newbie Smiley

Thanks in advance.

Nick


Yea, the black is probably a mat. As for it not showing in the model viewer, isn't the model viewers background black. "you see the thing about black holes, is they're black, an the thing about space, is its black"

/me is happy with his red dwarf quote as a cheesy metaphor  :roll:

As for storing your data in text files, its fine, but you might want to think about using XML.
Logged
aliasx
Customers
Community Member
*****
Posts: 218


« Reply #4 on: October 12, 2004, 05:42:27 AM »

Quote
/me is happy with his red dwarf quote as a cheesy metaphor  


Smeeeeeeeeeeeeeeg Heeeeeeeeeeeeeeeeeead! :lol:

Respect the boys from the dwarf!
Logged
AriusMyst
Guest
« Reply #5 on: October 12, 2004, 06:49:03 AM »

Quote from: "aliasx"

Respect the boys from the dwarf!


Damn straight man! Cheesy

"played for and got - prince of the planet potters!"

We probably shouldn't turn this into a geeky dwarf quoting thread.
Logged
Dark Baron
Community Member
*
Posts: 16


« Reply #6 on: October 12, 2004, 02:48:46 PM »

Thanks all for your quick replies.  I'll try doing what was mentioned, and I'll edit this message and let you know if it worked.  Thanks again.

Edit:  Well, turns out my model DID load.  and it was the material as well...  I was loading it without a texture, so im guessing the material was black??  Well anyway, I set the material to white, and the "big rectangle" turned white... so I thought... ok, im making progress.. :roll: ..  and then I realized, hey! that bottom part is the handle of the sword!!  so I scaled it down to 1/10th the sieze and there it was!!  Cheesy  Cheesy   So now I pose another question.. How do I set the texture?  hehe thanks for your help.
Logged
JohnPierre
Community Member
*
Posts: 1250


« Reply #7 on: October 12, 2004, 04:21:41 PM »

mesh.settexture gettex("yourtexture'snamehere")

do this after loading in your texture

texfactory.loadtexture app.path & "\pic1.bmp", "yourtexture'snamehere"
Logged

------------------------------------------
A computer once beat me at chess, but it was no match for me at kick boxing.
Dark Baron
Community Member
*
Posts: 16


« Reply #8 on: October 13, 2004, 02:59:56 PM »

Hmm... I tried using what u typed, but "gettex" doesnt work?  I tried things like texturefactory.gettexture and stuff... but it doesnt work... I'll keep fiddling around heh  Thanks.

"TrueVision3DTVGlobals_definst.GetTex" works lol...  my sword is still white tho?  :? im sorry for asking these newb questions haha
Logged
tweakbox
Customers
Community Member
*****
Posts: 1194


« Reply #9 on: October 13, 2004, 06:14:50 PM »

you just load in the texture with the texture factory:

texturefactory.loadtexture texturepath, "texturename"

And then you apply it to the mesh with

mesh.settexture gettex("texturename")

the syntax is just like that, minus changing the names for what you called the mesh and texture factory objects
Logged

I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
AriusMyst
Guest
« Reply #10 on: October 13, 2004, 06:29:34 PM »

As tweakbox an johnpierre said, it should work. But if not, try this( im not a vb coder, so im sorry if the syntax is a little off ):

Dim MyTex As Integer

MyTex = TexFactory.LoadTexture "myfile.bmp'
Mesh.SetTexture MyTex


I think that should also work.
Logged
BYTE-Smasher
Community Member
*
Posts: 956

vaporware makes baby jesus cry


WWW
« Reply #11 on: October 13, 2004, 07:17:29 PM »

are you using vb6, or vb.net? in vb.net, I've got to do a tvglobals.gettex.... but in vb6, it's just gettex....

BTW, if you've got game programming experience in vb, you'll love tv3d... I've been making my own mini-games for years with everything from qbasic to vb, and I've been in heaven since I found tv3d... you should come on to #tviug if you want some quick help... I've gotten many fast answers there...

Click below to get there...
http://www.voidzero.com/chat/chatter.cgi?channel=TVIUG&nickname=tvuser
Logged

Dark Baron
Community Member
*
Posts: 16


« Reply #12 on: October 15, 2004, 03:14:20 PM »

Yeah, im using .NET... and I can load the texture fine, but when I try to apply it to the sword, its still white...  now, I didnt create a texture for this sword, im using the one off of the Teapot to test... but it should still work... shouldnt it??....  Maybe thats the problem, but I dont see why it shouldnt work.
Logged
AriusMyst
Guest
« Reply #13 on: October 15, 2004, 04:35:37 PM »

what does the debug file say?

( tv.setdebugfile debug.txt - before you init the engine )
Logged
JohnPierre
Community Member
*
Posts: 1250


« Reply #14 on: October 15, 2004, 08:11:00 PM »

im guessing that its a path problem, you'll probably get a error:texture path not found or something on that order
Logged

------------------------------------------
A computer once beat me at chess, but it was no match for me at kick boxing.
Dark Baron
Community Member
*
Posts: 16


« Reply #15 on: October 15, 2004, 09:07:58 PM »

Ok.. heres my coe for the textures part...

TextureFactory.LoadTexture("texture.bmp", "Sword")
LongSword.SetTexture(TrueVision3DTVGlobals_definst.GetTex("Sword"))
LongSword.EnableSphereMapping(True)

(I put the sphere mapping on cuz it was turned on for the teapot... and its the same texture...  it didnt change anything when it was on/off for my sword)

heres what the Debug file says from when I load my model to when its done the textures...

10-15-2004 22:10:16 | 3DS MESH LOAD : Load Mesh started ( C:\Documents and Settings\Nicholasjr\My Documents\TV Test\TV Test\bin\SWORD04.3DS)
10-15-2004 22:10:16 | 3DS MESH LOAD : Load mesh finished
10-15-2004 22:10:16 | 3DS MESH LOAD : Mesh cloned to D3DMesh
10-15-2004 22:10:16 | 3DS MESH LOAD : Mesh Optimized
10-15-2004 22:10:16 | 3DS MESH LOAD : 6598 vertices / 13168 polys
10-15-2004 22:10:16 | 3DS MESH LOAD : Compute sphere
10-15-2004 22:10:16 | 3DS MESH LOAD : Finished
10-15-2004 22:10:16 | TEXTURE FACTORY 2 : Loading texture texture.bmp ('Sword')


It has no line for when it tries to set the texture to the sword...  So, It loads the .bmp into the texture factory... but doesnt set it to the sword? hmmm... maybe im missing something.
Logged
JohnPierre
Community Member
*
Posts: 1250


« Reply #16 on: October 15, 2004, 09:42:51 PM »

are your textures place in your projects folder? if so, try this

texturefactory.loadtexture(app.path & "\" & "texture.bmp", "sword")
Logged

------------------------------------------
A computer once beat me at chess, but it was no match for me at kick boxing.
Dark Baron
Community Member
*
Posts: 16


« Reply #17 on: October 16, 2004, 12:24:28 AM »

I just tried it and still no luck lol...  Sad  haha, well, I dunno what im doin wrong... my only assumtpton is that it has to do with the texture fitting properly on the sword... but I cant see why that would disrupt it... Oh well, I dont need to worry about this too much right now.  Thanks for all your help.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4946


WWW
« Reply #18 on: October 16, 2004, 03:56:28 AM »

Be sure you exported your 3DS correctly.
You need to check one checkbox in the exporter or something "Preserve MAX Coordinates".
Also you have to be sure your model has texture coordinates and that it's UVW wrapped or something liek that.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Dark Baron
Community Member
*
Posts: 16


« Reply #19 on: October 16, 2004, 11:32:05 AM »

Yikes!  I really dont know what all that means, but I'll look around in 3DS Max...  Thats most likely the problem since I tried all the other things with no success...  Thanks again for your help..  I'll try those and let you all know if it worked.  I appreciate this help.


Edit:

I feel dumb... but I didnt have set material(0)... NOW IT WORKS!  im so excited lol, sorry for all these questions.  Thanks once again for all your help.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks