[Tutorial] How to use World Renderer

Started by sumeshi0216 on

Topic category: User side tutorials

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] How to use World Renderer
Thu, 11/21/2024 - 13:32 (edited)

Changes in V1.8.4

In v1.8.4, the vanilla sky, clouds, and weather are automatically removed on the event triggers. If you need to retain them, return false.

 


 

World Renderer

World Renderer can render sky, models, shapes, etc. using procedures and event triggers.

 

Here are the guides.

 


 

Event Triggers

Graphics - Compute FOV

It can set FOV using the procedure "Viewport - Set FOV."

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • fov: It's the vanilla FOV value.
  • partialTick: It's an interpolation factor between ticks.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 


 

Graphics - Compute camera angles

It can compute camera angles using the procedure "Viewport - Set camera angles."

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • yaw/pitch/roll: They're the vanilla camera angles.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 


 

Graphics - Compute fog color

It can set the fog color using the procedure "Viewport - Set fog color."

Note that the alpha values can't be changed.

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • red/green/blue: They're the RGB components of the vanilla fog color.
  • partialTick: It's an interpolation factor between ticks.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 


 

Graphics - Compute light color

It can set the light colors using the procedures in the list "Lighting."

The event trigger "Graphics - Set up dimensions" is also required to make it work.

Note that the alpha values can't be changed.

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 

Here is the guide.

 


 

Graphics - Render clouds

It can render custom clouds using the procedures in the list "Clouds."

The event trigger "Graphics - Set up dimensions" is also required to make it work.

You can retain the vanilla clouds by returning a logical false.

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • ticks: It's the current tick of the client world.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 

Here is the guide. See the guide "Render Effects" on how to set textures.

 


 

Graphics - Render fog

It can set the fog distance and shape using the procedures "Viewport - Set fog distance" and "Viewport - Set fog shape."

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • start/end: They're the start/end distances of the vanilla fog.
  • partialTick: It's an interpolation factor between ticks.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 


 

Graphics - Render overlays

It can render custom overlays using the procedures in the list "Overlay."

 

Dependencies

  • mouseX/mouseY: They're the mouse positions
  • partialTick: It's an interpolation factor between ticks.

 

Here is the guide. See the guide "Render Effects" on how to set textures.

 


 

Graphics - Render shapes

It  can render shapes like triangles, quads, etc., using the procedures in the list "Shape."

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • ticks: It's the current tick of the client world.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 

Here is the guide. See the guide "Render Effects" on how to set textures.

 


 

Graphics - Render sky

It can render custom sky using the procedures in the list "Sky."

The event trigger "Graphics - Set up dimensions" is also required to make it work.

You can retain the vanilla sky by returning a logical false.

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • ticks: It's the current tick of the client world.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 

Here are the guides. See the guide "Render Effects" on how to set textures.

 


 

Graphics - Render weather

It can render custom weather using the procedures in the list "Weather."

The event trigger "Graphics - Set up dimensions" is also required to make it work.

You can retain vanilla weather by returning a logical false.

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • ticks: It's the current tick of the client world.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 

Here are the guides. See the guide "Render Effects" on how to set textures.

 


 

Graphics - Render world

It can render lines, texts, block, item and entity models using the procedures in the list "World."

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • ticks: It's the current tick of the client world.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 


 

Graphics - Set weather particles and sounds

It can set custom weather particles and sounds using the procedures in the list "Weather particles and sounds."

The event trigger "Graphics - Set up dimensions" is also required to make it work.

You can retain the vanilla particles and sounds by returning a logical false.

 

Dependencies

  • dimension: It's the dimension that the camera entity is in.
  • entity: It's the camera entity.
  • partialTick: It's an interpolation factor between ticks.
  • ticks: It's the current tick of the client world.
  • x/y/z: They're the X/Y/Z positions of the camera entity.
  • world: It's the client world that the camera entity is in.

 

Here are the guides.

 


 

