- Notifications
You must be signed in to change notification settings - Fork3
prgumd/SeaDroneSim2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SeaDroneSim2 is a python script to create a parametrized, simulated ocean in Blender. The scripts take advantage of Blender's python API, bpy, to create a parametrized ocean that allows one to alter the water, waves, and camera without having to interact with Blender's physical UI.
First, clone SeaDroneSim2 onto your machine with the following:git clone https://github.com/akshajgaur/ocean-sim.git
. Then, open a new file in blender and navigate to thescripting
tab. Open thesrc
directory and view themain.py
file. When opened, the file should look like this.
import bpyimport sysimport osdir = os.path.dirname(bpy.data.filepath)if not dir in sys.path: sys.path.append(dir ) from water import Waterfrom plane import create_plane, delete_planefrom waves import Wavesdef create_sim(mat, geo, size): delete_plane() create_plane(size) t = Water(mat) t.edit_water() t.change_color() w = Waves(geo) if __name__ == "__main__": create_sim("sample_mat", "sample_geo", 2)
To change the simulated, modify thecreate_sim()
function. However, the function must contain at least three components no matter the modifications. First, thecreate_plane()
function must be called to initialize the plane for the ocean. Then, aWater
object must be initialized to construct the initial ocean. Finally, aWaves
object must be created to create the waves. Each object has associated functions to edit certain features of the object. For example, to change the color of the water we can run the following fragment of code.
# Create initial objectwater = Water()# Change colorwater.change_color(10, 10, 10)
Similarly, we can also change the features of theWave
object. To change the tilt of the waves, we can run the following fragment:
# Create initial objectwave = Waves()# Change tiltwaves.change_tilt(.4)
Please cite the below if you used the real dataset. Thanks to Hannah C. Cubaynes, they open-sourced their real dataset.
@article{cubaynes2022whales, title={Whales from space dataset, an annotated satellite image dataset of whales for training machine learning models}, author={Cubaynes, Hannah C and Fretwell, Peter T}, journal={Scientific data}, volume={9}, number={1}, pages={245}, year={2022}, publisher={Nature Publishing Group UK London}}
The code can be found here:https://colab.research.google.com/drive/1yjfjL0ND3LQRI4N16pLLD-Sik9IdcmmU?usp=sharing
Link to paper:https://arxiv.org/abs/2308.07766
please cite our work if you find it useful!
@inproceedings{gaur2023whale, title={Whale detection enhancement through synthetic satellite images}, author={Gaur, Akshaj and Liu, Cheng and Lin, Xiaomin and Karapetyan, Nare and Aloimonos, Yiannis}, booktitle={OCEANS 2023-MTS/IEEE US Gulf Coast}, pages={1--7}, year={2023}, organization={IEEE}}