A question about modeling world surface #1581
Closed
sanbens1234
started this conversation in
General
Replies: 2 comments
-
I don't understand why you are getting these "staircase" jumps. It should be smooth. Here, I made you an example: hfield.mp4<mujoco>
<asset>
<hfield name="example" size="0.9 1.1 1 .1" nrow="50" ncol="20" elevation="
0.303 0.348 0.384 0.411 0.424 0.421 0.399 0.353 0.278 0.166 0. 0.166 0.278 0.353 0.399 0.421 0.424 0.411 0.384 0.348
0.301 0.346 0.382 0.409 0.423 0.422 0.402 0.362 0.299 0.218 0.166 0.218 0.299 0.362 0.402 0.422 0.423 0.409 0.382 0.346
0.293 0.339 0.376 0.404 0.421 0.424 0.412 0.384 0.342 0.299 0.278 0.299 0.342 0.384 0.412 0.424 0.421 0.404 0.376 0.339
0.281 0.327 0.366 0.396 0.416 0.424 0.421 0.406 0.384 0.362 0.353 0.362 0.384 0.406 0.421 0.424 0.416 0.396 0.366 0.327
0.265 0.31 0.35 0.382 0.406 0.42 0.425 0.421 0.412 0.402 0.399 0.402 0.412 0.421 0.425 0.42 0.406 0.382 0.35 0.31
0.243 0.289 0.329 0.363 0.39 0.409 0.42 0.424 0.424 0.422 0.421 0.422 0.424 0.424 0.42 0.409 0.39 0.363 0.329 0.289
0.217 0.262 0.303 0.339 0.368 0.39 0.406 0.416 0.421 0.423 0.424 0.423 0.421 0.416 0.406 0.39 0.368 0.339 0.303 0.262
0.187 0.231 0.272 0.308 0.339 0.363 0.382 0.396 0.404 0.409 0.411 0.409 0.404 0.396 0.382 0.363 0.339 0.308 0.272 0.231
0.154 0.196 0.236 0.272 0.303 0.329 0.35 0.366 0.376 0.382 0.384 0.382 0.376 0.366 0.35 0.329 0.303 0.272 0.236 0.196
0.118 0.158 0.196 0.231 0.262 0.289 0.31 0.327 0.339 0.346 0.348 0.346 0.339 0.327 0.31 0.289 0.262 0.231 0.196 0.158
0.08 0.118 0.154 0.187 0.217 0.243 0.265 0.281 0.293 0.301 0.303 0.301 0.293 0.281 0.265 0.243 0.217 0.187 0.154 0.118
0.042 0.077 0.11 0.141 0.169 0.194 0.215 0.231 0.243 0.25 0.253 0.25 0.243 0.231 0.215 0.194 0.169 0.141 0.11 0.077
0.004 0.035 0.065 0.094 0.12 0.143 0.163 0.178 0.19 0.196 0.199 0.196 0.19 0.178 0.163 0.143 0.12 0.094 0.065 0.035
-0.032 -0.005 0.022 0.047 0.071 0.092 0.11 0.124 0.135 0.141 0.143 0.141 0.135 0.124 0.11 0.092 0.071 0.047 0.022 -0.005
-0.066 -0.043 -0.02 0.003 0.024 0.042 0.058 0.071 0.08 0.086 0.088 0.086 0.08 0.071 0.058 0.042 0.024 0.003 -0.02 -0.043
-0.097 -0.078 -0.058 -0.039 -0.021 -0.005 0.009 0.02 0.029 0.034 0.035 0.034 0.029 0.02 0.009 -0.005 -0.021 -0.039 -0.058 -0.078
-0.124 -0.108 -0.092 -0.077 -0.062 -0.048 -0.036 -0.027 -0.02 -0.015 -0.014 -0.015 -0.02 -0.027 -0.036 -0.048 -0.062 -0.077 -0.092 -0.108
-0.146 -0.134 -0.121 -0.109 -0.097 -0.086 -0.077 -0.069 -0.063 -0.059 -0.058 -0.059 -0.063 -0.069 -0.077 -0.086 -0.097 -0.109 -0.121 -0.134
-0.162 -0.154 -0.145 -0.136 -0.127 -0.118 -0.111 -0.105 -0.1 -0.097 -0.096 -0.097 -0.1 -0.105 -0.111 -0.118 -0.127 -0.136 -0.145 -0.154
-0.173 -0.168 -0.162 -0.156 -0.15 -0.144 -0.138 -0.134 -0.13 -0.128 -0.127 -0.128 -0.13 -0.134 -0.138 -0.144 -0.15 -0.156 -0.162 -0.168
-0.177 -0.176 -0.173 -0.17 -0.166 -0.162 -0.159 -0.156 -0.153 -0.152 -0.151 -0.152 -0.153 -0.156 -0.159 -0.162 -0.166 -0.17 -0.173 -0.176
-0.177 -0.178 -0.178 -0.177 -0.175 -0.174 -0.172 -0.17 -0.169 -0.168 -0.168 -0.168 -0.169 -0.17 -0.172 -0.174 -0.175 -0.177 -0.178 -0.178
-0.17 -0.174 -0.176 -0.177 -0.178 -0.178 -0.177 -0.177 -0.177 -0.176 -0.176 -0.176 -0.177 -0.177 -0.177 -0.178 -0.178 -0.177 -0.176 -0.174
-0.159 -0.164 -0.168 -0.171 -0.174 -0.175 -0.176 -0.177 -0.177 -0.177 -0.177 -0.177 -0.177 -0.177 -0.176 -0.175 -0.174 -0.171 -0.168 -0.164
-0.142 -0.149 -0.155 -0.16 -0.163 -0.166 -0.168 -0.17 -0.171 -0.172 -0.172 -0.172 -0.171 -0.17 -0.168 -0.166 -0.163 -0.16 -0.155 -0.149
-0.122 -0.131 -0.137 -0.143 -0.148 -0.152 -0.155 -0.157 -0.159 -0.16 -0.16 -0.16 -0.159 -0.157 -0.155 -0.152 -0.148 -0.143 -0.137 -0.131
-0.099 -0.108 -0.116 -0.122 -0.128 -0.133 -0.136 -0.139 -0.141 -0.142 -0.142 -0.142 -0.141 -0.139 -0.136 -0.133 -0.128 -0.122 -0.116 -0.108
-0.074 -0.083 -0.091 -0.098 -0.105 -0.11 -0.114 -0.117 -0.119 -0.12 -0.121 -0.12 -0.119 -0.117 -0.114 -0.11 -0.105 -0.098 -0.091 -0.083
-0.048 -0.057 -0.065 -0.072 -0.078 -0.084 -0.088 -0.091 -0.094 -0.095 -0.096 -0.095 -0.094 -0.091 -0.088 -0.084 -0.078 -0.072 -0.065 -0.057
-0.021 -0.03 -0.038 -0.045 -0.051 -0.056 -0.061 -0.064 -0.066 -0.068 -0.068 -0.068 -0.066 -0.064 -0.061 -0.056 -0.051 -0.045 -0.038 -0.03
0.006 -0.003 -0.01 -0.017 -0.023 -0.028 -0.032 -0.036 -0.038 -0.039 -0.04 -0.039 -0.038 -0.036 -0.032 -0.028 -0.023 -0.017 -0.01 -0.003
0.031 0.023 0.016 0.01 0.004 -0. -0.004 -0.007 -0.01 -0.011 -0.012 -0.011 -0.01 -0.007 -0.004 -0. 0.004 0.01 0.016 0.023
0.053 0.047 0.041 0.035 0.03 0.026 0.022 0.019 0.017 0.016 0.016 0.016 0.017 0.019 0.022 0.026 0.03 0.035 0.041 0.047
0.073 0.068 0.062 0.058 0.053 0.05 0.047 0.044 0.042 0.041 0.041 0.041 0.042 0.044 0.047 0.05 0.053 0.058 0.062 0.068
0.089 0.085 0.081 0.077 0.074 0.071 0.068 0.066 0.065 0.064 0.063 0.064 0.065 0.066 0.068 0.071 0.074 0.077 0.081 0.085
0.101 0.098 0.096 0.093 0.09 0.088 0.086 0.084 0.083 0.082 0.082 0.082 0.083 0.084 0.086 0.088 0.09 0.093 0.096 0.098
0.11 0.108 0.106 0.104 0.102 0.101 0.099 0.098 0.097 0.097 0.097 0.097 0.097 0.098 0.099 0.101 0.102 0.104 0.106 0.108
0.113 0.113 0.112 0.111 0.11 0.109 0.109 0.108 0.107 0.107 0.107 0.107 0.107 0.108 0.109 0.109 0.11 0.111 0.112 0.113
0.113 0.113 0.114 0.114 0.114 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.114 0.114 0.114 0.113
0.108 0.11 0.111 0.112 0.112 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.113 0.112 0.112 0.111 0.11
0.1 0.102 0.104 0.106 0.107 0.108 0.109 0.109 0.11 0.11 0.11 0.11 0.11 0.109 0.109 0.108 0.107 0.106 0.104 0.102
0.088 0.091 0.094 0.096 0.098 0.099 0.1 0.101 0.102 0.102 0.102 0.102 0.102 0.101 0.1 0.099 0.098 0.096 0.094 0.091
0.074 0.077 0.08 0.083 0.085 0.087 0.088 0.09 0.09 0.091 0.091 0.091 0.09 0.09 0.088 0.087 0.085 0.083 0.08 0.077
0.057 0.061 0.064 0.067 0.07 0.072 0.074 0.075 0.076 0.076 0.076 0.076 0.076 0.075 0.074 0.072 0.07 0.067 0.064 0.061
0.039 0.043 0.046 0.05 0.052 0.055 0.056 0.058 0.059 0.059 0.06 0.059 0.059 0.058 0.056 0.055 0.052 0.05 0.046 0.043
0.02 0.024 0.028 0.031 0.034 0.036 0.038 0.039 0.04 0.041 0.041 0.041 0.04 0.039 0.038 0.036 0.034 0.031 0.028 0.024
0.001 0.005 0.008 0.012 0.014 0.017 0.018 0.02 0.021 0.022 0.022 0.022 0.021 0.02 0.018 0.017 0.014 0.012 0.008 0.005
-0.017 -0.014 -0.01 -0.008 -0.005 -0.003 -0.001 0.001 0.002 0.002 0.002 0.002 0.002 0.001 -0.001 -0.003 -0.005 -0.008 -0.01 -0.014
-0.034 -0.031 -0.028 -0.026 -0.023 -0.021 -0.019 -0.018 -0.017 -0.017 -0.016 -0.017 -0.017 -0.018 -0.019 -0.021 -0.023 -0.026 -0.028 -0.031
-0.05 -0.047 -0.044 -0.042 -0.04 -0.038 -0.037 -0.035 -0.035 -0.034 -0.034 -0.034 -0.035 -0.035 -0.037 -0.038 -0.04 -0.042 -0.044 -0.047"/>
</asset>
<worldbody>
<light pos="0 0 2"/>
<composite type="particle" count="4 4 4" spacing="0.1" offset="0 0 1">
<geom size=".025" rgba=".8 .2 .1 1"/>
</composite>
<geom type="hfield" hfield="example"/>
</worldbody>
</mujoco> |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also, please use issues rather than discussions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I want to model a terrain whose cross section is a specific height functions h(x) with respect to x-axis(see figure 1), is there any way to construct such terrain. It seems that hfield is not possible, because it is discrete and not smooth enough(see firgure 2). I wonder if it is possible to model the stl by myself, and then use CoACD library to turn it into convex objects( it seems that it may also not smooth enough?). Or is there any other efficient way? Thank you in advance!
figure1
figure2
Beta Was this translation helpful? Give feedback.
All reactions