Jump to content

  • Log In with Google      Sign In   
  • Create Account

Parsing Models with Multiple Textures


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 yanksfan2344   Members   -  Reputation: 146

Like
0Likes
Like

Posted 16 November 2012 - 12:13 AM

So I'm working on a graphics project for school and I got model loading set up a few weeks ago. Essentially I used lib3ds to get a list of all of the vertices of a model and then render them. This works fine for models with a single texture. My question is how should I go about managing models with more than one texture? Is there a common system in .3ds files for such a thing? Like is it a per mesh assignment? It seems like if each mesh was assigned a texture then doing this would not be a big deal, just a matter of rebinding the texture when the next mesh's vertices come along.

If this isn't possible or practical that's fine too. For the scope of this project single texture models will work, I just want to get fancy if I can.

Sponsor:

#2 Khatharr   Crossbones+   -  Reputation: 3084

Like
0Likes
Like

Posted 16 November 2012 - 12:39 AM

I've never worked with lib3ds so I can't advise, but you may want to ask in the graphics programming forum. I'd be amazed if there weren't a simple way to do so.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#3 BCullis   Crossbones+   -  Reputation: 1813

Like
0Likes
Like

Posted 16 November 2012 - 10:47 AM

While I can't speak to the specific library, your per-mesh idea is what I would recommend with any 3d library. If a "model" is just composed of 1 to n meshes, each mesh can have its own texture, refer to the same texture, etc paralleling the "materials" concept seen in most modeling tools. It's just up to you to then improve efficiency through things like material-based batching (to reduce the number of rebindings needed to render a multi-material or multi-texture scene).


Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too

#4 yanksfan2344   Members   -  Reputation: 146

Like
0Likes
Like

Posted 18 November 2012 - 05:15 PM

I've never worked with lib3ds so I can't advise, but you may want to ask in the graphics programming forum. I'd be amazed if there weren't a simple way to do so.


Is there a way to move this such that there isn't a duplicate?

#5 ApochPiQ   Moderators   -  Reputation: 16423

Like
0Likes
Like

Posted 18 November 2012 - 05:19 PM

Moved :-)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS