Home | Tutorials | Wiki | Issues
Ask Your Question
0

Adding water to the world

asked 2017-11-11 13:30:07 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hey, I am creating a world for Submarine robotics competition. In the attached image I want to add water in the pool area. I tried playing around with model.sdf.

<visual name="surface">

<cast_shadows>false</cast_shadows>
<pose>0 0 0 0 0 0</pose>
<geometry>
  <box>
    <size>60 60 .1</size>
  </box>
</geometry>
<material>
  <script>
    <uri>model://ocean_box/materials/scripts</uri>
    <uri>model://ocean_box/materials/textures</uri>
    <name>/Water</name>
  </script>
</material>
</visual>

C:\fakepath\transdec.png

edit retag flag offensive close merge delete

Comments

Your SDF file is referring to a model called `ocean_box`, do you have that model and its materials?

chapulina gravatar imagechapulina ( 2017-11-11 13:35:25 -0500 )edit

Yes, I do. Is better to make a dae from Blender or somethign for my water surface in the pool ?

Charlie Brown gravatar imageCharlie Brown ( 2017-11-12 12:58:57 -0500 )edit

You can get similar results with a separate mesh for the water or a texture on the same mesh. It's a matter of what you are more comfortable doing.

chapulina gravatar imagechapulina ( 2017-11-12 19:46:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-20 03:23:18 -0500

musamorena gravatar image

If that texture in case is the one available here, I would advise you to use a separate mesh like it is set in this SDF file. This shader is supposed to displace the mesh vertices, so I think using a simple box geometry it won't work as expected.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-11-11 13:30:07 -0500

Seen: 268 times

Last updated: Nov 11 '17