Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Using vector clipping paths for dynamic lighting

First, I would like to admit that I am new to the system, but after watching several videos on how dynamic lighting works, it hit me that if an image had a clipping path to it and was able to upload said clipping path with image for use with dynamic lighting it might make it easier to add elements and use dynamic lighting right off the bat. I apologize in advance for getting to graphic geek on this, but it was just a thought.
1401896032
Lithl
Pro
Sheet Author
API Scripter
Standard web images (png, jpg, gif) don't store such data. That would make it rather difficult to upload as part of the image. If you were to upload it separately, what would the file format be?
1401898436
DXWarlock
Sheet Author
API Scripter
I agree id like something like this too :) But the format of upload I wouldnt be sure what could be used. Why I avoid large dungeons, my party loves them..but adding a lighting outline 5 pixels inside all the walls to a 60+ room dungeon is an all day process. Being able to go into photoshop, select walls, contract 5 px, cut to transparent and save as (some kinda format) and drop on lighting layer would be 100x faster. But with lighting done as a vector base, dont think its possible :(
JPG, EPS, TIFF, PSD, AI, and PNG all have the ability to embed clipping path information right into the file. Obviously I'm not a programmer, but as an alternative, maybe a second black and white file can be saved like a bump map file for 3d rendering. Again these are just thoughts from a person who does photo/video/graphics and not a programmer, it just clicks with me on how it might make it faster to create this setup to use. If you like, I can create images of what I'm talking about to be tested on.
To give an idea of bump mapping here is a blurb from wikipedia: <a href="http://en.wikipedia.org/wiki/Bump_mapping" rel="nofollow">http://en.wikipedia.org/wiki/Bump_mapping</a>
1402795203
Lithl
Pro
Sheet Author
API Scripter
Bumpmaps have nothing to do with either clipping or vectors (in the sense of vector art). A bumpmap uses the color at each location to represent a normal vector (in the sense of vectors in physics). While you could certainly include information about what areas of the image are see-through vs. solid (simply using transparency would be simple), it's still a raster image, and the DL system works on vectors.
Brian, I was just using bump maps as an example, but it sounds like you have the basic idea of it. Either way, using clipping paths or a secondary image to plot out the dynamic lighting might make it easier. I think if you could use clipping paths though it can be connected to the image and would work when resizing.
Especially if you use EPS or AI files
1403276449
The Aaron
Roll20 Production Team
API Scripter
I'd totally go for a mask image to define the walls for lighting. I tried exactly what William suggested and was sad that it didn't work.
1403281672

Edited 1403281711
Lithl
Pro
Sheet Author
API Scripter
Gary H. said: I think if you could use clipping paths though it can be connected to the image and would work when resizing. Especially if you use EPS or AI files AI is a proprietary format owned by Adobe, and there is no means to properly identify an EPS file because of the variety of ways it can be previewed. Further, while a number of programs will happily convert vector graphics to EPS, the EPS file itself is actually a PostScript program; many exporters create a PS the builds a raster image, not a vector image, and there's potential harm in someone uploading an arbitrary script file. As for AI files, even if someone out on the internet has figured out the specification for it (a spec which could change without notice), the cheapest way to (legally) get Illustrator costs twice as much as a Mentor subscription (US$19.99/mo). With the exception of Corel's Paint Shop Pro (US$60), I can't find any graphics editor that supports all versions of AI files; most can only read them (not write), and many can only handle the older versions (which were essentially EPS files). Finally: the only vector graphics file format that is at all likely to be compatible across the Roll20 userbase is SVG, as it's the only kind of vector art that has native browser support. However, as of April 2014, you can't draw an SVG file on an HTML5 canvas (what the Roll20 VTT is made of) on all browsers. This makes it rather difficult to use for DL walls. It does work in both Chrome and IE11, so it will likely spread to other browsers going forward, but we're not there yet.
Brian, thank you for the input. I did not realized the logistical connections to make it feasible. Like I mentioned earlier, I'm not a programer, so I was just kicking it around from a graphic design perspective. Like William mentioned, it seems like a daunting task to set up DL on large maps, but the overall function is worth it and is a plus to the any gaming done. If there is anything I can do to help in this please let me know.
1403459639
The Aaron
Roll20 Production Team
API Scripter
Your post got me thinking... and coding... Enjoy! <a href="https://app.roll20.net/forum/post/949734/script-walls-svg-path-importer-for-dynamic-lighting/#post-949734" rel="nofollow">https://app.roll20.net/forum/post/949734/script-walls-svg-path-importer-for-dynamic-lighting/#post-949734</a>