Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IC2 Classic #90

Closed
Speiger opened this issue Apr 16, 2016 · 94 comments
Closed

IC2 Classic #90

Speiger opened this issue Apr 16, 2016 · 94 comments
Labels
suggestion Something to add.

Comments

@Speiger
Copy link

Speiger commented Apr 16, 2016

Could you add IC2 Classic Support? It can be combined with IC2 Exp in Textures (it uses the same folder but differend subfolders)

@Yulife
Copy link

Yulife commented Apr 16, 2016

We'll keep it in mind :D

@Speiger
Copy link
Author

Speiger commented Apr 16, 2016

1 Upside. Texture Sprites. You do not have to do 5000 Icons. Its all in a couple texture sprites merged together (at least in classic) xD

@BBoldt
Copy link

BBoldt commented Apr 17, 2016

Would probably be best to use the same textures that we use for IC2-exp, just "ported" to whatever file/image structure IC2-Classic has. Then we would just need to fill in the blanks for the extra content that IC2 Classic has.

@Speiger
Copy link
Author

Speiger commented Apr 17, 2016

@BBoldt Yeah but exp changed they general style and classic kept the old one

@Yulife
Copy link

Yulife commented Apr 17, 2016

Sprites have downsides too, for example if you do not have all textures done you either need to fill in the not textured with blanks or ship the author's textures which may conflict with some licences :P But yea, sprites are nice

@Speiger
Copy link
Author

Speiger commented Apr 17, 2016

yeah that is true. But on the other hand. As long you finish your work and make it a "none constant" state it should be fine (at least from my side)

@Yulife
Copy link

Yulife commented Apr 17, 2016

Just curious, IC2 Classic and Tech Reborn are completly different right? Because we started on Tech Reborn! 😄

@BBoldt
Copy link

BBoldt commented Apr 17, 2016

They are Yulife. Tech Reborn is a rewritten version of an old version of Gregtech. IC2 Classic is an updated version of pre-experimental IC2.

@Yulife
Copy link

Yulife commented Apr 17, 2016

Ahhh nice :)

@CyanideX
Copy link
Member

CyanideX commented May 3, 2016

@Speiger, you still looking to get those textures for IC2C? I'm just about done with IC2 so it wouldn't be too difficult to throw something together.

@Yulife
Copy link

Yulife commented May 3, 2016

Shouldn't it use them same texture? :p

@Speiger
Copy link
Author

Speiger commented May 3, 2016

@CyanideX well it would be great if IC2C gets texture pack support...
@Yulife well thats your choice but IC2Exp did start a new Art Style while classic tries to keep the old one... So if you find something that fits for both then i am fine with that.

@Yulife
Copy link

Yulife commented Jun 5, 2016

Hey @CyanideX once you get IC2 done I can take a look at IC2 Classic's sprites, just tell me once it's done

@Mattabase
Copy link

@CyanideX @Yulife Would super dig those IC2C textures <3

@CyanideX
Copy link
Member

CyanideX commented Sep 30, 2016

@Mattabase, I will see what I can do. It's only 1.7.10, right?

@Mattabase
Copy link

<3 Love you buddy! @CyanideX =P

@CyanideX
Copy link
Member

@Mattabase, don't thank me yet. I may not get to it for a while. 😖

@CyanideX
Copy link
Member

Sorry, can't do it @Mattabase. I would need @Speiger to make the bottom/top face rotate with the block in order for the textures to work properly. This retexture would be a basic copy/paste from my IC2 Unity because I simply don't have the time to make adjustments for this system.

Sample

@Speiger
Copy link
Author

Speiger commented Sep 30, 2016

@CyanideX the problem is i would require my full renderring for that just making the stuff work.
I am using the standart renderer.... hmmmm i didnt expect that you do side awarenes...

@Speiger
Copy link
Author

Speiger commented Sep 30, 2016

@CyanideX ok i will try to come up with something. But might take a couple days...

@Speiger
Copy link
Author

Speiger commented Sep 30, 2016

@CyanideX keep doing the work even rotation is not applying yet. I found some interesting code...
That should fix that issue very fast... (Patch will come out soon)
@Mattabase notify xD

@CyanideX
Copy link
Member

@Speiger, I tend to get fancy with my textures. 😉 Thanks for looking into this.

@CyanideX
Copy link
Member

It's coming along:
Progress!

@Speiger
Copy link
Author

Speiger commented Sep 30, 2016

