# Paint not rendering with .vdc files

**URL:** <https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278>\
**Category:** Uncategorized\
**Created:** [February 22, 2023, 9:30am UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278 "2023-02-22T09:30:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjun0103](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@arjun0103](https://vapor.discourse.group/u/arjun0103)\
**Post date:** [February 22, 2023, 9:30am UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/1 "2023-02-22T09:30:32Z")

</div>

I have a bunch of binary data files with dimensions 1200x1200x400 (encoding velocity, magnetic field components and temperature). So I used the vdccreate command in the terminal to create an empty file with a list of 3 variables (x,y, and z compenents of velocity). And then I used the raw2vdc command as suggested in the documentation for all the 3 variables to store in the original file. But the issue I am facing is that when I try to render the image in the VAPOR GUI, the empty box dimension doesn’t appear after loading the file (as it does for other files), and when I try using the Volume renderer, it gives the following error: “Paint failed”, and in the logs, it says “error performing paint event”. However, I later tried it with just one variable (z velocity component) instead of all three, and it worked. I don’t seem to understand what the issue is. Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![pearse](https://yyz2.discourse-cdn.com/free1/user_avatar/vapor.discourse.group/pearse/32/177_2.png) [@pearse](https://vapor.discourse.group/u/pearse)\
**Post date:** [February 22, 2023, 5:02pm UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/2 "2023-02-22T17:02:51Z")

</div>

Could you share the vdccreate command you used, as well as all of the raw2vdc commands that followed?

---

<div class="post-metadata">

**Author:** ![arjun0103](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@arjun0103](https://vapor.discourse.group/u/arjun0103)\
**Post date:** [February 22, 2023, 5:37pm UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/3 "2023-02-22T17:37:53Z")

</div>

Yes, the vdc command I used is:

vdccreate -dimension 1200x1200x400 -vars3d U:V:W velocity.vdc

and the raw2vdc commands are:

raw2vdc -ts 1 -varname U velocity.vdc result\_prim\_1.072400  
raw2vdc -ts 1 -varname V velocity.vdc result\_prim\_1.072400  
raw2vdc -ts 1 -varname W velocity.vdc result\_prim\_1.072400

(where ‘result\_prime…’ is just the binary filename with the variables)

---

<div class="post-metadata">

**Author:** ![pearse](https://yyz2.discourse-cdn.com/free1/user_avatar/vapor.discourse.group/pearse/32/177_2.png) [@pearse](https://vapor.discourse.group/u/pearse)\
**Post date:** [February 22, 2023, 5:57pm UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/4 "2023-02-22T17:57:38Z")

</div>

That looks legitimate to me. I know your files are large, but you would be able to share one of them so I can try to reproduce your error?

---

<div class="post-metadata">

**Author:** ![arjun0103](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@arjun0103](https://vapor.discourse.group/u/arjun0103)\
**Post date:** [February 22, 2023, 6:18pm UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/5 "2023-02-22T18:18:06Z")

</div>

I have uploaded the file in this google drive [link](https://drive.google.com/file/d/1dYRRWV68KGhugM4LGJwuR6HAJSpUg6x3/view?usp=share_link).  
This is the z-velocity component.

---

<div class="post-metadata">

**Author:** ![pearse](https://yyz2.discourse-cdn.com/free1/user_avatar/vapor.discourse.group/pearse/32/177_2.png) [@pearse](https://vapor.discourse.group/u/pearse)\
**Post date:** [February 22, 2023, 6:49pm UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/6 "2023-02-22T18:49:30Z")

</div>

The problem was the `-ts 1` flag in raw2vdc, which is an offset from the first timestep. This should be 0, or omitted since 0 is the default.

Vapor should probably be warning users when it receives invalid arguments though, so I’ll [submit a ticket](https://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) to make this error more obvious.

```auto
raw2vdc -ts 0 -varname W velocity.vdc result_prim_1.072400

```

Thank you for bringing this problem to our attention and let us know if there are further issues.

---

<div class="post-metadata">

**Author:** ![arjun0103](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@arjun0103](https://vapor.discourse.group/u/arjun0103)\
**Post date:** [February 23, 2023, 2:09am UTC](https://vapor.discourse.group/t/paint-not-rendering-with-vdc-files/278/7 "2023-02-23T02:09:22Z")

</div>

Thanks a lot! It worked perfectly now.
