yufeih / Nine.Graphics

A real-time rendering library
MIT License
42 stars 8 forks source link

3D Models #3

Open erictuvesson opened 9 years ago

erictuvesson commented 9 years ago

How would models work with different types of material?

yufeih commented 9 years ago

Lets separate the concept of material and rendering pipeline, then start with a fixed material. This material contains the most basic and commonly used parameters including DiffuseColor, DiffuseTexture, NormalTexture, SpecularColor, SpecularTexture..., the rendering pipeline then picks up the material and render the model differently. There might be a forward pipeline, a deferred pipeline, and probably some custom pipeline, the all work against the above material definition. The point is to put the shaders inside pipeline, and materials are just declarations of what models should look like. This way, we can restyle the world by switching to a new pipeline.

But there are times when a model wants to be different and be rendered using a custom shader, lets tackle that problem later :)

erictuvesson commented 8 years ago

Where are we going to handle the loading of models? Should it be in Nine.Geometry, but then there is animation too. So in Nine.Graphics (.Content)?

yufeih commented 8 years ago

Just like textures, the loader will be in Nine.Graphics.Content, the loader may reference other model loading libraries for the actual parsing.

erictuvesson commented 8 years ago

If we are going the same way as font loading then I would suggest using Assimp.

yufeih commented 8 years ago

That is a really impressive library. Thanks for the recommendation!