Cool :3 i wonder how you do the jetpacks etc xD because they have no textures on Exps Side

@Speiger
Copy link
Author

Speiger commented Sep 30, 2016

@CyanideX do you want to add animations? I can do a oneliner code which allows you to make animations to IC2Classic without using the sprite system while stay still compatible^^"

@CyanideX
Copy link
Member

CyanideX commented Oct 1, 2016

@Speiger, the jetpacks had textures but here are some of the items from my retexture:

Items

I didn't do any animations aside from a few items so no need to worry about that.

@CyanideX
Copy link
Member

CyanideX commented Oct 1, 2016

Ok, @Speiger, I'm going to need some animations for a few items.

@CyanideX
Copy link
Member

CyanideX commented Oct 1, 2016

We're getting there:

image

Nothing a night of beer can't accomplish.

@Speiger
Copy link
Author

Speiger commented Oct 1, 2016

Well I can't tell you where to put it now but,
Leave the texture in the sprite that is going to be animated like it is. Make a separate file that is like vanilla Minecraft texture and do the animation there.
Simply: The texture loader from class inject 2 paths into the texture. 1: the path of the sprite + coords. 2: a replacement path + name which loads if he finds the texture there.
if the loader finds it there it disables classic loading kind and loads the texture normal like any vanilla mc texture.
(Including mc meta files)
I can tell you the name as soon as I am in my dev environment.

@Speiger
Copy link
Author

Speiger commented Oct 1, 2016

@CyanideX well ok i did add the code for the Texture Replacing into my dev invioment (will be with the next release)
So the Textures you want to replace with special Properties you need to place into this path:
"ic2:textures/(blocks or items)/replacements/(SpriteID)X(XPosition)Y(YPosition).png"
for example you want to replace a the Nightvision Goggles the file of the texture has to be called like this:
"i2X2Y2.png" (its a weird name i know but thats the best system i came up with)

Now working on the Rotation part and last the Second Texture for the Nuke.
Also here is a list of Sprite to ID:

"b0" = "ic2:textures/sprites/block_0.png"
"bc" = "ic2:textures/sprites/crops_0.png"
"bgen" = "ic2:textures/sprites/block_generator.png"
"bmach" = "ic2:textures/sprites/block_machine.png"
"bmach2" = "ic2:textures/sprites/block_machine2.png"
"bpersonal" = "ic2:textures/sprites/block_personal.png"
"bcable" = "ic2:textures/sprites/block_cable.png"
"belec" = "ic2:textures/sprites/block_electric.png"
"i0" = "ic2:textures/sprites/item_0.png"
"i1" = "ic2:textures/sprites/item_1.png"
"i2" = "ic2:textures/sprites/item_2.png"
"i3" = "ic2:textures/sprites/item_3.png"
"batBox" = "ic2:textures/sprites/Batbox.png"
"mfe" = "ic2:textures/sprites/MFE.png"
"mfsu" = "ic2:textures/sprites/MFSU.png"
"bBox" = "ic2:textures/sprites/BatteryBox.png"
"triggers" = "ic2:textures/sprites/bc_triggers.png"
"conv" = "ic2:textures/sprites/block_Converter.png"
"CPad" = "ic2:textures/sprites/block_pads.png"

@Mattabase
Copy link

Poke @CyanideX So, how about those textures?

@CyanideX
Copy link
Member

I can finish them I suppose.

It's too bad it won't be for 1.11+... feels like wasted time. But I did promise you I would.

@CyanideX
Copy link
Member

Just want to confirm, @Speiger... you're not updating IC2C for 1.12? I think I misunderstood your Reddit post.

@Yulife Yulife added the suggestion Something to add. label Jun 17, 2017
@Speiger
Copy link
Author

Speiger commented Jun 17, 2017

So far nope.
This 13 months have exhausted me from mc modding and the issue is in that type of area you have no time to break as long as I would need...

@Mattabase
Copy link

Should close this issue, mod requested is dead.

@CyanideX
Copy link
Member

I let you down Matt, I'm sorry.

@Mattabase
Copy link

No let down sir. <3

@CyanideX
Copy link
Member

Will reopen if this ever gets updated to a current Minecraft version.

@CyanideX
Copy link
Member

The day has come.

@CyanideX CyanideX reopened this Oct 25, 2022
@CyanideX CyanideX transferred this issue from Unity-Resource-Pack/Unity Oct 25, 2022
@CyanideX
Copy link
Member

