MIT License

项目介绍

kchapelier/pseudofractals-voxel-shader 是一个托管在 GitHub 上的开源项目,采用 MIT License 许可证,目前获得 96 个 Star、7 次 Fork。

仓库全名
kchapelier/pseudofractals-voxel-shader
开源许可证
MIT License
Star 数
96
Fork 数
7

README 摘要

pseudofractals-voxel-shader Voxel shader (for MagicaVoxel) to generate pseudofractal volumes. Installing and updating Copy the files in shaders/ to the shader/ folder in your installation of MagicaVoxel. Usage In MagicaVoxel, execute xs pseudofractal 1.0 1.0 1.0 1.01 26. 0.4 0 in its console. Parameters xs pseudofractal xscale yscale zscale distOrder seed threshold cleaning xscale : The scale on the X axis. Small…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pseudofractals-voxel-shader 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pseudofractals-voxel-shader 的源码?

可以直接克隆仓库:git clone https://github.com/kchapelier/pseudofractals-voxel-shader.git;安装与运行步骤见仓库 README。

pseudofractals-voxel-shader 最近还在维护吗?

仓库最近一次更新为 2020年6月20日,当前没有未关闭的 Issue;Star 数为 96,可作为社区活跃度的参考。

关于

Voxel shader (for MagicaVoxel) to generate pseudofractals volumes

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
206
价值分
69
活跃状态
活跃

README

pseudofractals-voxel-shader

Voxel shader (for MagicaVoxel) to generate pseudofractal volumes.

pseudofractals-voxel-shader example

Installing and updating

Copy the files in shaders/ to the shader/ folder in your installation of MagicaVoxel.

Usage

In MagicaVoxel, execute xs pseudofractal 1.0 1.0 1.0 1.01 26. 0.4 0 in its console.

Parameters

xs pseudofractal xscale yscale zscale distOrder seed threshold cleaning

  • xscale : The scale on the X axis. Small number stretches the axis, large number condenses it.
  • yscale : The scale on the Y axis. Small number stretches the axis, large number condenses it.
  • zscale : The scale on the Z axis. Small number stretches the axis, large number condenses it.
  • distOrder : The algorithm uses Minkowski distance which is a generalization of Euclidean and Manhattan distance. This parameter control the “order” of the distance. Values larger than 2 tend to result in squarish structure with flat surfaces. Values very close to 1 (i.e. 1.001) tend to result in regular octahedra. Recommended values are between 0.5 and 2.5.
  • seed : The “magic” value used to generate the pseudofractal. To be specific it is used as a modulus. A value of 0 will always result in an empty volume.
  • threshold : Controls the ratio of live (solid) voxels. A value of 0 means that all voxels are considered as dead. A value of 1 means that all voxels are considered as alive.
  • cleaning : If set and above 0, single / isolated voxels will be removed from the resulting volume.
  • Start with the *scale set to 1, distOrder set to 2. or 1.001, seed set to a number other than 1 and 0 and threshold set to 0.5.
  • Tweak the *scale, distOrder and seed until you have an interesting volume.
  • Fine tune the threshold and eventually enable cleaning if there too many isolated voxels.
  • For best result, render in MagicaVoxel with marching cubes.

Variants

Included are two variants of the shader.

pseudofractal-sub allows to carve an existing volume with the negative space of the pseudofractal.

pseudofractal-add allows to add the pseudofractal to an existing volume without affecting any of its own voxels.

Both variants use the same parameters as the main shader.

Examples

xs pseudofractal 1.0 1.0 1.0 1.0 0.7 0.4 1

xs pseudofractal 1.0 1.0 1.0 1.0 0.7 0.4 1

xs pseudofractal 1.10 1.10 1.10 1.00001 0.1 0.5 1

xs pseudofractal 1.10 1.10 1.10 1.00001 0.1 0.5 1

xs pseudofractal .25 .25 .25 1.33 1.91 0.55 1

xs pseudofractal .25 .25 .25 1.33 1.91 0.55 1

xs pseudofractal .5 .5 .5 1.995 0.751 0.55 1

xs pseudofractal .5 .5 .5 1.995 0.751 0.55 1

xs pseudofractal 1.5 1.5 0.5 2.0 0.179929 0.5 1

xs pseudofractal 1.5 1.5 0.5 2.0 0.179929 0.5 1

Additional notes

  • Thank to Alien who first introduced me to pseudofractals ;)
  • Check Jes Wolfe’s talk on the subject (youtube) if you want to learn more about pseudofractals.
  • If you’re interested in this kind of structure generation but want something more predictable and less random, please check cellular-automata-voxel-shader.

History

1.2.0 (2020-06-20) :

  • Add experimental brush shader for the new voxel brush feature in MagicaVoxel (0.99.5.1).

1.1.0 (2018-10-05) :

  • Add sub and add variants.
  • Add examples in doc.

1.0.1 (2018-09-19) :

  • Fixed an issue which would make the shader fail to work properly on some GPU.

1.0.0 (2018-09-18) :

  • First implementation.

评论

暂无评论