Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Trying to load .fbx file with normal map (I think I'm very close)

$
0
0

@tyekx wrote:

Dear MonoGame Community,

I successfully implemented a shader that takes a normal map and uses it to create the illusion of bumpiness on a given surface. When I decided to generalize my solution, I realized I needed a way to automatize loading my assets, because it'll get messy very quickly. After a decent amount of research I could load my maps and shader source with a custom ModelProcessor. Right now I have a CustomModelProcessor and a CustomMaterialProcessor and they pretty much work.

It feels like I miss one last step, In order to use my HLSL code in a clean way, I wish to have a NormalMapEffect, that is derived from the Effect class, and my idea is to override the OnApply() method. This is done basically but I don't know where to instantiate this, so that my Mesh.MeshParts will have a type of NormalMapEffect (where desired). Right now, the type that I get from my content pipeline into the MeshParts is EffectMaterial.

If you could guide me I'd be very grateful :bow:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles