Important information: this site is currently scheduled to go offline indefinitely by end of the year.

SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post questions about game models here, or help out others!
Post Reply
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by eatrawmeat391 »

So I translated Glogow Poland Mariusz Szkaradek's Blender Python script to use with my tool to export the obj from the yobj.It can extract the geometry vertices (v x y z),it cannot extract normal(vt x y z) (I think Blender generates them after exporting to obj) but I add that function because the normal data is in the file.It can generate the face data well (f vt1 vt2 vt3).However I'm stuck in the texture coordinate generation process, look like the python script stores their data,but what happen when it writes that data into the obj remains unknown:
Here is the output data

Code: Select all

vt 0.107457 0.330933
vt 0.129534 0.398283
vt 0.096308 0.397830
vt 0.095652 0.443647
vt 0.130288 0.445885
vt 0.090796 0.475926
vt 0.132665 0.482387
vt 0.093501 0.509683
vt 0.133494 0.516121
vt 0.102411 0.542939
vt 0.140307 0.540209
vt 0.121089 0.562367
vt 0.139583 0.560058
vt 0.126217 0.581850
vt 0.135682 0.576947
vt 0.140772 0.588522
vt 0.165147 0.401981
vt 0.151410 0.356274
vt 0.175624 0.361115
vt 0.177355 0.332747
vt 0.149021 0.311224
vt 0.176603 0.303905
vt 0.156442 0.272696
vt 0.186243 0.270073
vt 0.197523 0.247429
vt 0.207559 0.269908
vt 0.233826 0.241476
vt 0.238034 0.260440
vt 0.266613 0.248713
vt 0.270564 0.271628
vt 0.306858 0.270395
vt 0.306858 0.281528
vt 0.134507 0.337916
vt 0.128001 0.262178
vt 0.072936 0.323949
vt 0.042006 0.312525
vt 0.063101 0.400905
vt 0.021310 0.400219
vt 0.054964 0.473620
vt 0.017543 0.487290
vt 0.059191 0.524878
vt 0.015631 0.541558
vt 0.061468 0.560407
vt 0.019596 0.595676
vt 0.102939 0.574608
vt 0.103318 0.594731
vt 0.119465 0.595470
vt 0.122383 0.604779
vt 0.134912 0.603320
vt 0.140740 0.616768
vt 0.145563 0.614130
vt 0.158045 0.623570
vt 0.156737 0.614875
vt 0.178318 0.624918
vt 0.199958 0.613535
vt 0.207435 0.620599
vt 0.174231 0.522886
vt 0.172879 0.544163
vt 0.209139 0.539487
vt 0.209636 0.550595
vt 0.239952 0.559534
vt 0.236592 0.569396
vt 0.255295 0.586483
vt 0.229019 0.581042
vt 0.240990 0.587722
vt 0.228461 0.590080
vt 0.229128 0.592547
vt 0.202145 0.589254
vt 0.217531 0.597975
vt 0.199620 0.599830
vt 0.229860 0.601733
vt 0.230710 0.607924
vt 0.238001 0.612086
vt 0.208237 0.625381
vt 0.210134 0.628911
vt 0.176719 0.630514
vt 0.175680 0.635527
vt 0.152130 0.628734
vt 0.149798 0.635771
vt 0.130510 0.625753
vt 0.124583 0.634839
vt 0.101418 0.616318
vt 0.089220 0.640513
vt 0.059796 0.597411
vt 0.248286 0.218480
vt 0.239850 0.178169
vt 0.272227 0.183241
vt 0.267549 0.144400
vt 0.235401 0.142978
vt 0.267777 0.117207
vt 0.236524 0.124914
vt 0.272848 0.081479
vt 0.242264 0.087531
vt 0.211830 0.051355
vt 0.206325 0.106315
vt 0.146918 0.099187
vt 0.143594 0.156247
vt 0.087023 0.189772
vt 0.110627 0.215798
vt 0.051278 0.256667
vt 0.181151 0.229099
vt 0.218576 0.209573
vt 0.277866 0.224334
vt 0.306858 0.249292
vt 0.306858 0.223870
vt 0.119701 0.612288
vt 0.135792 0.620406
vt 0.154154 0.626737
vt 0.210753 0.630098
vt 0.176466 0.640086
vt 0.151550 0.644387
vt 0.123860 0.660355
vt 0.087095 0.665424
vt 0.053225 0.634419
vt 0.069963 0.692989
vt 0.022612 0.637935
vt 0.013430 0.713101
vt 0.158403 0.601276
vt 0.135927 0.595015
vt 0.164201 0.597788
vt 0.174193 0.583786
vt 0.173708 0.572371
vt 0.203646 0.578965
vt 0.209708 0.563441
vt 0.306858 0.316877
vt 0.272362 0.302004
vt 0.306858 0.302030
vt 0.270552 0.282842
vt 0.240938 0.283165
vt 0.215405 0.291918
vt 0.199620 0.295307
vt 0.306858 0.322873
vt 0.274126 0.324237
vt 0.274125 0.317562
vt 0.242635 0.318370
vt 0.241238 0.305437
vt 0.216898 0.306782
vt 0.199604 0.308723
vt 0.211669 0.175633
vt 0.156420 0.197264
vt 0.306858 0.144565
vt 0.306858 0.186929
vt 0.306858 0.114925
vt 0.306858 0.078329
vt 0.306858 0.040185
vt 0.124961 0.682440
vt 0.122522 0.720063
vt 0.080859 0.743646
vt 0.151548 0.762850
vt 0.139208 0.814874
vt 0.173839 0.558403
vt 0.211592 0.641869
vt 0.246747 0.618234
vt 0.200701 0.140938
vt 0.209504 0.439356
vt 0.173881 0.453382
vt 0.046176 0.818450
vt 0.220597 0.315770
vt 0.243853 0.325200
vt 0.223820 0.321615

Code: Select all

