MrPablo2000 Posted August 2, 2018 Posted August 2, 2018 (edited) Hi, I want use in my mod OBJ models for block(block are street lamps). But I don't know how make this Have you got any toturial about this ? Paweł Edited August 8, 2018 by MrPablo2000 Edited Topic, because i have more problems.. Quote
_Cruelar_ Posted August 2, 2018 Posted August 2, 2018 OBJ without animation OBJ with TESR Quote My Projects: Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming) Important: As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts
Animefan8888 Posted August 2, 2018 Posted August 2, 2018 (edited) 2 hours ago, MrPablo2000 said: Hi, I want use in my mod OBJ models for block(block are street lamps). But I don't know how make this Have you got any toturial about this ? Paweł If you are going to have animation use a FastTESR and not a normal TESR. It actually does most of that code for you and it is more efficient. You to @_Cruelar_ Edited August 2, 2018 by Animefan8888 Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
MrPablo2000 Posted August 2, 2018 Author Posted August 2, 2018 (edited) Thanks I have got second question - my OBJ model is from sketchup and it have only .obj file and .mtl . It hasn't got texture in .png. How use the .mtl? Paweł Edited August 2, 2018 by MrPablo2000 Quote
Animefan8888 Posted August 2, 2018 Posted August 2, 2018 7 minutes ago, MrPablo2000 said: I have got second question - my OBJ model is from sketchup and it have only .obj file and .mtl . It hasn't got texture in .png. How use the .mtl? Check out the docs. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
MrPablo2000 Posted August 3, 2018 Author Posted August 3, 2018 Yea...I make all as toturial "OBJ without animation", but i think there is a problem with blokstate .json file. I copied it from link, changed modid to my, and to my obj model name, but i have this error in eclipse log: https://pastebin.com/QRZmnSsk This is my blockstate json, where i defited the location of OBJ model { "forge_marker": 1, "defaults": { "custom": { "flip-v": true }, "model": "modtut: model.obj" }, "variants": { "normal": [{}], "inventory": [{}] } } I don't know, why the "model.obj" it understand as "model.obj.json".. Quote
Musicgun47 Posted August 4, 2018 Posted August 4, 2018 (edited) It looks like you haven't properly instantiated the OBJLoader. If you had, the loader should have a line like this: [main/INFO] [FML/mod_id]: OBJLoader: Domain mod_id has been added. before it attempts to load the model. Make sure you've included the OBJLoader.INSTANCE.addDomain(MODID); line in the preinitialization stage. Edited August 4, 2018 by Musicgun47 Quote
MrPablo2000 Posted August 4, 2018 Author Posted August 4, 2018 *Bump* I had now this error https://pastebin.com/amFm81vy I hate it... Quote
Draco18s Posted August 4, 2018 Posted August 4, 2018 Caused by: java.lang.RuntimeException: OBJLoader.Parser: Exception parsing line #104: `vt -0.087167 -0.000000` IIRC the Minecraft OBJ loader does not take texture UV coordinates. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Musicgun47 Posted August 5, 2018 Posted August 5, 2018 This is a problem with your UV mapping for your model. Minecraft does not support UV mappings outside of the 0-1 range. This means all of your mappings need to be inside this range for the model to be loaded. If you're using Sketchup, All the mapping should be within the non-greyed out area of the UV editor. Quote
MrPablo2000 Posted August 5, 2018 Author Posted August 5, 2018 I make all as your solution, but it stil isn't working.. Eclipse log: https://pastebin.com/9RcceyEE ModelORO.obj: https://pastebin.com/wTTej896 modeloro.mtl https://pastebin.com/Gf7twXN8 Texture modeloro.png is in the same folder as modeloro.mtl and modeloro.png Quote
V0idWa1k3r Posted August 5, 2018 Posted August 5, 2018 Caused by: java.lang.RuntimeException: OBJLoader.Parser: Exception parsing line #70: `vt -1.42413e-16 0.845956` You still have uv coordinates issues. The uvs must be in range [0-1]. -1.42413e-16 isn't. 1 Quote
MrPablo2000 Posted August 5, 2018 Author Posted August 5, 2018 Thanks - now ist rendering on placed - but the model is too big ? Quote
Animefan8888 Posted August 5, 2018 Posted August 5, 2018 4 minutes ago, MrPablo2000 said: Thanks - now ist rendering on placed - but the model is too big ? You will need to scale it down in your modeling program nothing bigger than a block. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Musicgun47 Posted August 5, 2018 Posted August 5, 2018 That's just a scaling issue. Fixing it it mostly just trial and error until you get it to the size you want. You can either fix it in the blockstate JSON which is tedious as you'd have to include the scaling for all variations, or, the easier way, scale it down in your 3D modelling program until it's the right size in game. Quote
MrPablo2000 Posted August 5, 2018 Author Posted August 5, 2018 How is the size of normal block in minecraft ? For how size I must scale down my model ? Quote
Draco18s Posted August 5, 2018 Posted August 5, 2018 6 minutes ago, MrPablo2000 said: How is the size of normal block in minecraft ? For how size I must scale down my model ? 1 meter. But I think all you have to do is make the object 1 whatever-unit-your-modeling-program-uses so that the output OBJ file has all of the coordinates in the [0-1] range as well. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
MrPablo2000 Posted August 5, 2018 Author Posted August 5, 2018 I deleted "-" and changed it, that all coordinates are in 0-1 range. But is still too big. What I can do ? Quote
Draco18s Posted August 5, 2018 Posted August 5, 2018 7 minutes ago, MrPablo2000 said: I deleted "-" and changed it, that all coordinates are in 0-1 range. But is still too big. What I can do ? Can you post the whole model file? Also, "1.42413e-16" can be changed to "0" just fine. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
MrPablo2000 Posted August 6, 2018 Author Posted August 6, 2018 Spoiler # Exported from 3D Builder mtllib modeloro.mtl o Object.1 v 65.094292 152.186310 43.318497 v 57.123783 145.573685 10.246483 v 57.123783 152.186310 41.182762 v 80.562592 145.573685 16.526886 v 70.929085 152.186310 49.153290 v 97.720695 145.573685 33.684990 v 73.064819 152.186310 57.123798 v 104.001099 145.573685 57.123798 v 97.720695 145.573685 80.562614 v 70.929085 152.186310 65.094315 v 65.094292 152.186310 70.929108 v 57.123783 152.186310 73.064835 v 49.153263 152.186310 43.318497 v 49.153263 152.186310 70.929108 v 43.318478 152.186310 49.153290 v 43.318478 152.186310 65.094315 v 41.182743 152.186310 57.123798 v 16.526802 145.573685 33.684990 v 10.246399 145.573685 57.123798 v 3.078480 130.460785 57.123798 v 10.319185 130.460785 30.101151 v 30.101162 130.460785 10.319023 v 33.684967 145.573685 16.526886 v 57.123783 130.460785 3.078499 v 57.123783 130.460785 0.000015 v 28.561920 130.460785 7.652939 v 7.653131 130.460785 28.561913 v 0.000000 130.460785 57.123798 v 0.000000 126.685844 57.123798 v 7.653131 126.685844 28.561913 v 28.561920 126.685844 7.652939 v 57.123783 126.685844 0.000015 v 85.685669 126.685844 7.652939 v 85.685669 130.460785 7.652939 v 84.146431 130.460785 10.319023 v 103.928558 130.460785 30.101151 v 111.169083 130.460785 57.123798 v 103.928558 130.460785 84.146423 v 84.146431 130.460785 103.928398 v 80.562592 145.573685 97.720779 v 57.123783 145.573685 104.001183 v 33.684967 145.573685 97.720779 v 16.526802 145.573685 80.562614 v 10.319185 130.460785 84.146423 v 7.653131 130.460785 85.685661 v 7.653131 126.685844 85.685661 v 5.896538 126.685844 57.123798 v 12.759688 126.685844 82.737358 v 32.004604 69.517250 71.626488 v 28.118530 69.517250 57.123798 v 12.759688 126.685844 31.510246 v 32.004604 69.517250 42.621117 v 42.621094 69.517250 32.004318 v 31.510221 126.685844 12.759560 v 57.123783 126.685844 5.896378 v 82.737335 126.685844 12.759560 v 101.488022 126.685844 31.510246 v 106.594643 126.685844 28.561913 v 106.594643 130.460785 28.561913 v 114.247566 130.460785 57.123798 v 106.594643 130.460785 85.685661 v 85.685669 130.460785 106.594452 v 57.123783 130.460785 111.169106 v 57.123783 130.460785 114.247581 v 30.101162 130.460785 103.928398 v 28.561920 130.460785 106.594452 v 28.561920 126.685844 106.594452 v 31.510221 126.685844 101.487892 v 42.621094 69.517250 82.242981 v 51.515465 -0.000000 66.837776 v 47.409805 -0.000000 62.732117 v 45.907139 -0.000000 57.123798 v 47.409805 -0.000000 51.515480 v 51.515465 -0.000000 47.409828 v 57.123783 -0.000000 45.907166 v 57.123783 69.517250 28.118431 v 71.626465 69.517250 32.004318 v 82.243263 69.517250 42.621117 v 86.129150 69.517250 57.123798 v 108.351204 126.685844 57.123798 v 114.247566 126.685844 57.123798 v 106.594643 126.685844 85.685661 v 85.685669 126.685844 106.594452 v 57.123783 126.685844 114.247581 v 57.123783 126.685844 108.351044 v 57.123783 69.517250 86.129051 v 57.123783 -0.000000 68.340439 v 62.732101 0.000000 47.409828 v 66.837753 0.000000 51.515480 v 68.340416 0.000000 57.123798 v 66.837753 0.000000 62.732117 v 82.243263 69.517250 71.626488 v 101.488022 126.685844 82.737358 v 82.737335 126.685844 101.487892 v 71.626465 69.517250 82.242981 v 62.732101 0.000000 66.837776 vt 0.470769 0.998038 vt 0.683522 0.955499 vt 0.484508 0.998038 vt 0.643120 0.955499 vt 0.433233 0.998038 vt 0.532740 0.955499 vt 0.381959 0.998038 vt 0.381959 0.955499 vt 0.231177 0.955499 vt 0.330684 0.998038 vt 0.293148 0.998038 vt 0.279409 0.998038 vt 0.381959 0.858276 vt 0.555796 0.858276 vt 0.683054 0.858276 vt 0.729633 0.858276 vt 0.749437 0.858276 vt 0.700204 0.858276 vt 0.565698 0.858276 vt 0.381959 0.833991 vt 0.565698 0.833991 vt 0.700204 0.833991 vt 0.749437 0.833991 vt 0.208121 0.858276 vt 0.080863 0.858276 vt 0.120797 0.955499 vt 0.080395 0.955499 vt 0.198219 0.858276 vt 0.198219 0.833991 vt 0.217185 0.833991 vt 0.288663 0.466225 vt 0.381959 0.466225 vt 0.546732 0.833991 vt 0.475254 0.466225 vt 0.543552 0.466225 vt 0.667354 0.833991 vt 0.711505 0.833991 vt 0.063713 0.858276 vt 0.034284 0.858276 vt 0.014480 0.858276 vt 0.063713 0.833991 vt 0.096563 0.833991 vt 0.220365 0.466225 vt 0.319469 0.019020 vt 0.345880 0.019020 vt 0.381959 0.019020 vt 0.418037 0.019020 vt 0.444448 0.019020 vt 0.454115 0.019020 vt 0.568550 0.466225 vt 0.014480 0.833991 vt 0.052412 0.833991 vt 0.195367 0.466225 vt 0.309802 0.019020 usemtl oro f 1/1 2/2 3/3 f 3/3 11/11 1/1 f 1/1 11/11 10/10 f 1/1 10/10 5/5 f 5/5 4/4 1/1 f 4/4 5/5 6/6 f 36/14 4/4 6/6 f 8/8 36/14 6/6 f 6/6 7/7 8/8 f 7/7 9/9 8/8 f 9/9 37/13 8/8 f 37/13 9/9 38/24 f 38/24 61/28 37/13 f 37/13 61/28 60/13 f 59/19 37/13 60/13 f 60/13 58/21 59/19 f 33/22 59/19 58/21 f 57/33 33/22 58/21 f 57/33 58/21 80/20 f 79/32 57/33 80/20 f 80/20 92/31 79/32 f 91/45 79/32 92/31 f 92/31 96/44 91/45 f 96/44 89/47 91/45 f 91/45 89/47 90/46 f 89/47 79/32 90/46 f 79/32 89/47 78/34 f 89/47 77/35 78/34 f 77/35 57/33 78/34 f 57/33 77/35 56/36 f 77/35 55/37 56/36 f 55/37 32/23 56/36 f 56/36 32/23 33/22 f 25/17 33/22 32/23 f 32/23 26/18 25/17 f 26/18 22/15 25/17 f 25/17 22/15 24/16 f 25/17 24/16 35/15 f 25/17 35/15 34/18 f 34/18 35/15 36/14 f 34/18 36/14 59/19 f 2/2 35/15 24/16 f 24/16 23/4 2/2 f 13/1 2/2 23/4 f 23/4 15/5 13/1 f 15/5 14/11 13/1 f 13/1 14/11 12/12 f 13/1 12/12 3/3 f 14/11 41/27 12/12 f 40/26 12/12 41/27 f 63/39 40/26 41/27 f 41/27 65/25 63/39 f 65/25 64/40 63/39 f 63/39 64/40 62/38 f 63/39 62/38 39/25 f 39/25 62/38 38/24 f 84/51 62/38 64/40 f 64/40 67/41 84/51 f 67/41 68/42 84/51 f 84/51 68/42 85/52 f 84/51 85/52 94/42 f 84/51 94/42 83/41 f 83/41 94/42 93/30 f 83/41 93/30 82/29 f 61/28 83/41 82/29 f 81/20 61/28 82/29 f 82/29 80/20 81/20 f 83/41 61/28 62/38 f 82/29 93/30 80/20 f 95/43 93/30 94/42 f 94/42 86/53 95/43 f 86/53 96/44 95/43 f 96/44 86/53 87/54 f 87/54 88/48 96/44 f 87/54 75/49 88/48 f 76/50 88/48 75/49 f 75/49 53/35 76/50 f 54/36 76/50 53/35 f 53/35 51/33 54/36 f 51/33 31/22 54/36 f 54/36 31/22 32/23 f 51/33 30/21 31/22 f 27/19 31/22 30/21 f 29/20 27/19 30/21 f 30/21 47/20 29/20 f 47/20 46/29 29/20 f 46/29 28/13 29/20 f 28/13 46/29 45/28 f 45/28 20/13 28/13 f 20/13 27/19 28/13 f 27/19 20/13 21/14 f 27/19 21/14 26/18 f 20/13 18/6 21/14 f 18/6 22/15 21/14 f 22/15 18/6 23/4 f 18/6 20/13 19/8 f 17/7 18/6 19/8 f 43/9 17/7 19/8 f 17/7 43/9 16/10 f 16/10 15/5 17/7 f 42/26 16/10 43/9 f 44/24 42/26 43/9 f 43/9 20/13 44/24 f 42/26 44/24 65/25 f 44/24 66/38 65/25 f 44/24 45/28 66/38 f 45/28 67/41 66/38 f 16/10 42/26 14/11 f 18/6 17/7 15/5 f 20/13 43/9 19/8 f 20/13 45/28 44/24 f 67/41 45/28 46/29 f 46/29 48/30 67/41 f 46/29 47/20 48/30 f 47/20 49/31 48/30 f 49/31 68/42 48/30 f 68/42 49/31 69/43 f 49/31 70/44 69/43 f 87/54 69/43 70/44 f 70/44 49/31 71/45 f 71/45 74/48 70/44 f 70/44 74/48 75/49 f 71/45 73/47 74/48 f 52/34 74/48 73/47 f 72/46 52/34 73/47 f 52/34 72/46 50/32 f 50/32 51/33 52/34 f 51/33 50/32 47/20 f 71/45 50/32 72/46 f 74/48 52/34 53/35 f 73/47 71/45 72/46 f 50/32 71/45 49/31 f 49/31 47/20 50/32 f 27/19 29/20 28/13 f 31/22 27/19 26/18 f 47/20 30/21 51/33 f 51/33 53/35 52/34 f 76/50 54/36 55/37 f 53/35 75/49 74/48 f 88/48 76/50 77/35 f 70/44 75/49 87/54 f 69/43 87/54 86/53 f 85/52 69/43 86/53 f 93/30 95/43 92/31 f 86/53 94/42 85/52 f 69/43 85/52 68/42 f 67/41 48/30 68/42 f 67/41 64/40 66/38 f 62/38 84/51 83/41 f 65/25 66/38 64/40 f 65/25 41/27 42/26 f 40/26 63/39 39/25 f 39/25 9/9 40/26 f 10/10 40/26 9/9 f 12/12 40/26 11/11 f 41/27 14/11 42/26 f 15/5 16/10 14/11 f 15/5 23/4 18/6 f 35/15 2/2 4/4 f 23/4 24/16 22/15 f 26/18 21/14 22/15 f 26/18 32/23 31/22 f 33/22 25/17 34/18 f 54/36 32/23 55/37 f 55/37 77/35 76/50 f 77/35 89/47 88/48 f 96/44 88/48 89/47 f 96/44 92/31 95/43 f 79/32 91/45 90/46 f 92/31 80/20 93/30 f 57/33 79/32 78/34 f 80/20 58/21 81/20 f 56/36 33/22 57/33 f 59/19 33/22 34/18 f 58/21 60/13 81/20 f 59/19 36/14 37/13 f 61/28 81/20 60/13 f 38/24 62/38 61/28 f 9/9 39/25 38/24 f 9/9 7/7 10/10 f 36/14 8/8 37/13 f 4/4 36/14 35/15 f 7/7 6/6 5/5 f 5/5 10/10 7/7 f 40/26 10/10 11/11 f 3/3 12/12 11/11 f 2/2 13/1 3/3 f 2/2 1/1 4/4 OBJ file Quote
Draco18s Posted August 6, 2018 Posted August 6, 2018 5 hours ago, MrPablo2000 said: v 65.094292 152.186310 43.318497 These coordinates are not 0-1. You haven't scaled your model. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
MrPablo2000 Posted August 8, 2018 Author Posted August 8, 2018 Friend Musicgun47 help me, rescaled my model and now my model is loading correctly Thanks!. But now i have an erro with eclipse/forge src - eclipse doesn't compile new classes and when I run my Client i haven't got new classes.. Quote
Animefan8888 Posted August 8, 2018 Posted August 8, 2018 1 hour ago, MrPablo2000 said: But now i have an erro with eclipse/forge src - eclipse doesn't compile new classes and when I run my Client i haven't got new classes.. It's a little hard to help when we can't see the code, and if it is a red line underneath the code listen to eclipse for the error and solve it. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.