Posts mit dem Label 3D werden angezeigt. Alle Posts anzeigen
Posts mit dem Label 3D werden angezeigt. Alle Posts anzeigen

Freitag, 24. April 2015

Layered modo Configs under OS X 10.10 Yosemite and later

Since Apple thinks it is boring to keep thing consistent we once again need a different approach to get the layered configs with modo to work in OS X 10.10

Create a file called envrionment.plist in ~/Library/LaunchAgents
The file should have the following content. Remember to change the paths in bold to your own locations.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>my.startup</string>
    <key>ProgramArguments</key>
    <array>
        <string>sh</string>
        <string>-c</string>
        <string>
        launchctl setenv NEXUS_LICENSE /path/to/license
        launchctl setenv NEXUS_PREFS /path/to/prefs
        launchctl setenv NEXUS_USER /path/to/user
        </string>

    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

To load the file without a reboot call launchctl load ~/Library/LaunchAgents/environment.plist from a Terminal window. After that you are good to go.

Dienstag, 29. April 2014

MARI Tool Kit v1.6 for MODO

It is time for a new update of my MARI Tool Kit. I refined the UI and gave it a couple of nice icons. Besides that I have rewritten the image import which is now faster and now able to sort all the imported files into mask groups. So each UDIM has then its own mask group and its textures. If the user defines an entity as well all UDIM groups are nested under their entity. This makes working with all textures in modo very easy.
Besides that the user has various tools for integrating manually imported textures like set the UV offset or shader effect, gamma correction and create UDIM selection sets.




Currently it is supported for MODO 701 and 801. It doesn't utilise the UDIM features of the new MODO version but I am working on it and there will soon be an update to v1.6.1
So if you are a modonaut and have MARI in the pipeline you might want to give it a try. Download it from my github.

Freitag, 21. März 2014

BJs ToolBox v1.6 - CameraMatch

After a lot of work the last couple of weeks I finally pushed out a new release of my KIT for MODO. All the time I spent for it was a new tool for matching a camera to a still image and so the name is quite obviously CameraMatch.
I had the idea for quite a while now but I wasn't really sure if I had the programming skills to do this. But after I had a look at an article from fxguide (actually two) I was sure I could do it.
At first it seemed pretty easy and it was going well. At least I thought it would. But after the solving of the two vanishing points it was pretty difficult for me. The math I did for the orientation of the camera didn't work or would only work for some images. Especially the yaw rotation made me headaches. Then I found BLAM a plugin for blender and it was based on Using Vanishing Points for Camera Calibration and Coarse 3D Reconstruction from a Single Image. And this was just what I have been looking for. I then spent about one week to get my vector math skills back on track which have been collecting dust since school. Would I had known that I really could use these I would have paid more attention back then.
Thanks to the modo community I could takle down some major bugs and here is the next version of BJs ToolBox.


Besides CameraMatch, BJ's ToolBox has several other features:

Modelling:
Tools:

  • Rotate Element: hover over an element and rotate it through its local axis

Thread Tools:
Inspired by the modelling techniques of Peter Stammbach.

  • create inner or outer thread
  • define diameter, sides and the number of steps
  • the thread itself is currently hard coded and best use in the range of millimetres and centimetres

Animation:

  • Cameras To Animation: create an animation from a bunch of cameras

Shader Tree:

  • Create Materials in Shader Tree: creates material groups for material tags
  • Create Material per Element
  •  Create Material per Mesh


Mittwoch, 26. Februar 2014

modo - Camera Projections For Modelling

For a little side project I started a test how to create environment based on scan data. One thing that I missed in modo was a proper overscan feature in the 3D model view. It is possible with the preview renderer but using it for modelling is really not an option.
But I found a really good workaround by using camera projections. And I really prefer this method because it allows you to stay in the perspective view and you can really build up your environment in a fast way.


I am planing a little tutorial series about the whole workflow which will also cover the steps in photoscan. So stay tuned.

Donnerstag, 30. Januar 2014

Layered modo Configs under OS X 10.8 and 10.9

This is a short walkthrough to how create a layered modo config like Fredrik Stenson described at his site.

Since the environment.plist in user/MacOSX/ doesn't work anymore under Mountain Lion you have to choose a slightly different approach.
The easiest way is to set the paths in the launchd.conf located in /private/etc/
It's a hidden path so you need to make these visible:
  • Open up a terminal window (Programms > Utilities > Terminal)
  • Execute following command:
    • defaults write com.apple.Finder AppleShowAllFiles YES
  • Now hold 'alt' and click on the Finder icon in the toolbar
  • Click relaunch
Now you should be able to see all the hidden files and folders and finally see the /etc/launchd.conf

Here you can now enter your custom folder for modo like described in the Layered modo Config guide.

To edit the file type enter following in the terminal window:
sudo vi /etc/launchd.conf (note: this file might not yet exist)
Now move the cursor to where new text will be added. To enter your values you need to change to insert mode by typing i.
Now you can enter the contents via the setenv e.g.:
setenv NEXUS_LICENSE /Users//_Library/modo/user/701/license

If you are done press ESC to go back to command mode. To write the file and quit type wq and hit ENTER.
You might need to restart your machine to make the new paths work.

You can find some detailed information about the launched.conf here:

And more about the vi[m] commands here:

Last thing to do is to deactivate show all for the finder:
defaults write com.apple.Finder AppleShowAllFiles NO

Montag, 16. Dezember 2013

MARI Texture Challenge - Breakdown

Since MARI was totally new to me I started with some basic tutorials. Thanks to Mike Jagodzinky and his nice Getting Started with MARI videos it was fairly easy to get going.


Texture Painting