f 62/1/1 84/2/2 59/3/3
f 59/3/3 84/2/2 60/4/4
f 84/2/2 66/5/5 60/4/4
f 60/4/4 66/5/5 69/6/6
f 66/5/5 68/7/7 69/6/6
f 69/6/6 68/7/7 70/8/8
f 68/7/7 71/9/9 70/8/8
f 70/8/8 71/9/9 88/10/10
f 71/9/9 72/11/11 88/10/10
f 88/10/10 72/11/11 108/12/12
f 72/11/11 109/13/13 108/12/12
f 108/12/12 109/13/13 120/14/14
f 109/13/13 119/15/15 120/14/14
f 120/14/14 119/15/15 121/16/16
f 85/17/17 83/18/18 87/19/19
f 87/19/19 83/18/18 82/20/20
f 83/18/18 80/21/21 82/20/20
f 82/20/20 80/21/21 81/22/22
f 80/21/21 77/23/23 81/22/22
f 81/22/22 77/23/23 79/24/24
f 77/23/23 78/25/25 79/24/24
f 79/24/24 78/25/25 56/26/26
f 78/25/25 41/27/27 56/26/26
f 56/26/26 41/27/27 37/28/28
f 41/27/27 30/29/29 37/28/28
f 37/28/28 30/29/29 46/30/30
f 30/29/29 36/31/31 46/30/30
f 46/30/30 36/31/31 35/32/32
f 66/5/5 84/2/2 85/17/17
f 85/17/17 84/2/2 61/33/33
f 84/2/2 62/1/1 61/33/33
f 61/33/33 62/1/1 26/34/34
f 62/1/1 29/35/35 26/34/34
f 26/34/34 29/35/35 27/36/36
f 29/35/35 57/37/37 27/36/36
f 27/36/36 57/37/37 58/38/38
f 57/37/37 63/39/39 58/38/38
f 58/38/38 63/39/39 64/40/40
f 63/39/39 65/41/41 64/40/40
f 64/40/40 65/41/41 101/42/42
f 65/41/41 98/43/43 101/42/42
f 101/42/42 98/43/43 100/44/44
f 70/8/8 88/10/10 65/41/41
f 65/41/41 88/10/10 98/43/43
f 88/10/10 118/45/45 98/43/43
f 98/43/43 118/45/45 137/46/46
f 118/45/45 144/47/47 137/46/46
f 137/46/46 144/47/47 149/48/48
f 144/47/47 150/49/49 149/48/48
f 149/48/48 150/49/49 152/50/50
f 150/49/49 151/51/51 152/50/50
f 152/50/50 151/51/51 157/52/52
f 151/51/51 102/53/53 157/52/52
f 157/52/52 102/53/53 155/54/54
f 102/53/53 97/55/55 155/54/54
f 155/54/54 97/55/55 129/56/56
f 71/9/9 73/57/57 72/11/11
f 72/11/11 73/57/57 74/58/58
f 73/57/57 75/59/59 74/58/58
f 74/58/58 75/59/59 76/60/60
f 75/59/59 96/61/61 76/60/60
f 76/60/60 96/61/61 117/62/62
f 96/61/61 95/63/63 117/62/62
f 117/62/62 95/63/63 114/64/64
f 95/63/63 94/65/65 114/64/64
f 114/64/64 94/65/65 93/66/66
f 94/65/65 92/67/67 93/66/66
f 93/66/66 92/67/67 113/68/68
f 92/67/67 91/69/69 113/68/68
f 113/68/68 91/69/69 90/70/70
f 92/67/67 94/65/65 126/71/71
f 126/71/71 94/65/65 127/72/72
f 94/65/65 130/73/73 127/72/72
f 127/72/72 130/73/73 128/74/74
f 130/73/73 131/75/75 128/74/74
f 128/74/74 131/75/75 156/76/76
f 131/75/75 134/77/77 156/76/76
f 156/76/76 134/77/77 159/78/78
f 134/77/77 160/79/79 159/78/78
f 159/78/78 160/79/79 154/80/80
f 160/79/79 145/81/81 154/80/80
f 154/80/80 145/81/81 139/82/82
f 145/81/81 140/83/83 139/82/82
f 139/82/82 140/83/83 138/84/84
f 21/85/85 5/86/86 4/87/87
f 4/87/87 5/86/86 2/88/88
f 5/86/86 7/89/89 2/88/88
f 2/88/88 7/89/89 18/90/90
f 7/89/89 16/91/91 18/90/90
f 18/90/90 16/91/91 17/92/92
f 16/91/91 15/93/93 17/92/92
f 17/92/92 15/93/93 25/94/94
f 15/93/93 11/95/95 25/94/94
f 25/94/94 11/95/95 24/96/96
f 11/95/95 10/97/97 24/96/96
f 24/96/96 10/97/97 12/98/98
f 10/97/97 13/99/99 12/98/98
f 12/98/98 13/99/99 14/100/100
f 85/17/17 61/33/33 83/18/18
f 83/18/18 61/33/33 80/21/21
f 61/33/33 26/34/34 80/21/21
f 80/21/21 26/34/34 77/23/23
f 26/34/34 45/101/101 77/23/23
f 77/23/23 45/101/101 78/25/25
f 45/101/101 44/102/102 78/25/25
f 78/25/25 44/102/102 41/27/27
f 44/102/102 21/85/85 41/27/27
f 41/27/27 21/85/85 30/29/29
f 21/85/85 22/103/103 30/29/29
f 30/29/29 22/103/103 31/104/104
f 22/103/103 23/105/105 31/104/104
f 138/84/84 137/46/46 139/82/82
f 139/82/82 137/46/46 148/106/106
f 137/46/46 149/48/48 148/106/106
f 148/106/106 149/48/48 153/107/107
f 149/48/48 152/50/50 153/107/107
f 153/107/107 152/50/50 159/78/78
f 152/50/50 158/108/108 159/78/78
f 159/78/78 158/108/108 156/76/76
f 158/108/108 155/54/54 156/76/76
f 156/76/76 155/54/54 128/74/74
f 155/54/54 129/56/56 128/74/74
f 128/74/74 129/56/56 127/72/72
f 129/56/56 126/71/71 127/72/72
f 130/73/73 132/109/109 131/75/75
f 131/75/75 132/109/109 134/77/77
f 132/109/109 135/110/110 134/77/77
f 134/77/77 135/110/110 160/79/79
f 135/110/110 125/111/111 160/79/79
f 160/79/79 125/111/111 145/81/81
f 125/111/111 123/112/112 145/81/81
f 145/81/81 123/112/112 140/83/83
f 123/112/112 142/113/113 140/83/83
f 140/83/83 142/113/113 141/114/114
f 142/113/113 146/115/115 141/114/114
f 141/114/114 146/115/115 99/116/116
f 146/115/115 103/117/117 99/116/116
f 151/51/51 150/49/49 102/53/53
f 102/53/53 150/49/49 143/118/118
f 150/49/49 122/119/119 143/118/118
f 143/118/118 122/119/119 89/120/120
f 122/119/119 121/16/16 89/120/120
f 89/120/120 121/16/16 112/121/121
f 121/16/16 116/122/122 112/121/121
f 112/121/121 116/122/122 115/123/123
f 116/122/122 111/124/124 115/123/123
f 115/123/123 111/124/124 114/64/64
f 111/124/124 117/62/62 114/64/64
f 33/125/125 38/126/126 32/127/127
f 32/127/127 38/126/126 35/32/32
f 38/126/126 47/128/128 35/32/32
f 35/32/32 47/128/128 46/30/30
f 47/128/128 52/129/129 46/30/30
f 46/30/30 52/129/129 37/28/28
f 52/129/129 48/130/130 37/28/28
f 37/28/28 48/130/130 56/26/26
f 48/130/130 42/131/131 56/26/26
f 56/26/26 42/131/131 79/24/24
f 42/131/131 81/22/22 79/24/24
f 34/132/132 40/133/133 33/125/125
f 33/125/125 40/133/133 39/134/134
f 40/133/133 54/135/135 39/134/134
f 39/134/134 54/135/135 53/136/136
f 54/135/135 49/137/137 53/136/136
f 53/136/136 49/137/137 48/130/130
f 49/137/137 43/138/138 48/130/130
f 48/130/130 43/138/138 42/131/131
f 43/138/138 81/22/22 42/131/131
f 21/85/85 44/102/102 5/86/86
f 5/86/86 44/102/102 6/139/139
f 44/102/102 45/101/101 6/139/139
f 6/139/139 45/101/101 9/140/140
f 45/101/101 26/34/34 9/140/140
f 9/140/140 26/34/34 13/99/99
f 26/34/34 27/36/36 13/99/99
f 13/99/99 27/36/36 14/100/100
f 2/88/88 1/141/141 3/142/142
f 1/141/141 2/88/88 20/143/143
f 2/88/88 18/90/90 20/143/143
f 20/143/143 18/90/90 19/144/144
f 18/90/90 17/92/92 19/144/144
f 19/144/144 17/92/92 28/145/145
f 17/92/92 25/94/94 28/145/145
f 62/1/1 59/3/3 29/35/35
f 29/35/35 59/3/3 57/37/37
f 59/3/3 60/4/4 57/37/37
f 57/37/37 60/4/4 63/39/39
f 60/4/4 69/6/6 63/39/39
f 63/39/39 69/6/6 65/41/41
f 69/6/6 70/8/8 65/41/41
f 123/112/112 124/146/146 142/113/113
f 142/113/113 124/146/146 146/115/115
f 124/146/146 147/147/147 146/115/115
f 146/115/115 147/147/147 104/148/148
f 147/147/147 106/149/149 104/148/148
f 104/148/148 106/149/149 107/150/150
f 76/60/60 111/124/124 74/58/58
f 74/58/58 111/124/124 110/151/151
f 111/124/124 116/122/122 110/151/151
f 110/151/151 116/122/122 119/15/15
f 116/122/122 121/16/16 119/15/15
f 89/120/120 112/121/121 90/70/70
f 90/70/70 112/121/121 113/68/68
f 112/121/121 115/123/123 113/68/68
f 113/68/68 115/123/123 93/66/66
f 115/123/123 114/64/64 93/66/66
f 150/49/49 144/47/47 122/119/119
f 122/119/119 144/47/47 120/14/14
f 144/47/47 118/45/45 120/14/14
f 120/14/14 118/45/45 108/12/12
f 118/45/45 88/10/10 108/12/12
f 135/110/110 132/109/109 136/152/152
f 136/152/152 132/109/109 133/153/153
f 132/109/109 130/73/73 133/153/153
f 133/153/153 130/73/73 95/63/63
f 130/73/73 94/65/65 95/63/63
f 5/86/86 6/139/139 7/89/89
f 7/89/89 6/139/139 8/154/154
f 6/139/139 9/140/140 8/154/154
f 8/154/154 9/140/140 10/97/97
f 9/140/140 13/99/99 10/97/97
f 86/155/155 67/156/156 85/17/17
f 85/17/17 67/156/156 66/5/5
f 67/156/156 68/7/7 66/5/5
f 119/15/15 109/13/13 110/151/151
f 110/151/151 109/13/13 74/58/58
f 109/13/13 72/11/11 74/58/58
f 92/67/67 126/71/71 91/69/69
f 91/69/69 126/71/71 97/55/55
f 126/71/71 129/56/56 97/55/55
f 137/46/46 138/84/84 98/43/43
f 98/43/43 138/84/84 100/44/44
f 138/84/84 99/116/116 100/44/44
f 159/78/78 154/80/80 153/107/107
f 153/107/107 154/80/80 148/106/106
f 154/80/80 139/82/82 148/106/106
f 146/115/115 104/148/148 103/117/117
f 103/117/117 104/148/148 105/157/157
f 104/148/148 107/150/150 105/157/157
f 2/88/88 3/142/142 4/87/87
f 4/87/87 3/142/142 22/103/103
f 3/142/142 23/105/105 22/103/103
f 47/128/128 38/126/126 53/136/136
f 53/136/136 38/126/126 39/134/134
f 38/126/126 33/125/125 39/134/134
f 49/137/137 54/135/135 50/158/158
f 50/158/158 54/135/135 55/159/159
f 54/135/135 40/133/133 55/159/159
f 16/91/91 8/154/154 15/93/93
f 15/93/93 8/154/154 11/95/95
f 8/154/154 10/97/97 11/95/95
f 140/83/83 141/114/114 138/84/84
f 138/84/84 141/114/114 99/116/116
f 155/54/54 158/108/108 157/52/52
f 157/52/52 158/108/108 152/50/50
f 47/128/128 53/136/136 52/129/129
f 52/129/129 53/136/136 48/130/130
f 120/14/14 121/16/16 122/119/119
f 111/124/124 76/60/60 117/62/62
f 22/103/103 21/85/85 4/87/87
f 50/158/158 55/159/159 51/160/160
f 30/29/29 31/104/104 36/31/31
f 7/89/89 8/154/154 16/91/91
f 43/138/138 49/137/137 50/158/158
I can't figure out how that vt and the f generating process works,if someone with experience on model can explain it to me,I will be grateful.You have to use Python version 2.7 or later and not version 3.0 to use my code
You can download my tool and the output in the zip file below.I export the uv of mesh 0 of 02.yobj
You do not have the required permissions to view the files attached to this post.
Last edited by eatrawmeat391 on Mon Dec 12, 2016 10:35 am, edited 9 times in total.
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: SVR/Rumble Rose YOBJ to OBJ Help

