Welcome
Welcome to xnaquickstart

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Minor Change - Update() method

Wish the engine had a specific feature? Post your requests here, you will be heard. :)

Moderators: Coordinators, Developers

Postby lordikon on Thu Sep 25, 2008 2:48 pm

You cannot pass a static model into the render component, because the render component is what loads the model. Unless you exposed model loading to something outside of the render component, which defeats the purpose. There is no importance to having a model for rendering without a render component.

Terrain and Skydomes are both models. If terrain doesn't have a render component, that is because it hasn't been converted to do so. It certainly should be made to have one. The only reason I can imagine that is doesn't have a render component is due to the fact that each quad-tree section would have its own render chunk, and possibly then each quad-tree section would need its own render component (which doesn't work because you can not have two of the same component on a single entity).

There is no reason I can think of that sky cannot just be treated as another model, and thus us the render component with the path of the dome passed in. Of course it may need a different shader, but I think that material can be setup to handle that.
User avatar
lordikon
Administrator
 
Posts: 342
Joined: Thu Apr 03, 2008 11:26 pm
Location: Colorado

Postby Mikee on Thu Sep 25, 2008 3:15 pm

You cannot pass a static model into the render component, because the render component is what loads the model. Unless you exposed model loading to something outside of the render component, which defeats the purpose.


Well not really.. the RenderComponent isn't loading the model, it's simply calling one line - LoadModel on the ModelLoader object (which is part of the Game object). Model loading itself is nothing to do with the RenderComponent.

Code: Select all
public void LoadModel(string modelPath)
{
this.model = this.parentEntity.Game.ModelLoader.LoadStaticModel(modelPath);
}


RenderComponent would still have a purpose (returning the render chunks..etc.. ) but also be able to handle different types of model and not just be limited to a StaticModel loaded from a file.

There is no reason I can think of that sky cannot just be treated as another model, and thus us the render component with the path of the dome passed in.


But that's assuming the person wants to load in a model of the dome instead of generating it in code.


But, you're the boss! What you say goes ;) Just wanted to put my thoughts and reasoning down on paper (...screen). :)
Mikee
Beginner
 
Posts: 40
Joined: Tue Sep 16, 2008 11:41 pm

Postby lordikon on Thu Sep 25, 2008 4:48 pm

ModelLoader was going to be expanded to handle any model type, not just static models, we just hadn't gotten to other model types yet. :)
User avatar
lordikon
Administrator
 
Posts: 342
Joined: Thu Apr 03, 2008 11:26 pm
Location: Colorado

Previous

Return to Suggestions & Ideas

Who is online

Users browsing this forum: No registered users and 0 guests

cron