Jump to content
  • Advertisement
Sign in to follow this  
newtechnology

detect instances of model

This topic is 1588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Suppose I modeled a box in a 3d modeling package and placed 3 copy of them with different size. Now how do I detect this 3 instances while loading it in my 3d application?

Share this post


Link to post
Share on other sites
Advertisement


placed 3 copy of them with different size

Do you mean different files? Or are you loading a single file and scaling the model in your application?

 

If they're different files, they would have different filenames or paths to distinguish them.

 

If you load a single model and scale it, you would know the scale you're applying.

 

Perhaps you can provide more information about what you're trying to do.

Share this post


Link to post
Share on other sites

 


placed 3 copy of them with different size

Do you mean different files? Or are you loading a single file and scaling the model in your application?

 

If they're different files, they would have different filenames or paths to distinguish them.

 

If you load a single model and scale it, you would know the scale you're applying.

 

Perhaps you can provide more information about what you're trying to do.

 

 

 

 

no, I load directly my level model and it contains many instances of same objects. How do I detect this instances while loading model? (Via matching number of vertices or how?)

Share this post


Link to post
Share on other sites

How are you creating your levels?

I would just store this information in the level file by writing the vertices of the object once

and have multiple references to this object each with a different position.

Share this post


Link to post
Share on other sites
That depends entirely upon the format of the file i.e. does the format support groups somehow and are the different subsections identified as different groups etc.

If it is just raw vertex and face info then yes, of course you will have to use vertex count. What else did you have in mind?

Normally you would store the model once and apply different scaling matrices when rendering it.

Share this post


Link to post
Share on other sites
Okay. So different approach. Why do you have the same model in different sizes? What are you trying to achieve?

Share this post


Link to post
Share on other sites

Okay. So different approach. Why do you have the same model in different sizes? What are you trying to achieve?

 

Because I'm creating a map and a map would have same model repeated many times. For example: you have one tree model and you draw it many times to make forest with API Instancing feature to reduce overhead.

Share this post


Link to post
Share on other sites
Why do you believe that would take additional models? Do you have a reason instance scaling would not work?

The typical solution is to allow the engine to automatically scale things to different sizes for you; you provide only a single model nearest the 'ideal' size. The system can automatically scale, twist, and somewhat deform the foliage segments as they are generated. You only need to provide variations if they are more than the system can automatically generate.

Foliage usually is built from a very small number of models and textures, which is coupled with a lot of data about where each instance should be placed and deformed.


The same is true for most other objects as well. You build a small number of models and blueprints, and then create all the instances you need from them. There is no detection needed for that. Detection implies that your engine (in this case UDK) does not know about them. When you build your blueprints it knows everything about them, no detection necessary. Edited by frob

Share this post


Link to post
Share on other sites

Why do you believe that would take additional models? Do you have a reason instance scaling would not work?

The typical solution is to allow the engine to automatically scale things to different sizes for you; you provide only a single model nearest the 'ideal' size. The system can automatically scale, twist, and somewhat deform the foliage segments as they are generated. You only need to provide variations if they are more than the system can automatically generate.

Foliage usually is built from a very small number of models and textures, which is coupled with a lot of data about where each instance should be placed and deformed.


The same is true for most other objects as well. You build a small number of models and blueprints, and then create all the instances you need from them. There is no detection needed for that. Detection implies that your engine (in this case UDK) does not know about them. When you build your blueprints it knows everything about them, no detection necessary.

 

I use that map in my own game from scratch but I just model level in UDK so I do not use UDK for making my game :p.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!