Post by eri619 »

you should have posted this in the 3D section,not game modding section
Last edited by eri619 on Sat Dec 10, 2016 5:21 pm, edited 1 time in total.
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

Re: SVR/Rumble Rose YOBJ to OBJ Help

Post by eatrawmeat391 »

Well I posted in the "Code Talk" section because it involves coding, algorithm and stuff like that.It involves model as well so if an admin sees thing the same way as you,he'll move this topic.
My latest implementation is broken.It starts to have bug and isn't the one fitted for the job.I was appending all of the uv into one list,and ignores the duplicated uv.It isn't the right function.It will fail on some mesh like mesh 23.The correct output is generated using Blender
If someone can help me I will be grateful
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: SVR/Rumble Rose YOBJ to OBJ Help

Post by eri619 »

could someone help us out?
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: SVR/Rumble Rose YOBJ to OBJ Help

Post by shakotay2 »

@eatrawmeat391: nice work! :)
But it's very unlikely that someone can test it if you don't explain, how.

Which platform?
setup.py crashes blender 2.49 (python 2.6.2) on windows.
When starting yobj.py (ctrl.p) it doesn't find your modules (control.py, data_op.py, same directory)

copied all your modules into yobj.py to get around this but then...
"ah, yes, see it's using import numpy",

(I really hate numpy, never got any python code working that uses it... :D )
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

Re: SVR/Rumble Rose YOBJ to OBJ Help

Post by eatrawmeat391 »

Main File in the archive,you need python 2.7(+) and <= 3.0.you might need external module such as numpy:
- import_svr_yobj_ps2.py: This is a python script Glogow Poland Mariusz Szkaradek's original script
- YOBJ_Tool_GUI.py: This is the GUI version of my tool.You can run it by typing "python YOBJ_Tool_GUI.py",the tool incorrectly deals with uv data so I don't think the GUI will be of much use
- import-rumble-roses-ps2-2011-11-06.blend: The blend file to load within Blender
- yobj.py: This is my python script which is run by the python interpreter.Start it by cd to the tool's directory,running python from a commandline,then type the following command:

Code: Select all

from yobj import *
a = YOBJ('02.yobj') # filename is '02.yobj' ,create a new YOBJ object
a.n_mesh # print number of mesh
# I will get mesh 0 uv
faceslist, uvlist = a.get_indice_data(0) # 0 is mesh id
# you get the uvlist
for x in uvlist:
     print x # print each item of uvlist
exit() # stop a python session
=====================================================
# to write uvlist to file,after you get uvlist
temp = open('uvlist.txt', 'w')
for x in uvlist:
     temp.write(str(x))
temp.close()
=====================================================
Then load Blender,import Szkaradek's python script and export obj of mesh or model-0 and you get the output obj which contains the vt section.

Readme file included,it's for Window.Please redownload the 7z file in the first post

@Shakotay2: I suppose you have numpy installed,but it's not working,right?If you don't have it then download numpy from the web,extract the archive to a directory,cd to that directory and type 'python setup.py install'.I replaced the numpy code with struct code.But I need numpy for reading 2 bytes float,since the YOBJ float uses 4 bytes,it will never use that numpy function,so don't worry :) . (But you must have numpy installed)

I think the function in Szkaradek's script saves the uv somewhere,but it uses a lot of Blender specific feature.

Code: Select all

def vertexuv():
    for m in range(nMat):
    #for m in range(nParts):
        mesh.materials+=[Material.New()]
    mesh.vertexUV = 1
    mesh.faceUV = 1
    for m in range(len(faceslist)):
        for n in range(3):
            uv_data = uvlist[m][n]
            v_id = faceslist[m][n]
            mesh.verts[v_id].uvco = Vector(uv_data)
        f = mesh.faces[m]
        f.uv = [v.uvco for v in f.verts]
        f.mat = uvlist[m][3]
       
    mesh.update()   
My faulty code to deal with UV