I first started with basic colouring the diffuse channel. It was good practice to learn the different brushes, the paint buffer behaviour and most importantly the selection modes. These helped quite a lot to get the model textured.
The thing which I should have done to make my life easier here would have been to create dedicated selection sets in modo and then re-import the model as a new version.

After the base colouring of the bike and the pilot I started to add dirt and oil spills. For this I created several layers and at first a different channel for the pilot as well. But in the end I copied the layers of the pilot back to one diffuse channel just to keep it more tide and give my MacBook a not too hard time.

For the brushes I used only the presets which come with MARI.
My favourites here are:
  • oldShipyard
  • oldScuffs
  • moleAttack
  • looseEdge
  • tRex
Combined with the really cool masking features like edge and fractal noise mask these brushes are really good and quick to use.
One thing I missed here a lot is that you do not have the ability to save the projection settings to a brush preset. Or at least save different presets for the projection settings. This would be a really nice feature to speed up some steps while painting.

The paint trough brush is also very handy and a bit similar to the painting in modo. I created some decals in Photoshop and a bump map for the suit.

Besides dirtying up the model I started to add corrosion and aberration with different mask layers. I then used these masks in the bump channel as linked layers. For the spec channel I imported the dirt layers as linked layers and added some correction nodes on top of these. First a desaturation node and then a layer to give it more contrast.

Base colour


Base colour with decals and markings

Scratches and abrasion

After some test exports I decided to export flattened channels out of MARI. This was the most efficient and fastest way to get going in modo.

Final Textures in MARI

modo Workflow

Painting the textures was one thing but how to utilise them in modo another. Since there were 26 textures for each channel I didn't want to set the offset for of them by hand. So this was a perfect way to practice my python skills for modo.

MARI Tools

I came up with a small KIT which allows me to import a bunch of textures and the script automatically sets the UV offset values according to the UDIMs in the texture name. Besides some other handy features it creates selection sets for each UDIM as well. This makes selecting and creating different material masks much easier.

MARI Tools for importing textures into modo
You can download the current version at the Foundry modo forums.

Shader Tree

Once the script was done I started to think of a good and effective way to set up my shader tree. In the end I have three main groups containing the textures: diffuse, bump and specular. At the beginning I separated the dirt layer from the diffuse colour and layered it on top of the materials. But this was very ineffective speaking of render times. So I exported it directly flat into the diffuse map and used the specular textures to control the reflectivity.


The marked groups only contain the textures. "SPEC_AND_TRANS" are the specular textures and instances of these set to transparency amount. Both texture pairs are set to multiply so that these only affect values which are actually in use.
The "PRIMING" group are the diffuse textures but set to alpha only and acting as a group mask. Inside are three different materials for the priming colour layer. So basically this layer mimics the grounding underneath a car paint or as for the pilot scraped leather.



Speaking of reflectivity, I am a big fan of physically based shading. I always start with a material with "Match Specular" on. The car (or in that case the bike) paint is a good example of how my workflow is. But before that two more important things to switch off is the "Affect specular" in all the light materials and to deactivate simple shading for the lights.


Shader Breakdown

With that set up I start tweaking my material. To control the reflectivity I tend to use a gradient. This gives me great control how the fresnel effect should appear of each material. To start with I set the min value of the gradient to 0.02 and the max value to 0.98. I tweak the curve to look like shown in the image below to start with.


I set the gradient to multiply and in the underneath lying material I set the specular value to 1.0 (100%). With that I can quickly adjust the overall reflectivity instead of adjusting the gradient curve. Also I am able to use one gradient on top of different materials if I like.
As you can see I try to start with a preset scene to create a material. Instead of using the original textures I first setup my material with some dummy procedural textures. These are then replaced by textures in the final scene. This process renders much quicker and I can easily test out stuff.
Next are some scuffs and dents. These consist off two layers. The first is the PRIMING layer and the second a bump layer. In the priming group is a high contrast noise texture and a matt chrome material to mimic the underlying metal of the paint layer. The noise texture is acting as a group mask. I instanced this texture into the SCUFFS group and set it to bump.

Scuffs & Bumps

Next I added some fine scratches which you always find on a clear coat. This breaks up the surface and makes it look more natural.

Fine Scratches

I created three noise textures. These are identical except the rotation. All three noise textures are multiplied over the specular amount.


With these noise maps I am able to adjust the effect very quickly in size and strength in the final scene.

After the scratches I multiplied a fine and smooth noise texture over the bump texture. This simulates a so called orange peel effect and breaks up the reflections on a paint material even further.

Orange Peel Effect
You can barley notice this effect but it's the little things that make the difference.
For the last part there is the dirt layer. For the diffuse colour I took again a noise texture with two dark brown colours to map it on top of the material colour I created a second noise and used it as a layer mask (inverted on) for the dirt noise.



I then copied this layer mask noise to the DIRT group above in the shader tree. Here I adjusted the contrast a bit more and changed the the effect to specular amount and the blending mode to multiply.

After I am done with setting up my preset material I copy it over to my work scene. Here I exchange the dummy noise maps with the real textures. 


The only noise maps I keep are the orange peel and the scratches. Of course I needed to adjust the structure a bit.
As you can see I used only one gradient to control the materials of the bike. Chrome and aluminium are on top of it since these two shouldn't be affected by it.
I used a similar approach if I had materials which shouldn't be affected by the diffuse textures (e.g. glass for the windshield or some chrome parts).
Lighting was not really special. Two area lights and a studio HDR. Because it was a texture challenge I decided against a background and motion in the image.
The beauty looked almost good enough. For post I went into Lightroom for some image adjustments. After adding some grain I exported it to Photoshop and applied a small amount of colour fringing (chromatic aberration) with the lens correction filter.
And that's it. You can see the final image here.