detect instances of model
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.
placed 3 copy of them with different sizeDo 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?)
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.
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.
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.
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.
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.