Code: Select all

def vertexuv(self, faceslist, uvlist, uv_address=None):
        vt = []
        vt_address = [] # ignores
        for m in range(len(faceslist)):
            for n in range(3):
                uv_data = uvlist[m][n]
                v_id = faceslist[m][n]
                for x in xrange(len(uv_data)):
                    uv_data[x] = round(uv_data[x], 6)
                if uv_address is not None: # ignores
                    addr = uv_address[m][n] #ignores
                if not (uv_data, v_id) in vt:
                    vt.append((uv_data, v_id))
                    if uv_address is not None: # ignores
                        vt_address.append(addr) # ignores
        #mat = uvlist[m][3]
        if uv_address is None: # ignores
            return vt
        else: # ignores
            return vt, vt_address # ignores
It basically append the uv_data and the face into a list,and not append them if they already exists.I don't use set for its because it's unordered
Last edited by eatrawmeat391 on Sun Dec 11, 2016 3:17 pm, edited 2 times in total.
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: SVR/Rumble Rose YOBJ to OBJ Help

Post by eri619 »

what i do is run Szkaradek's script using Belnder 2.4.9, open the yobj,save it as a blend file and open that blend file using the latest version of Blender,make the edits to the mesh and then export all the objects back into wavefront obj.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV)

Post by shakotay2 »

@eatrawmeat391: dunno whether you got the uv data so far; seems he's reading it kinda this from 02.yobj (2 floats per address, in address steps of 0x20):
0, 0 0x2868L, 5312DC3D, 00482B3F
0, 1 0x2888L
0, 2 0x28A8L
...
0, 15 0x2a48L

1, 0 0x2a88L
...
1, 15 0x2c68L

2, 0 0x2ca8L
2, 15 0x2e88L
3, 0 0x2ec8L
3, 15 0x30a8L
4, 0 0x30e8L
4, 15 0x32c8L
5, 0 0x3308L
5, 15 0x34e8L
6, 0 0x3528L
6, 15 0x3708L
7, 0 0x3748L
7, 14 0x3908L
8, 0 0x3948L
8, 14 0x3b08L
9, 0 0x3b48L
9, 14 0x3d08L
10, 0 0x3d48L
10, 12 0x3ec8L
11, 0 0x3f08L
11, 12 0x4088L
12, 0 0x40c8L
12, 10 0x4208L
13, 0 0x4248L
13, 9 0x4368L
14, 0 0x43a8L
14, 8 0x44a8L
15, 0 0x44e8L
15, 8 0x45e8L
16, 0 0x4628L
16, 7 0x4708L
17, 0 0x4748L
17, 6 0x4808L
18, 0 0x4848L
18, 6 0x4908L
19, 0 0x4948L
19, 6 0x4a08L
20, 0 0x4a48L
20, 6 0x4b08L
21, 0 0x4b48L
21, 6 0x4c08L
22, 0 0x4c48L
22, 4 0x4cc8L
23, 0 0x4d08L
23, 4 0x4d88L
24, 0 0x4dc8L
24, 4 0x4e48L
25, 0 0x4e88L
25, 4 0x4f08L
26, 0 0x4f48L
26, 4 0x4fc8L
27, 0 0x5008L
27, 4 0x5088L
28, 0 0x50c8L
28, 4 0x5148L
29, 0 0x5188L
29, 4 0x5208L
30, 0 0x5248L
30, 4 0x52c8L
31, 0 0x5308L
31, 4 0x5388L
32, 0 0x53c8L
32, 3 0x5428L
33, 0 0x5468L
33, 3 0x54c8L
34, 0 0x5508L
34, 3 0x5568L
35, 0 0x55a8L
35, 2 0x55e8L
36, 0 0x5628L
36, 2 0x5668L
37, 0 0x56a8L
37, 2 0x56e8L
38, 0 0x5728L
38, 2 0x5768L
39, 0 0x57a8L
39, 2 0x57e8L
40, 0 0x5828L
40, 2 0x5868L
41, 0 0x58a8L
41, 2 0x58e8L

last submesh:
0, 0 0x7a368L
...
0, 14 0x7a528L

1, 0 0x7a568L
...
1, 12 0x7a6e8L

2, 0 0x7a728L
2, 7 0x7a808L
3, 0 0x7a848L
3, 7 0x7a928L
4, 0 0x7a968L
4, 6 0x7aa28L
5, 0 0x7aa68L
5, 5 0x7ab08L
6, 0 0x7ab48L
6, 4 0x7abc8L
7, 0 0x7ac08L
7, 4 0x7ac88L
8, 0 0x7acc8L
8, 4 0x7ad48L
9, 0 0x7ad88L
9, 3 0x7ade8L

10, 0 0x7ae28L
10, 2 0x7ae68L, F8FFFF3E, 6C034D3F

(I always thought his code to be cryptic but seems it's the data that is. :D )
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV)

Post by eatrawmeat391 »

I have updated the 7z file in the first post,please download the file again.I'm sorry,it won't be updated that soon again
This is all the uv floats that can be read in the file,as well as their face value,their format is:
Material_ID Part_ID Face_ID Offset UV_f1 UV_f2 (UV_f1 1-UVf2) Face_Value