Why aren't there any blockstate or model folders in assets? 😕

@Speiger
Copy link
Author

Speiger commented Oct 25, 2022

@CyanideX yep, I don't allow custom models.
You can replace textures, which are no longer sprite sheets, but we want to be special.
And after reading what mojang changes in 1.19.3 this saves me weeks of work if i decide to port to that version.
Edit:
I planned to do custom model support, but after everything ended i thought, nope not worth the time.

@Speiger
Copy link
Author

Speiger commented Oct 25, 2022

Small side note, i wrote my texture system so that you can replace any side if you wish to do so without models.
It uses a custom loader that compresses textures to reduce the usage of the,

@CyanideX
Copy link
Member

I tried replacing all instances of the macerator in both the ic2 and ic2dev folders but they remained unchanged in game. It isn't clear which textures are being used so I might have to return to this when the mod is further along into 1.19.

@Speiger
Copy link
Author

Speiger commented Oct 25, 2022

the texture_package.json is the file that decides which "file" is being used.
Just copy that to and adjust the "Locations" accordingly.

The Packages are designed to filter out duplicates, but they are basically "key" to "resource location".
In other words these texture_package.json are symlink providers.

@ChloeDawn
Copy link
Member

Do you have any benchmarks to show that these "optimizations" are worthwhile? All I see is that you've arbitrarily restricted customisation for end users and effectively disabled a vanilla API.

@Speiger
Copy link
Author

Speiger commented Oct 26, 2022

@ChloeDawn why isn't the CPU running directly on HDD/SSD instead of ram and Caches?
If a file has to be only loaded once (even larger) vs a tone of tiny files. Believe me you safe a lot of time.
That covers 1.12.

Now the only reason we went away from that is MC actually now uses more cores which effectively makes that optimization useless since you throw resources against the wall to achieve higher performance.

About the optimizations for models.
Lets use cables for a example:
Cables have Blocks have custom models because they require them.
The have 4096 (64*64) Connectivity states. Which are on average 36 quads each.
Thanks to the custom models these are not blockstates but ModelData. And due to recycling only 72 quads per block states.
4096 blockstates are still fine with vanilla load times. Might add 4-5 seconds to the game in load time.

But these blocks can be dyed, foamed, might have redstone interactivity, and might have insulation. Which is on average 17 * 3 * (3-5) block states on average. So 51 - 153 - 255 BlockStates from lowest to average to highest.
If I were to use json models that can get up to 1 Million BlockStates/Models with 36 quads on average. (so 36 million cached baked quads)
With a custom model its 18360 quads (255 * 72)

Dunno you tell me if a custom model system that doesn't use json is worth it? For 1 block out of 12-15 blocks?
And TESR while less memory usage/cpu(loadtimes) is a lot slower since every quad on the TESR is slower rendered on CPU in 1.14+ (irrc) then it is in 1.12 or older.

Why? because minecraft runs matrix operations (where the GPU outclasses the CPU) on the CPU to achieve the same type of rendering that GL1.0 made. So TESR is also not a good solution. Because you pay on average FPS if a lot of cables are placed.
Chunk Rendering is the most efficient since the it uses 1 matrix calculation per render type instead of per block. Which is 4-6 per chunk at max.

@Speiger
Copy link
Author

Speiger commented Oct 26, 2022

@CyanideX if you are willing to work with me, I would help you get things running and if you need something special I can look into it as needed. But if you give up the 1 second after something not working then it is fine if this never happens.

@ChloeDawn
Copy link
Member

It would be nice if you could add wiki documentation or a readme file to the JAR for resource pack developers.

@ChloeDawn
Copy link
Member

ChloeDawn commented Oct 26, 2022

Some further clarification is needed. Looking at the macerator, for example, the ic2dev namespace contains a texture_package.json and textures for it, but the JSON points to assets in the ic2 namespace. In the ic2 namespace, those textures exist, but the texture_package.json file in that folder points to a plethora of different locations that aren't those textures.

ic2dev:textures/block/machine/lv/macerator contains active_dir/inactive_dir files
ic2dev:textures/block/machine/lv/macerator/texture_package.json is:

