I modified the code to switch Z and Y, I'll work on it some more tonight and upload a new version with some other cool features soon.
Announcement
Collapse
No announcement yet.
Interior mapping shader
Collapse
X
-
I have! I've updated and changed several things, I'll try to upload the current version so at least you'll have an updated version to use, then add the rest of the planned features.
Comment
-
Awesome Rens! I'm really interested in this as well, for Maya. Thanks for any updates!
edit: I do have it working in Maya Vray, but with wacky coordinates and flips. But does function.
-JohnLast edited by jdrouse; 20-12-2016, 03:53 PM.
Comment
-
Hey everybody, here's v5! I'll upload some example of the new features soon, but here's the shader already!
http://www.rensheeren.com/osl/interi...g_tex_v005.osl
There's a new feature that scales the rooms to fit the bounding box of the object so you have properly fitting rooms, however it needs vrayusercolors as inputs so the shader can know the size of the object, use this script to generate the data (in max):
Code:for o in selection do ( v_min = in coordsys local o.min v_max = in coordsys local o.max s_min = (v_min[1] as string) + "," + (v_min[2] as string)+ "," + (v_min[3] as string) s_max = (v_max[1] as string) + "," + (v_max[2] as string) + "," + (v_max[3] as string) setUserProp o "intMap_bboxmin" s_min setUserProp o "intMap_bboxmax" s_max )
Ok, more to follow but sleepy time now!
To do:
- UV mode if possible at all.
- Texture lighting.
- Test/implement y up.
- Room rotation instead of random per wall so lighting stays connected.
- Side rooms have no walls on outer box wall, so you can see through the corners of the building.
- Color temperature (K) varation.
Known issues:
- WIP.
Notes:
- Connect the atlas image.
- Lighting mode:
0 - atlas base texture only
1 - multiply base with lighting
2 - replace base with lighting
Comment
-
v6! Added outer wall removal which was a bit of a bad boy to sort out, works only with the room fitting option from the previous post (needs the script) as the shader needs to know where the outer rooms are.
http://www.rensheeren.com/osl/interi...g_tex_v006.osl
v005 2016/12/21 (rh)
- Cleaned up more code.
- Added room fitting to bounding box.
- First setup of Y is up Maya mode, needs testing.
- Changed to room size.
- Texture inputs and code for separate lighting maps.
- Added lighting modes.
v006 2016/12/26 (rh)
- Added outer wall removal.
- Reworked UI a bit.
Comment
-
Originally posted by joconnell View PostBurn the witch
Originally posted by EToth View PostComments added below ,thanks again for the detailed suggestions!
- Outside Walls
Check!
- Inverted Floors
Hm, for me it's the ceilings that are inverted! I'll fix that.
- Uneven Floor Number
Yes, the coordinate center is the object's pivot point, and it will scale from there. The room fitting feature makes sure the rooms will always fit to the bounding box edges.
- Atlas Rows?
They work for me now, at least in the latest version. For lighting there's the lit rooms amount which will either switch off the atlas base randomly, ot just the direct lighting atlas, depending on which lighting mode you've picked. (I'll upload some lighting mode and lighting examples soon).
- Color Out vs Result
As this is an OSL texture, you'll need to use a VRayOSLTex node, then plug that into a VRayLightMtl for example, that should do the trick.
- User settings (Y up vs Z up)
This will be a tricky one! I doubt the button I've added now will work fully if at all, I currently have no access to Maya with VRay but I'll see what I can do.
Originally posted by japetus View PostAwesome, I just found this as well. I too would love to be able to, or to know how to have a random assortment of different bitmaps so each floor isn't the same, it's not immediately obvious how to do that right now...seems like I've been having to make more and more buildings and cities recently and this would be really handy to have in my toolkit.
Comment
- Outside Walls
-
This looks so nice. I have questions :
1) Do you foresee a way to handle curved buildings?
2) Do you think you might be able to handle wall/floor thickness values? Right now, the walls are infinitely thin, which doesn't look quite right.
3) Do you think you might be able to integrate the bumpy glass OSL code into this one, so that there are windows (between the walls), that have irregularities like real buildings? I wasn't sure whether the plan was to make an onion building, where the interior is generated on geometry inside the outer, though, or a universal 'building' shader was planned.
4) Would the code support variable sized rooms (e.g. double width/depth) to provide some variation in the look and feel?Last edited by philstopford; 29-12-2016, 09:58 AM.
Comment
-
Hey Phil!
1) Likely not, at least nothing comes to mind now on how to do that. Well, maybe offset each floor (level), but that's going to be pretty complicated.
2) Yes I have been thinking about this, I'm able to move the walls around randomly and it should be possible to have parameters for wall and floor thickness.
3) The ArchGlass shader? Yes, that's the plan, it looks like it might be best to have an input in the ArchGlass shader for a self-illuminating map (the interior mapping shader in this case) as using a VRayBlendMtl doesn't give correct blending of the two yet, though I need to do some more testing, might be some code issue. The other options is to have onion geometries like you said.
4) Very likely, and technically you could use the randomLit_raw alpha output of one intmap shader, pipe that through a channelMixer shader to shuffle the alpha into RGB, do some colour corrections, and use that as a mask to blend it with another intmap shader with deeper rooms for example. I'm planning on making that mask have a horizontal component as well so you will have multiple rooms next to eachother with the same settings (or lights) like in real buildings.
Cheers
Comment
-
Originally posted by philstopford View Post2) Do you think you might be able to handle wall/floor thickness values? Right now, the walls are infinitely thin, which doesn't look quite right.
3) Do you think you might be able to integrate the bumpy glass OSL code into this one, so that there are windows (between the walls), that have irregularities like real buildings? I wasn't sure whether the plan was to make an onion building, where the interior is generated on geometry inside the outer, though, or a universal 'building' shader was planned.
4) Would the code support variable sized rooms (e.g. double width/depth) to provide some variation in the look and feel?
Here's the changelog so far for v007:
- Connected map multipliers.
- Fixed alpha issues.
- Fixed ceiling text flipping.
- Decoupled room and lighting random numbers.
- Decoupled room and row random numbers.
- Added room rotation so floors/ceilings and walls match up.
- Added horizontal light and mask scaling as lights tend to be switched on or off by floors or mult rooms in office buildings.
- Added wall and floor thickness.
I'll upload the IntMapping and ArchGlass shader soon, hopefully this weekend, along with some other new nodes. : )
Comment
-
Originally posted by Rens View PostThis is done, I just need to iron out some oddities with it.
I now have updated the archGlass shader to accept a selfilluminated input. It works well.
So I have now added to horizontal variability component to the light mask so you could use that as a mask to blend different room widths together. However it would probably look a bit Harry Potter-ish as you might see a deep room in one window and in the next window you see a small room where you would expect the larger room to be. Anyway, it's on the list.
Here's the changelog so far for v007:
- Connected map multipliers.
- Fixed alpha issues.
- Fixed ceiling text flipping.
- Decoupled room and lighting random numbers.
- Decoupled room and row random numbers.
- Added room rotation so floors/ceilings and walls match up.
- Added horizontal light and mask scaling as lights tend to be switched on or off by floors or mult rooms in office buildings.
- Added wall and floor thickness.
I'll upload the IntMapping and ArchGlass shader soon, hopefully this weekend, along with some other new nodes. : )
Hi Rens, any progress on that upload? I have an office project coming up and I like to know if it's something I can use. I'll try v6 for now. Thx!
Comment
-
Here's the latest, haven't fixed that wall thickness bug yet (perspective is off), let me know if this works.
http://www.rensheeren.com/osl/interi...g_tex_v007.osl
And ArchGlass with an input for the InteriorMapping shader so they can be used together easily:
http://www.rensheeren.com/osl/archGlass_mat_v003.osl
Enjoy!
Comment
Comment