Code: Select all

  0   0   0 0x2868 0.107457 0.669067 (0.107457 0.330933)  61
  0   0   1 0x2888 0.096308 0.602170 (0.096308 0.397830)  58
  0   0   2 0x28A8 0.129534 0.601717 (0.129534 0.398283)  83
  0   0   3 0x28C8 0.095652 0.556353 (0.095652 0.443647)  59
  0   0   4 0x28E8 0.130288 0.554115 (0.130288 0.445885)  65
  0   0   5 0x2908 0.090796 0.524074 (0.090796 0.475926)  68
  0   0   6 0x2928 0.132665 0.517613 (0.132665 0.482387)  67
  0   0   7 0x2948 0.093501 0.490317 (0.093501 0.509683)  69
  0   0   8 0x2968 0.133494 0.483879 (0.133494 0.516121)  70
  0   0   9 0x2988 0.102411 0.457061 (0.102411 0.542939)  87
  0   0  10 0x29A8 0.140307 0.459791 (0.140307 0.540209)  71
  0   0  11 0x29C8 0.121089 0.437633 (0.121089 0.562367) 107
  0   0  12 0x29E8 0.139583 0.439942 (0.139583 0.560058) 108
  0   0  13 0x2A08 0.126217 0.418150 (0.126217 0.581850) 119
  0   0  14 0x2A28 0.135682 0.423053 (0.135682 0.576947) 118
  0   0  15 0x2A48 0.140772 0.411478 (0.140772 0.588522) 120

  0   1   0 0x2A88 0.165147 0.598019 (0.165147 0.401981)  84
  0   1   1 0x2AA8 0.175624 0.638885 (0.175624 0.361115)  86
  0   1   2 0x2AC8 0.151410 0.643726 (0.151410 0.356274)  82
  0   1   3 0x2AE8 0.177355 0.667253 (0.177355 0.332747)  81
  0   1   4 0x2B08 0.149021 0.688776 (0.149021 0.311224)  79
  0   1   5 0x2B28 0.176603 0.696095 (0.176603 0.303905)  80
  0   1   6 0x2B48 0.156442 0.727304 (0.156442 0.272696)  76
  0   1   7 0x2B68 0.186243 0.729927 (0.186243 0.270073)  78
  0   1   8 0x2B88 0.197523 0.752571 (0.197523 0.247429)  77
  0   1   9 0x2BA8 0.207559 0.730092 (0.207559 0.269908)  55
  0   1  10 0x2BC8 0.233826 0.758524 (0.233826 0.241476)  40
  0   1  11 0x2BE8 0.238034 0.739560 (0.238034 0.260440)  36
  0   1  12 0x2C08 0.266613 0.751287 (0.266613 0.248713)  29
  0   1  13 0x2C28 0.270564 0.728372 (0.270564 0.271628)  45
  0   1  14 0x2C48 0.306858 0.729605 (0.306858 0.270395)  35
  0   1  15 0x2C68 0.306858 0.718472 (0.306858 0.281528)  34

  0   2   0 0x2CA8 0.130288 0.554115 (0.130288 0.445885)  65
  0   2   1 0x2CC8 0.165147 0.598019 (0.165147 0.401981)  84
  0   2   2 0x2CE8 0.129534 0.601717 (0.129534 0.398283)  83
  0   2   3 0x2D08 0.134507 0.662084 (0.134507 0.337916)  60
  0   2   4 0x2D28 0.107457 0.669067 (0.107457 0.330933)  61
  0   2   5 0x2D48 0.128001 0.737822 (0.128001 0.262178)  25
  0   2   6 0x2D68 0.072936 0.676051 (0.072936 0.323949)  28
  0   2   7 0x2D88 0.042006 0.687475 (0.042006 0.312525)  26
  0   2   8 0x2DA8 0.063101 0.599095 (0.063101 0.400905)  56
  0   2   9 0x2DC8 0.021310 0.599781 (0.021310 0.400219)  57
  0   2  10 0x2DE8 0.054964 0.526380 (0.054964 0.473620)  62
  0   2  11 0x2E08 0.017543 0.512710 (0.017543 0.487290)  63
  0   2  12 0x2E28 0.059191 0.475122 (0.059191 0.524878)  64
  0   2  13 0x2E48 0.015631 0.458442 (0.015631 0.541558) 100
  0   2  14 0x2E68 0.061468 0.439593 (0.061468 0.560407)  97
  0   2  15 0x2E88 0.019596 0.404324 (0.019596 0.595676)  99

  0   3   0 0x2EC8 0.093501 0.490317 (0.093501 0.509683)  69
  0   3   1 0x2EE8 0.059191 0.475122 (0.059191 0.524878)  64
  0   3   2 0x2F08 0.102411 0.457061 (0.102411 0.542939)  87
  0   3   3 0x2F28 0.061468 0.439593 (0.061468 0.560407)  97
  0   3   4 0x2F48 0.102939 0.425392 (0.102939 0.574608) 117
  0   3   5 0x2F68 0.103318 0.405269 (0.103318 0.594731) 136
  0   3   6 0x2F88 0.119465 0.404530 (0.119465 0.595470) 143
  0   3   7 0x2FA8 0.122383 0.395221 (0.122383 0.604779) 148
  0   3   8 0x2FC8 0.134912 0.396680 (0.134912 0.603320) 149
  0   3   9 0x2FE8 0.140740 0.383232 (0.140740 0.616768) 151
  0   3  10 0x3008 0.145563 0.385870 (0.145563 0.614130) 150
  0   3  11 0x3028 0.158045 0.376430 (0.158045 0.623570) 156
  0   3  12 0x3048 0.156737 0.385125 (0.156737 0.614875) 101
  0   3  13 0x3068 0.178318 0.375082 (0.178318 0.624918) 154
  0   3  14 0x3088 0.199958 0.386465 (0.199958 0.613535)  96
  0   3  15 0x30A8 0.207435 0.379401 (0.207435 0.620599) 128

  0   4   0 0x30E8 0.133494 0.483879 (0.133494 0.516121)  70
  0   4   1 0x3108 0.140307 0.459791 (0.140307 0.540209)  71
  0   4   2 0x3128 0.174231 0.477114 (0.174231 0.522886)  72
  0   4   3 0x3148 0.172879 0.455837 (0.172879 0.544163)  73
  0   4   4 0x3168 0.209139 0.460513 (0.209139 0.539487)  74
  0   4   5 0x3188 0.209636 0.449405 (0.209636 0.550595)  75
  0   4   6 0x31A8 0.239952 0.440466 (0.239952 0.559534)  95
  0   4   7 0x31C8 0.236592 0.430604 (0.236592 0.569396) 116
  0   4   8 0x31E8 0.255295 0.413517 (0.255295 0.586483)  94
  0   4   9 0x3208 0.229019 0.418958 (0.229019 0.581042) 113
  0   4  10 0x3228 0.240990 0.412278 (0.240990 0.587722)  93
  0   4  11 0x3248 0.228461 0.409920 (0.228461 0.590080)  92
  0   4  12 0x3268 0.229128 0.407453 (0.229128 0.592547)  91
  0   4  13 0x3288 0.202145 0.410746 (0.202145 0.589254) 112
  0   4  14 0x32A8 0.217531 0.402025 (0.217531 0.597975)  90
  0   4  15 0x32C8 0.199620 0.400170 (0.199620 0.599830)  89

  0   5   0 0x3308 0.229128 0.407453 (0.229128 0.592547)  91
  0   5   1 0x3328 0.229860 0.398267 (0.229860 0.601733) 125
  0   5   2 0x3348 0.240990 0.412278 (0.240990 0.587722)  93
  0   5   3 0x3368 0.230710 0.392076 (0.230710 0.607924) 126
  0   5   4 0x3388 0.238001 0.387914 (0.238001 0.612086) 129
  0   5   5 0x33A8 0.208237 0.374619 (0.208237 0.625381) 127
  0   5   6 0x33C8 0.210134 0.371089 (0.210134 0.628911) 130
  0   5   7 0x33E8 0.176719 0.369486 (0.176719 0.630514) 155
  0   5   8 0x3408 0.175680 0.364473 (0.175680 0.635527) 133
  0   5   9 0x3428 0.152130 0.371266 (0.152130 0.628734) 158
  0   5  10 0x3448 0.149798 0.364229 (0.149798 0.635771) 159
  0   5  11 0x3468 0.130510 0.374247 (0.130510 0.625753) 153
  0   5  12 0x3488 0.124583 0.365161 (0.124583 0.634839) 144
  0   5  13 0x34A8 0.101418 0.383682 (0.101418 0.616318) 138
  0   5  14 0x34C8 0.089220 0.359487 (0.089220 0.640513) 139
  0   5  15 0x34E8 0.059796 0.402589 (0.059796 0.597411) 137

  0   6   0 0x3528 0.248286 0.781520 (0.248286 0.218480)  20
  0   6   1 0x3548 0.272227 0.816759 (0.272227 0.183241)   3
  0   6   2 0x3568 0.239850 0.821831 (0.239850 0.178169)   4
  0   6   3 0x3588 0.267549 0.855600 (0.267549 0.144400)   1
  0   6   4 0x35A8 0.235401 0.857022 (0.235401 0.142978)   6
  0   6   5 0x35C8 0.267777 0.882793 (0.267777 0.117207)  17
  0   6   6 0x35E8 0.236524 0.875086 (0.236524 0.124914)  15
  0   6   7 0x3608 0.272848 0.918521 (0.272848 0.081479)  16
  0   6   8 0x3628 0.242264 0.912469 (0.242264 0.087531)  14
  0   6   9 0x3648 0.211830 0.948645 (0.211830 0.051355)  24
  0   6  10 0x3668 0.206325 0.893685 (0.206325 0.106315)  10
  0   6  11 0x3688 0.146918 0.900813 (0.146918 0.099187)  23
  0   6  12 0x36A8 0.143594 0.843753 (0.143594 0.156247)   9
  0   6  13 0x36C8 0.087023 0.810228 (0.087023 0.189772)  11
  0   6  14 0x36E8 0.110627 0.784202 (0.110627 0.215798)  12
  0   6  15 0x3708 0.051278 0.743333 (0.051278 0.256667)  13

  0   7   0 0x3748 0.165147 0.598019 (0.165147 0.401981)  84
  0   7   1 0x3768 0.151410 0.643726 (0.151410 0.356274)  82
  0   7   2 0x3788 0.134507 0.662084 (0.134507 0.337916)  60
  0   7   3 0x37A8 0.149021 0.688776 (0.149021 0.311224)  79
  0   7   4 0x37C8 0.128001 0.737822 (0.128001 0.262178)  25
  0   7   5 0x37E8 0.156442 0.727304 (0.156442 0.272696)  76
  0   7   6 0x3808 0.181151 0.770901 (0.181151 0.229099)  44
  0   7   7 0x3828 0.197523 0.752571 (0.197523 0.247429)  77
  0   7   8 0x3848 0.218576 0.790427 (0.218576 0.209573)  43
  0   7   9 0x3868 0.233826 0.758524 (0.233826 0.241476)  40
  0   7  10 0x3888 0.248286 0.781520 (0.248286 0.218480)  20
  0   7  11 0x38A8 0.266613 0.751287 (0.266613 0.248713)  29
  0   7  12 0x38C8 0.277866 0.775666 (0.277866 0.224334)  21
  0   7  13 0x38E8 0.306858 0.750708 (0.306858 0.249292)  30
  0   7  14 0x3908 0.306858 0.776130 (0.306858 0.223870)  22

  0   8   0 0x3948 0.059796 0.402589 (0.059796 0.597411) 137
  0   8   1 0x3968 0.101418 0.383682 (0.101418 0.616318) 138
  0   8   2 0x3988 0.103318 0.405269 (0.103318 0.594731) 136
  0   8   3 0x39A8 0.119701 0.387712 (0.119701 0.612288) 147
  0   8   4 0x39C8 0.122383 0.395221 (0.122383 0.604779) 148
  0   8   5 0x39E8 0.135792 0.379594 (0.135792 0.620406) 152
  0   8   6 0x3A08 0.140740 0.383232 (0.140740 0.616768) 151
  0   8   7 0x3A28 0.152130 0.371266 (0.152130 0.628734) 158
  0   8   8 0x3A48 0.154154 0.373263 (0.154154 0.626737) 157
  0   8   9 0x3A68 0.176719 0.369486 (0.176719 0.630514) 155
  0   8  10 0x3A88 0.178318 0.375082 (0.178318 0.624918) 154
  0   8  11 0x3AA8 0.208237 0.374619 (0.208237 0.625381) 127
  0   8  12 0x3AC8 0.207435 0.379401 (0.207435 0.620599) 128
  0   8  13 0x3AE8 0.230710 0.392076 (0.230710 0.607924) 126
  0   8  14 0x3B08 0.229860 0.398267 (0.229860 0.601733) 125

  0   9   0 0x3B48 0.238001 0.387914 (0.238001 0.612086) 129
  0   9   1 0x3B68 0.210134 0.371089 (0.210134 0.628911) 130
  0   9   2 0x3B88 0.210753 0.369902 (0.210753 0.630098) 131
  0   9   3 0x3BA8 0.175680 0.364473 (0.175680 0.635527) 133
  0   9   4 0x3BC8 0.176466 0.359914 (0.176466 0.640086) 134
  0   9   5 0x3BE8 0.149798 0.364229 (0.149798 0.635771) 159
  0   9   6 0x3C08 0.151550 0.355613 (0.151550 0.644387) 124
  0   9   7 0x3C28 0.124583 0.365161 (0.124583 0.634839) 144
  0   9   8 0x3C48 0.123860 0.339645 (0.123860 0.660355) 122
  0   9   9 0x3C68 0.089220 0.359487 (0.089220 0.640513) 139
  0   9  10 0x3C88 0.087095 0.334576 (0.087095 0.665424) 141
  0   9  11 0x3CA8 0.053225 0.365581 (0.053225 0.634419) 140
  0   9  12 0x3CC8 0.069963 0.307011 (0.069963 0.692989) 145
  0   9  13 0x3CE8 0.022612 0.362065 (0.022612 0.637935)  98
  0   9  14 0x3D08 0.013430 0.286899 (0.013430 0.713101) 102

  0  10   0 0x3D48 0.145563 0.385870 (0.145563 0.614130) 150
  0  10   1 0x3D68 0.156737 0.385125 (0.156737 0.614875) 101
  0  10   2 0x3D88 0.134912 0.396680 (0.134912 0.603320) 149
  0  10   3 0x3DA8 0.158403 0.398724 (0.158403 0.601276) 142
  0  10   4 0x3DC8 0.135927 0.404985 (0.135927 0.595015) 121
  0  10   5 0x3DE8 0.164201 0.402212 (0.164201 0.597788)  88
  0  10   6 0x3E08 0.140772 0.411478 (0.140772 0.588522) 120
  0  10   7 0x3E28 0.174193 0.416214 (0.174193 0.583786) 111
  0  10   8 0x3E48 0.173708 0.427629 (0.173708 0.572371) 115
  0  10   9 0x3E68 0.203646 0.421035 (0.203646 0.578965) 114
  0  10  10 0x3E88 0.209708 0.436559 (0.209708 0.563441) 110
  0  10  11 0x3EA8 0.229019 0.418958 (0.229019 0.581042) 113
  0  10  12 0x3EC8 0.236592 0.430604 (0.236592 0.569396) 116

  0  11   0 0x3F08 0.306858 0.683123 (0.306858 0.316877)  32
  0  11   1 0x3F28 0.306858 0.697970 (0.306858 0.302030)  31
  0  11   2 0x3F48 0.272362 0.697996 (0.272362 0.302004)  37
  0  11   3 0x3F68 0.306858 0.718472 (0.306858 0.281528)  34
  0  11   4 0x3F88 0.270552 0.717158 (0.270552 0.282842)  46
  0  11   5 0x3FA8 0.270564 0.728372 (0.270564 0.271628)  45
  0  11   6 0x3FC8 0.240938 0.716835 (0.240938 0.283165)  51
  0  11   7 0x3FE8 0.238034 0.739560 (0.238034 0.260440)  36
  0  11   8 0x4008 0.215405 0.708082 (0.215405 0.291918)  47
  0  11   9 0x4028 0.207559 0.730092 (0.207559 0.269908)  55
  0  11  10 0x4048 0.199620 0.704693 (0.199620 0.295307)  41
  0  11  11 0x4068 0.186243 0.729927 (0.186243 0.270073)  78
  0  11  12 0x4088 0.176603 0.696095 (0.176603 0.303905)  80

  0  12   0 0x40C8 0.306858 0.677127 (0.306858 0.322873)  33
  0  12   1 0x40E8 0.306858 0.683123 (0.306858 0.316877)  32
  0  12   2 0x4108 0.274126 0.675763 (0.274126 0.324237)  39
  0  12   3 0x4128 0.274125 0.682438 (0.274125 0.317562)  38
  0  12   4 0x4148 0.242635 0.681630 (0.242635 0.318370)  53
  0  12   5 0x4168 0.241238 0.694563 (0.241238 0.305437)  52
  0  12   6 0x4188 0.216898 0.693218 (0.216898 0.306782)  48
  0  12   7 0x41A8 0.215405 0.708082 (0.215405 0.291918)  47
  0  12   8 0x41C8 0.199604 0.691277 (0.199604 0.308723)  42
  0  12   9 0x41E8 0.199620 0.704693 (0.199620 0.295307)  41
  0  12  10 0x4208 0.176603 0.696095 (0.176603 0.303905)  80

  0  13   0 0x4248 0.248286 0.781520 (0.248286 0.218480)  20
  0  13   1 0x4268 0.239850 0.821831 (0.239850 0.178169)   4
  0  13   2 0x4288 0.218576 0.790427 (0.218576 0.209573)  43
  0  13   3 0x42A8 0.211669 0.824367 (0.211669 0.175633)   5
  0  13   4 0x42C8 0.181151 0.770901 (0.181151 0.229099)  44
  0  13   5 0x42E8 0.156420 0.802736 (0.156420 0.197264)   8
  0  13   6 0x4308 0.128001 0.737822 (0.128001 0.262178)  25
  0  13   7 0x4328 0.110627 0.784202 (0.110627 0.215798)  12
  0  13   8 0x4348 0.042006 0.687475 (0.042006 0.312525)  26
  0  13   9 0x4368 0.051278 0.743333 (0.051278 0.256667)  13

  0  14   0 0x43A8 0.306858 0.813071 (0.306858 0.186929)   2
  0  14   1 0x43C8 0.306858 0.855435 (0.306858 0.144565)   0
  0  14   2 0x43E8 0.267549 0.855600 (0.267549 0.144400)   1
  0  14   3 0x4408 0.306858 0.885075 (0.306858 0.114925)  19
  0  14   4 0x4428 0.267777 0.882793 (0.267777 0.117207)  17
  0  14   5 0x4448 0.306858 0.921671 (0.306858 0.078329)  18
  0  14   6 0x4468 0.272848 0.918521 (0.272848 0.081479)  16
  0  14   7 0x4488 0.306858 0.959815 (0.306858 0.040185)  27
  0  14   8 0x44A8 0.211830 0.948645 (0.211830 0.051355)  24

  0  15   0 0x44E8 0.107457 0.669067 (0.107457 0.330933)  61
  0  15   1 0x4508 0.072936 0.676051 (0.072936 0.323949)  28
  0  15   2 0x4528 0.096308 0.602170 (0.096308 0.397830)  58
  0  15   3 0x4548 0.063101 0.599095 (0.063101 0.400905)  56
  0  15   4 0x4568 0.095652 0.556353 (0.095652 0.443647)  59
  0  15   5 0x4588 0.054964 0.526380 (0.054964 0.473620)  62
  0  15   6 0x45A8 0.090796 0.524074 (0.090796 0.475926)  68
  0  15   7 0x45C8 0.059191 0.475122 (0.059191 0.524878)  64
  0  15   8 0x45E8 0.093501 0.490317 (0.093501 0.509683)  69

  0  16   0 0x4628 0.123860 0.339645 (0.123860 0.660355) 122
  0  16   1 0x4648 0.087095 0.334576 (0.087095 0.665424) 141
  0  16   2 0x4668 0.124961 0.317560 (0.124961 0.682440) 123
  0  16   3 0x4688 0.069963 0.307011 (0.069963 0.692989) 145
  0  16   4 0x46A8 0.122522 0.279937 (0.122522 0.720063) 146
  0  16   5 0x46C8 0.080859 0.256354 (0.080859 0.743646) 103
  0  16   6 0x46E8 0.151548 0.237150 (0.151548 0.762850) 105
  0  16   7 0x4708 0.139208 0.185126 (0.139208 0.814874) 106

  0  17   0 0x4748 0.209636 0.449405 (0.209636 0.550595)  75
  0  17   1 0x4768 0.172879 0.455837 (0.172879 0.544163)  73
  0  17   2 0x4788 0.209708 0.436559 (0.209708 0.563441) 110
  0  17   3 0x47A8 0.173839 0.441597 (0.173839 0.558403) 109
  0  17   4 0x47C8 0.173708 0.427629 (0.173708 0.572371) 115
  0  17   5 0x47E8 0.135682 0.423053 (0.135682 0.576947) 118
  0  17   6 0x4808 0.140772 0.411478 (0.140772 0.588522) 120

  0  18   0 0x4848 0.164201 0.402212 (0.164201 0.597788)  88
  0  18   1 0x4868 0.199620 0.400170 (0.199620 0.599830)  89
  0  18   2 0x4888 0.174193 0.416214 (0.174193 0.583786) 111
  0  18   3 0x48A8 0.202145 0.410746 (0.202145 0.589254) 112
  0  18   4 0x48C8 0.203646 0.421035 (0.203646 0.578965) 114
  0  18   5 0x48E8 0.228461 0.409920 (0.228461 0.590080)  92
  0  18   6 0x4908 0.229019 0.418958 (0.229019 0.581042) 113

  0  19   0 0x4948 0.134912 0.396680 (0.134912 0.603320) 149
  0  19   1 0x4968 0.135927 0.404985 (0.135927 0.595015) 121
  0  19   2 0x4988 0.119465 0.404530 (0.119465 0.595470) 143
  0  19   3 0x49A8 0.126217 0.418150 (0.126217 0.581850) 119
  0  19   4 0x49C8 0.102939 0.425392 (0.102939 0.574608) 117
  0  19   5 0x49E8 0.121089 0.437633 (0.121089 0.562367) 107
  0  19   6 0x4A08 0.102411 0.457061 (0.102411 0.542939)  87

  0  20   0 0x4A48 0.176466 0.359914 (0.176466 0.640086) 134
  0  20   1 0x4A68 0.211592 0.358131 (0.211592 0.641869) 135
  0  20   2 0x4A88 0.210753 0.369902 (0.210753 0.630098) 131
  0  20   3 0x4AA8 0.246747 0.381766 (0.246747 0.618234) 132
  0  20   4 0x4AC8 0.238001 0.387914 (0.238001 0.612086) 129
  0  20   5 0x4AE8 0.255295 0.413517 (0.255295 0.586483)  94
  0  20   6 0x4B08 0.240990 0.412278 (0.240990 0.587722)  93

  0  21   0 0x4B48 0.239850 0.821831 (0.239850 0.178169)   4
  0  21   1 0x4B68 0.235401 0.857022 (0.235401 0.142978)   6
  0  21   2 0x4B88 0.211669 0.824367 (0.211669 0.175633)   5
  0  21   3 0x4BA8 0.200701 0.859062 (0.200701 0.140938)   7
  0  21   4 0x4BC8 0.156420 0.802736 (0.156420 0.197264)   8
  0  21   5 0x4BE8 0.143594 0.843753 (0.143594 0.156247)   9
  0  21   6 0x4C08 0.110627 0.784202 (0.110627 0.215798)  12

  0  22   0 0x4C48 0.209504 0.560644 (0.209504 0.439356)  85
  0  22   1 0x4C68 0.165147 0.598019 (0.165147 0.401981)  84
  0  22   2 0x4C88 0.173881 0.546618 (0.173881 0.453382)  66
  0  22   3 0x4CA8 0.130288 0.554115 (0.130288 0.445885)  65
  0  22   4 0x4CC8 0.132665 0.517613 (0.132665 0.482387)  67

  0  23   0 0x4D08 0.135682 0.423053 (0.135682 0.576947) 118
  0  23   1 0x4D28 0.173839 0.441597 (0.173839 0.558403) 109
  0  23   2 0x4D48 0.139583 0.439942 (0.139583 0.560058) 108
  0  23   3 0x4D68 0.172879 0.455837 (0.172879 0.544163)  73
  0  23   4 0x4D88 0.140307 0.459791 (0.140307 0.540209)  71

  0  24   0 0x4DC8 0.229128 0.407453 (0.229128 0.592547)  91
  0  24   1 0x4DE8 0.217531 0.402025 (0.217531 0.597975)  90
  0  24   2 0x4E08 0.229860 0.398267 (0.229860 0.601733) 125
  0  24   3 0x4E28 0.199958 0.386465 (0.199958 0.613535)  96
  0  24   4 0x4E48 0.207435 0.379401 (0.207435 0.620599) 128

  0  25   0 0x4E88 0.103318 0.405269 (0.103318 0.594731) 136
  0  25   1 0x4EA8 0.061468 0.439593 (0.061468 0.560407)  97
  0  25   2 0x4EC8 0.059796 0.402589 (0.059796 0.597411) 137
  0  25   3 0x4EE8 0.019596 0.404324 (0.019596 0.595676)  99
  0  25   4 0x4F08 0.022612 0.362065 (0.022612 0.637935)  98

  0  26   0 0x4F48 0.152130 0.371266 (0.152130 0.628734) 158
  0  26   1 0x4F68 0.135792 0.379594 (0.135792 0.620406) 152
  0  26   2 0x4F88 0.130510 0.374247 (0.130510 0.625753) 153
  0  26   3 0x4FA8 0.119701 0.387712 (0.119701 0.612288) 147
  0  26   4 0x4FC8 0.101418 0.383682 (0.101418 0.616318) 138

  0  27   0 0x5008 0.069963 0.307011 (0.069963 0.692989) 145
  0  27   1 0x5028 0.013430 0.286899 (0.013430 0.713101) 102
  0  27   2 0x5048 0.080859 0.256354 (0.080859 0.743646) 103
  0  27   3 0x5068 0.046176 0.181550 (0.046176 0.818450) 104
  0  27   4 0x5088 0.139208 0.185126 (0.139208 0.814874) 106

  0  28   0 0x50C8 0.267549 0.855600 (0.267549 0.144400)   1
  0  28   1 0x50E8 0.272227 0.816759 (0.272227 0.183241)   3
  0  28   2 0x5108 0.306858 0.813071 (0.306858 0.186929)   2
  0  28   3 0x5128 0.277866 0.775666 (0.277866 0.224334)  21
  0  28   4 0x5148 0.306858 0.776130 (0.306858 0.223870)  22

  0  29   0 0x5188 0.270552 0.717158 (0.270552 0.282842)  46
  0  29   1 0x51A8 0.241238 0.694563 (0.241238 0.305437)  52
  0  29   2 0x51C8 0.272362 0.697996 (0.272362 0.302004)  37
  0  29   3 0x51E8 0.274125 0.682438 (0.274125 0.317562)  38
  0  29   4 0x5208 0.306858 0.683123 (0.306858 0.316877)  32

  0  30   0 0x5248 0.216898 0.693218 (0.216898 0.306782)  48
  0  30   1 0x5268 0.220597 0.684230 (0.220597 0.315770)  49
  0  30   2 0x5288 0.242635 0.681630 (0.242635 0.318370)  53
  0  30   3 0x52A8 0.243853 0.674800 (0.243853 0.325200)  54
  0  30   4 0x52C8 0.274126 0.675763 (0.274126 0.324237)  39

  0  31   0 0x5308 0.236524 0.875086 (0.236524 0.124914)  15
  0  31   1 0x5328 0.242264 0.912469 (0.242264 0.087531)  14
  0  31   2 0x5348 0.200701 0.859062 (0.200701 0.140938)   7
  0  31   3 0x5368 0.206325 0.893685 (0.206325 0.106315)  10
  0  31   4 0x5388 0.143594 0.843753 (0.143594 0.156247)   9

  0  32   0 0x53C8 0.089220 0.359487 (0.089220 0.640513) 139
  0  32   1 0x53E8 0.059796 0.402589 (0.059796 0.597411) 137
  0  32   2 0x5408 0.053225 0.365581 (0.053225 0.634419) 140
  0  32   3 0x5428 0.022612 0.362065 (0.022612 0.637935)  98

  0  33   0 0x5468 0.178318 0.375082 (0.178318 0.624918) 154
  0  33   1 0x5488 0.158045 0.376430 (0.158045 0.623570) 156
  0  33   2 0x54A8 0.154154 0.373263 (0.154154 0.626737) 157
  0  33   3 0x54C8 0.140740 0.383232 (0.140740 0.616768) 151

  0  34   0 0x5508 0.270552 0.717158 (0.270552 0.282842)  46
  0  34   1 0x5528 0.240938 0.716835 (0.240938 0.283165)  51
  0  34   2 0x5548 0.241238 0.694563 (0.241238 0.305437)  52
  0  34   3 0x5568 0.215405 0.708082 (0.215405 0.291918)  47

  0  35   0 0x55A8 0.126217 0.418150 (0.126217 0.581850) 119
  0  35   1 0x55C8 0.135927 0.404985 (0.135927 0.595015) 121
  0  35   2 0x55E8 0.140772 0.411478 (0.140772 0.588522) 120

  0  36   0 0x5628 0.209708 0.436559 (0.209708 0.563441) 110
  0  36   1 0x5648 0.236592 0.430604 (0.236592 0.569396) 116
  0  36   2 0x5668 0.209636 0.449405 (0.209636 0.550595)  75

  0  37   0 0x56A8 0.277866 0.775666 (0.277866 0.224334)  21
  0  37   1 0x56C8 0.272227 0.816759 (0.272227 0.183241)   3
  0  37   2 0x56E8 0.248286 0.781520 (0.248286 0.218480)  20

  0  38   0 0x5728 0.220597 0.684230 (0.220597 0.315770)  49
  0  38   1 0x5748 0.223820 0.678385 (0.223820 0.321615)  50
  0  38   2 0x5768 0.243853 0.674800 (0.243853 0.325200)  54

  0  39   0 0x57A8 0.266613 0.751287 (0.266613 0.248713)  29
  0  39   1 0x57C8 0.306858 0.729605 (0.306858 0.270395)  35
  0  39   2 0x57E8 0.306858 0.750708 (0.306858 0.249292)  30

  0  40   0 0x5828 0.235401 0.857022 (0.235401 0.142978)   6
  0  40   1 0x5848 0.236524 0.875086 (0.236524 0.124914)  15
  0  40   2 0x5868 0.200701 0.859062 (0.200701 0.140938)   7

  0  41   0 0x58A8 0.199604 0.691277 (0.199604 0.308723)  42
  0  41   1 0x58C8 0.220597 0.684230 (0.220597 0.315770)  49
  0  41   2 0x58E8 0.216898 0.693218 (0.216898 0.306782)  48