{
	"active_down": "ic2:block/machine/lv/macerator/active_down",
	"active_east": "ic2:block/machine/lv/macerator/active_east",
	"active_north": "ic2:block/machine/lv/macerator/active_north",
	"active_south": "ic2:block/machine/lv/macerator/active_south",
	"active_up": "ic2:block/machine/lv/macerator/active_up",
	"active_west": "ic2:block/machine/lv/macerator/active_west",
	"inactive_down": "ic2:block/machine/lv/macerator/inactive_down",
	"inactive_east": "ic2:block/machine/lv/macerator/inactive_east",
	"inactive_north": "ic2:block/machine/lv/macerator/inactive_north",
	"inactive_south": "ic2:block/machine/lv/macerator/inactive_south",
	"inactive_up": "ic2:block/machine/lv/macerator/inactive_up",
	"inactive_west": "ic2:block/machine/lv/macerator/inactive_west"
}

ic2:textures/block/machine/lv/macerator contains active_dir/inactive_dir files
ic2:textures/block/machine/lv/macerator/texture_package.json is:

{
	"active_down": "ic2:block/electric/battery_station/mv/down",
	"active_east": "ic2:block/electric/energy_storage/mfe/east",
	"active_north": "ic2:block/electric/energy_storage/mfe/east",
	"active_south": "ic2:block/machine/hv/colossal_macerator/active_south",
	"active_up": "ic2:block/machine/lv/macerator/active_up",
	"active_west": "ic2:block/electric/energy_storage/mfe/east",
	"inactive_down": "ic2:block/electric/battery_station/mv/down",
	"inactive_east": "ic2:block/electric/energy_storage/mfe/east",
	"inactive_north": "ic2:block/electric/energy_storage/mfe/east",
	"inactive_south": "ic2:block/machine/hv/colossal_macerator/active_south",
	"inactive_up": "ic2:block/machine/hv/colossal_macerator/inactive_up",
	"inactive_west": "ic2:block/electric/energy_storage/mfe/east"
}

This is from the latest 1.19 release on CurseForge

@Speiger
Copy link
Author

Speiger commented Oct 26, 2022

That is due to the program that i ran every time i add new textures. These files are actually automatically generated.
What this program does is:
It goes through every folder and maps the files into said json files. The "active_down" is the key, while the "ic2:block/electric/battery_station/mv/down" is the texture that it is supposed to put with that key (and that is supposed to be loaded)
What this program also does is check if any textures are 100% duplicates. If it is it finds the first texture it scanned and matched and put in this specific texture. If it doesn't find a match then it does insert the current texture being compared.

Why is the "ic2dev" texture different to the "ic2" example. The "dev" textures don't have compression enabled.
To ensure the targets that are found are the correct ones.

Why did i do this?
(note these images are a year old),
We wanted to keep the flexiblity of allowing any side of a texture being set, but have not a insane overhead, so this was my solution.

To give a example:
This is without the new system. 2675 textures being loaded.
image

This is with the new system and having de-duplication enabled. And down to 1506 textures being loaded.
image

When i did this i was in a optimization phase where i optimized, SaveFileData, NetworkData, Ram Usage, etc...

If you want I can make a version of the resource pack with all texture_package.json being like the "ic2cdev" version, you showed here. Then you can replace all the textures without any issue.

@Speiger
Copy link
Author

Speiger commented Oct 26, 2022

It would be nice if you could add wiki documentation or a readme file to the JAR for resource pack developers.

That is planned on the github page...
If you look into the API code, it was half documented when ic2c released.
Basically rushed the "API/Documentation" part because it wasn't as important at the time...

But that will be added soon. I just wanted a week of break.

@ChloeDawn
Copy link
Member

If ic2dev is only used by the program, why do you ship it in the JAR? It would be increasing the size of the JAR a lot, no?

@Speiger
Copy link
Author

Speiger commented Oct 26, 2022

IC2C Dev => IC2Programmer art, and that isn't touched by the program.
only the "ic2" folder is automatically updated.

You mean the .5MB of extra size in the 15MB mod where 15MB textures and 15MB code (uncompressed) are inside?

@ChloeDawn
Copy link
Member

If you want I can make a version of the resource pack with all texture_package.json being like the "ic2cdev" version, you showed here. Then you can replace all the textures without any issue.

This would be great, thanks

@Speiger
Copy link
Author

Speiger commented Oct 26, 2022

@ChloeDawn there you go.
https://github.com/TinyModularThings/IC2Classic/wiki/1.19.x-ResourcePacks
(Temp stuff FYI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Something to add.
Projects
None yet
Development

No branches or pull requests

8 participants