DBLouis Posted December 2, 2015 Share Posted December 2, 2015 Hi There is no ambient occlusion on the ore block, which are rendered with a custom model. Here one image to understand the problem : And some code : Block class : https://gist.github.com/Spooky4672/92d49f456b063e2fecdb Model class : https://gist.github.com/Spooky4672/6adc83c99b7593e4ab98 That's weird because in the model class ambient occlusion is set to true ... Quote Link to comment Share on other sites More sharing options...
DBLouis Posted December 2, 2015 Author Share Posted December 2, 2015 I have just updated to 1.8 - 11.14.4.1563 and there are some changes : Ambient occlusion seems to work but not always, the block on the grass are too dark and the items are all black Quote Link to comment Share on other sites More sharing options...
LexManos Posted December 2, 2015 Share Posted December 2, 2015 I'll have fry take a look at the issue, but also, why is this a custom model.. you're rendering a normal model... just with two layers... JSON should allow you to do that just fine. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
DBLouis Posted December 3, 2015 Author Share Posted December 3, 2015 Yes but not dynamically. The mod generates all ore/rock combinations Quote Link to comment Share on other sites More sharing options...
RainWarrior Posted December 3, 2015 Share Posted December 3, 2015 1) lighting system needs correct normals to be specified to generate the correct AO shadowing data; you're using very old hard-coded code to generate the vertex data, which doesn't do that - if you want to generate the model like this, look at custom model loaders that are in forge. 2) retexturing like this can be accomplished more easily - get cube model from the registry (ModelLoaderRegistry.getModel(new ResourceLocation("block/cube_all"), or something similar), or make a json model with 2 layers, which would be more appropriate for this; cast to IRetexturableModel (with checking), and call retexture. Look at uses of IRetexturableModel in forge for examples. Quote Link to comment Share on other sites More sharing options...
DBLouis Posted December 3, 2015 Author Share Posted December 3, 2015 I have tested a lot of things, nothings works. When you say "cast to IRetexturableModel (with checking)" can you show me an example. Because in every cases, I end up with a exception Do I have to implement an IRetexturableModel ? Or can I use the class Wrapper in B3DLoader ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.