The question is,can I reconstruct the vt section and the f section exactly like in the first post(which is Blender's output)?The face can be simple as f a b c.I flipped the condition of Szkaradek's condition if direct > 0 to < 0 and can generate them with the accuracy of 99% (which is still false)
You do not have the required permissions to view the files attached to this post.
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by eri619 »

As of now this is the only road block we are facing which is preventing us from completing the tool which imports edits back into the model.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by chrrox »

you do know the game will not let you mod files.
you can reshape objects but changing them will crash the game.
you need to decode the pofo sections.
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by eri619 »

chrrox wrote:you do know the game will not let you mod files.
you can reshape objects but changing them will crash the game.
you need to decode the pofo sections.
This is the PS2 version BTW :) we just need to import the U-V's back.
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by eatrawmeat391 »

Yes there are methods of editing PAC file(a format that contains the yobj files).Right now we can only inject the model file with same amount of vertex(even with that we can still create good-looking mods).We are looking to do more,like changing face data and uv.
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by eatrawmeat391 »

I found out about the problem that the UV face indices = the Vertex face indices in YOBJ format.I can keep the indices using Keep Vertex Order in Blender but I can't keep the UV order because there is no such option.

I have been able to successfully decode the POF0 section as @chrrox mentioned.
The POF0 sections are used for reconstructing the offsets used in the file and also acts as a checksum.

Here is the code to decode POF0 section anyways, the code increased those address by 8 if they were to be reconstructed by reading the POF0 section.Note that 2k POF0 is not compatible even though there is support for big endianess in the code.Tested with SVR 2006 PSP.
You do not have the required permissions to view the files attached to this post.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: SVR/Rumble Rose YOBJ to OBJ (Help with UV and Face)

Post by Tosyk »

try unwrap3d. it can open most of the SVR/WWE game starting from very first one on ps2.
Thank you for all you do here
my blog | my forum
Post Reply