Graphics - Set up dimensions

The event trigger is required to work some event triggers. You need to use the procedures in the list "Setup."

 

Dependencies

  • None

 

Here is the guide.

 


 

Useful Procedures

 

Color

Those procedures can get various colors. They can be used on all rendering events.

 

Data

Those procedures can get game/world data. They can be used on all rendering events.

 

Others

They are can be used all rendering events.

 

Render effects

Those procedures is used for rendering. They can be used on the following events only.

  • Graphics - Render clouds
  • Graphics - Render overlays
  • Graphics - Render shapes
  • Graphics - Render sky
  • Graphics - Render weather

Here is the guide.

 


 

Common Mistakes

If you get errors or bugs, try to check the following.

 

Dimension is not set up

The event trigger "Graphics - Set up dimension" is required to work some event triggers.

 

Use wrong event triggers or procedures

In order to render objects, you will need to use event triggers and procedures properly. See the above.

 

Call procedures from non-rendering events

If this example were run, your Minecraft would be crashed. It is not possible to call procedures and run rendering.

 

Modify game/world data on rendering events

Game/world data modifying should not be run on rendering events. That also includes block/entity/item modifying, NBT setting, etc.

However, it is possible to get and use data of blocks, entities, items, NBT, global variables, etc.

Edited by sumeshi0216 on Thu, 11/21/2024 - 13:32
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alpha values can’t be used…
Wed, 07/10/2024 - 14:46

Alpha values can’t be used for fog colors, so you will need to interpolate colors.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
outRGB = defaultRGB + …
Wed, 07/10/2024 - 14:47

outRGB = defaultRGB + (anyRGB - defaultRGB) * starLevel

Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for the help…
Fri, 07/12/2024 - 02:03

Thank you for the help Sumeshi0216. Not to keep bugging you but is it possible to make fog slowly fade out instead of a instant off/on? I have a Sandstorm working now that only starts when its raining and it sets a biome fog when it starts raining however when it stops raining theres a pretty agressive change from the fog back to no fog. 

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use rain level and…
Fri, 07/12/2024 - 22:37

Use rain level and interpolate the distance and color

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Beautiful Plugin, have been…
Sat, 08/03/2024 - 23:34

Beautiful Plugin, have been experimenting with it and having a bit of trouble, but what is the number range for Day level? Is it a 0 - 2 or something?

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am essentially trying to…
Sat, 08/03/2024 - 23:36

I am essentially trying to get the exact time frame during sunrises and sunsets.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Day Level is the time of day…
Sat, 08/10/2024 - 07:33

Day Level is the time of day and ranges from 0.0 to 1.0.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
At noon (tick time = 6000),…
Sat, 08/10/2024 - 07:45

At noon (tick time = 6000), the value will be 0.0.
At midnight (tick time = 18000), the value will be 0.5.

Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sumeshi, can you explain how…
Sun, 08/11/2024 - 20:02

Sumeshi, can you explain how to interpolate the distance and color based on rain level like you mentioned above? I have a neat weather system created but I'm hoping to have the fog gradually change rather than just a abrupt color change. 

I've tried to do this myself but I'm not grasping the fog portion well. 

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is now possible to…
Thu, 08/15/2024 - 15:15

It is now possible to interpolate the fog color in v1.8.3.

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
love u soooooo much! I'v…
Tue, 08/27/2024 - 07:06

love u soooooo much! I'v been looking for a procedure that allow me to zoom in while aiming for a long time ! 

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
its not working for me i…
Sun, 09/08/2024 - 15:52

its not working for me i import the plugin and it won't work it said missing minversion

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to deactivate…
Mon, 09/23/2024 - 12:45

Is it possible to deactivate animations like running and head movement from world rendered entities? If not, it would be very useful! Thank you for this awesome plugin! :D

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is it possible to render…
Fri, 10/04/2024 - 09:26

is it possible to render stars in the end but without the sun or moon?