Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Update chisel road line support

mskurnik opened this issue ยท 1 comments

commented

Feature Description:
Update chisel road line support

Additional context:

I've updated this a few times to better support the lines. The lines render almost correctly now but connect to other line types when they should not.

I was recently able to modify the chisel road line support so instead of disconnected "dots", the road lines (mostly) connect. This implementation is not perfect and if anyone know how to tweak it, please let me know. I did this by trial and error as there is a lack in documentation on what all these parameters actually do. I'm not sure if there is a way for dynamp to add to the ModScrapper mod the ability to export if a block has any patches (return the count if possible). It would make things easier. It may be possible to also use this to create other connected textures.

My steps to reproduce are as follows:

Add/modify/replace existing chisel-models.txt

This renders the road lines like redstone dust. Check if you have an existing %road_line section and replace it with this

customblock:id=%road_line,data=*,class=org.dynmap.hdmap.renderer.RedstoneWireRenderer
ignore-updates:id=%road_line

Add/modify/replace existing chisel-textures.txt

Check if you have an existing %road_line section and replace it with these code blocks.

Add the texture definitions

block:id=%road_line,data=0,face0-5=12000:white-center,patch0=4000:white-side,patch1=0:white-long,patch2=6000:white-side,patch3=4000:white-long,colorMult=fff,layer0=2,layer1=3,transparency=TRANSPARENT
block:id=%road_line,data=1,face0-5=12000:yellow-center,patch0=4000:yellow-side,patch1=0:yellow-long,patch2=6000:yellow-side,patch3=4000:yellow-long,colorMult=fff,layer0=2,layer1=3,transparency=TRANSPARENT
block:id=%road_line,data=2,face0-5=12000:double-white-center,patch0=4000:double-white-side,patch1=0:double-white-long,patch2=6000:double-white-side,patch3=4000:double-white-long,colorMult=fff,layer0=2,layer1=3,transparency=TRANSPARENT
block:id=%road_line,data=3,face0-5=12000:double-yellow-center,patch0=4000:double-yellow-side,patch1=0:double-yellow-long,patch2=6000:double-yellow-side,patch3=4000:double-yellow-long,colorMult=fff,layer0=2,layer1=3,transparency=TRANSPARENT

# these are errors really
block:id=%road_line,data=4,data=8,data=12,stdrot=true,transparency=TRANSPARENT,face0-5=0:white-center
block:id=%road_line,data=5,data=9,data=13,stdrot=true,transparency=TRANSPARENT,face0-5=0:yellow-center
block:id=%road_line,data=6,data=10,data=14,stdrot=true,transparency=TRANSPARENT,face0-5=0:double-white-center
block:id=%road_line,data=7,data=11,data=15,stdrot=true,transparency=TRANSPARENT,face0-5=0:double-yellow-center

Add the block definitions

# %road_line:* (road_line), render=team.chisel.client.render.RendererRoadLine(CUSTOM), opaque=false,cls=team.chisel.block.BlockRoadLine
#block:id=%road_line,data=0,stdrot=true,transparency=TRANSPARENT,face0-5=0:Chisel/line-marking/white-center
block:id=%road_line,data=0,face0-5=0:Chisel/line-marking/white-center,patch0=4000:Chisel/line-marking/white-long,patch1=4000:Chisel/line-marking/white-side,patch2=4000:Chisel/line-marking/white-long,patch3=0:Chisel/line-marking/white-long,colorMult=C00000,layer0=2,layer1=3,transparency=TRANSPARENT,stdrot=false
block:id=%road_line,data=1,face0-5=0:Chisel/line-marking/yellow-center,patch0=4000:Chisel/line-marking/yellow-long,patch1=4000:Chisel/line-marking/yellow-side,patch2=4000:Chisel/line-marking/yellow-long,patch3=0:Chisel/line-marking/yellow-long,colorMult=C00000,layer0=2,layer1=3,transparency=TRANSPARENT,stdrot=false
block:id=%road_line,data=2,face0-5=0:Chisel/line-marking/double-white-center,patch0=4000:Chisel/line-marking/double-white-long,patch1=4000:Chisel/line-marking/double-white-side,patch2=4000:Chisel/line-marking/double-white-long,patch3=0:Chisel/line-marking/double-white-long,colorMult=C00000,layer0=2,layer1=3,transparency=TRANSPARENT,stdrot=false
block:id=%road_line,data=3,face0-5=0:Chisel/line-marking/double-yellow-center,patch0=4000:Chisel/line-marking/double-yellow-long,patch1=4000:Chisel/line-marking/double-yellow-side,patch2=4000:Chisel/line-marking/double-yellow-long,patch3=0:Chisel/line-marking/double-yellow-long,colorMult=C00000,layer0=2,layer1=3,transparency=TRANSPARENT,stdrot=false

Test

To test your changes, use the /dynmap reload command to reload the texture and model definitions and then use /dynmap radiusrender 8 (or some other value) to render near some existing road lines. Wait for dynmap to update and see your results.

Results

As you can see below, by implementing this, you get some pretty decent results.
image

It, however, is not perfect as it connects to other line types because they share the same ID but have different damage/data types. So if you know how to tweak this, let me know
image

commented

This should be in the BlockScan repo- Great work BTW!