Creating a nice CGI landscape.

I want a new background for my desktop system. But it’s a dual-monitor system with two monitors with 1920×1200 resolutions. This means that I have to make a very wide image. So I decided to make a wide landscape image. But I don’t want a bunch of trees, some mountains and water, but also some models inside the image, doing something. So I’ve decided to make it a hunting scene. On one side, Raevin with a dangerous gun who is hunting a Brontotherium on the other side. So I first need to create and pose them in Poser. And to make it easy, I just put them both in a single model. I can split them again once it’s imported in Vue. So, here are the models:

Main charactersOf course, I will make them look at one another in Vue. As I said, I will split it in Vue. Just needed to create a proper pose first.

The next step is starting Vue, set the image to 4800×1500 pixels which is the proper scale for my two monitors. I will have to re-size it later on to 3840×1200 to make it fit perfectly, but the larger resolution will also allow me to cut out part of the image as separate images. But size won’t be enough. I need to pick a proper atmosphere, the flow of the landscape, the trees and grass I want and of course I want to add water since that big monster would look nice with his body partially reflected. It also means adding some small splashes and ripples.

So, the atmosphere first. It should be sunny and a bit cloudy, but no real visible clouds. A nice sunset would look great. So I start with this:

Atmosphere

Next, I need to decide where I want the models and have decided to place Raevin on the left, so the prey is on the right. The sunlight from behind will make his shape a bit darker, thus more menacing. The same will be true for Raevin, but I will add a second light on Raevin so she becomes more clear in the image.

But before adding the models, I need to decide on the landscape. I want a few mountains in the background. I also want the animal standing in a lake, so I need water on the right side. But Raevin needs to be on dry land, preferably grassy. So, let’s add some terrain, grass and trees for in the distance.

Plains

It’s still far from perfect but it has a lot of potential  But you will also notice that I have water on the complete foreground, but I want to keep Raevin on dry ground. That makes it a bit complex, but it’s still easily solved. Also, I want to have the animal on top of some rock too, even though that rock would be submerged. It just adds more realism. So, I need to import both now, split them and make some adjustments while placing both on flat rocks. So, let’s first show Raevin in this environment.

Adding RaevinWell, I don’t really want Raevin to hunt this animal. She’s cautious but she has a different target. A lot of improvements are still needed, though. For example, I want some bushes in the image too. But first, that animal… And I have to remember to put a rock beneath his feed and to add splashes because he’s walking through water.

Adding Animal

This is promising to look very nice already. However, trees! I am going to add a third rock, place it behind Raevin and I will add trees to it, so she’s slightly hidden. No good hunter would be on open terrain where any possible prey or dangerous animal could see them…

However, I’ve noticed that the atmosphere seems to degrading with every new preview I render. It seems to be getting brighter and brighter. So I just load the atmosphere again before my next preview. And yes, this could be a bug in Vue, or maybe a problem with my graphics card. I will have to look into that one day. However, for now reloading the atmosphere works just fine, as shown in this preview:

Preview 1The next step is fine-tuning the complete image. Raevin needs to be a bit more shiny, and I don’t like the way her gun looks. So I need to fix her textures, or materials. But the problem is that this image is becoming a bit slow to use, so I will use a trick to speed things up. First, I will save this scene so it’s safe. Then it’s time for a new preview. (I will also add a second light just to highlight Raevin.)

Preview 2

And now it’s starting to look better already. The shiny cybernetic limbs of Raevin are a bit shiny in this preview, but I don’t mind. It adds an extra dimension to the image. It’s time to render this image at its full resolution and highest quality. Considering the amount of objects and reflections in this image, I guess it will take a few hours to finish. First I need to save it and then I’ll start rendering around noon. It will probably take most of the night to finish.

And indeed, the next morning I can see the result. Raevin is really having shining cybernetic limbs, which look very interesting. Not a good thing for a hunter, though. Unfortunately, she seems to be floating a bit above the grass so I might have to adjust that. Maybe I should also change the reflectiveness of her cybernetics. The extra rock with the trees is missing some grass, so I might want to add that too. And the mountains in the background you can see lots and lots of houses. It’s really a lot. It turns the setting away from prehistoric times, which is what I like about it. The brontotherium looks great, though. See for yourself!

Raevin and BrontotheriumUpdate

After considering the above image, I decided that a few details had to be changed. First of all, the background just didn’t look natural enough. The sun is shining very pretty but there are too many houses. Another problem is the shininess of the cybernetic arms and legs, that are too distracting. And there’s a bald spot on the ground where grass is supposed to be.

Rendering a final image is very time-consuming and I knew it would take about a day for the render to be complete. But since I wasn’t happy with the above image, I did render it again with some different details. The scene, lighting and models are still the same, except for the textures of the land and cybernetic limbs. This should be a much better result:

Raevin and BrontotheriumUpdate 2

I’m still not very happy with the final result. Raevin needs to be even lower and she should be aware of the beast that’s about to charge at her. So I turned her around a bit. I also changed some of the bushes in the foreground and added additional plants on the right so the “cameraman” would be hiding behind these.

This minor adjustment resulted in the following image, which is supposed to be the last version:

Raevin and Brontotherium II

 

The challenge for the CART system.

In The CART datamodel I displayed the datamodel that would be required for the CART system. Basically, the data model would store the items, transactions and contracts while the templates will be stored in code, as XML structures that are serialized to objects and back again. As a result, I would split the relations from the data, thus allowing me to avoid regular updates to the database structure. All that I might want to update are the templates but even that might not be required for as long as the software will support “older versions” of those objects.

But serializing those objects to and from XML isn’t as easy as it seems. Since I’ve separated data from relations, the data itself doesn’t know its own ID. Why? Because the ID is part of the relation, thus I would not need to store it within the XML. (It would be redundant.) But if I want to use these objects through a web service, having the ability to send this ID to the client is very practical, so I can send back changes through the same web service. I would need the ID to tell the server what to do with which object.

Thus I’ll end up with two methods of serializations. One is just to serialize the data itself. The other is the data plus its ID. And now I will have to decide a way to support both. Preferably in a simple way that would not require me to generate lots and lots of code.

In the data layer, I would split up every object into a relation and a data part. The data would be stored as XML within the relation object. To make sure the relation object will be able to expose the object, I would need to give it a DataObject property that would be the data object. It’s get/set methods should connect to the XML inside, preferably even by using an object as buffer so I don’t have to serialize it over and over again.

In the business layer, I should not have an XML property, nor should I have a DataObject property. The data fields should be there, with the ID. And basically, I would need a mapping to convert between the data layer and the business layer. The trouble with this approach is that I would define all data twice. Once in the data template and once in the business layer. That’s not very smart. I need to re-use things…

I’m considering to add my serialization method for the data templates. This means that I will include the ID within the template, so it becomes part of the object. All properties would be defined as data members, including the ID. That way, the ID is sent from the business layer to the client. But to store the template in the relation object, I would need to create my solution.

One solution would be by implementing methods to convert the data to XML plus a constructor that would accept XML to create it. It would also mean that I need a way to recognize each object type so I can call the proper construction and probably inherit a bunch of code or write interfaces to make objects more practical to be called upon. It would be complex…

Another solution would be by defining my own attributes. One would be for the class name, thus allowing me to find classes based on this custom attribute. The other would be for the property and my code would just use all of those to generate the XML or to read it back again. This too would allow custom field names. It would be a cleaner solution since I would define the template as just a bunch of properties. Which, basically, they are.

But this second solution is a bit complex, since I still need a way to call the constructor of these specific classes. So I’ve opened a question on StackOverflow, hoping I will get an interesting answer that would solve this easily. Why? Because part of being a good developer is to ask other experts for possible solutions when yourself don’t have a good answer! 🙂

The CART datamodel

Well, my back problems made me think a lot about the CART system that I’ve mentioned before. And it made me consider how I need to handle the difference between plain data and the relationship between the objects. Because the most troubling thing I had to deal with was that I did not want to change my datamodel for every new item that I want to store. So it made me think…

The CART system is mostly created to handle relationships between items, transactions and contracts. It’s not about handling of the data itself. Actually, the system doesn’t even care about the data. All that matters are the relationships. Data is just something to display to the user, something to store but normally not something that you’ll need to process very often at the data layer. So, considering the fact that you can serialize objects in .NET to XML data, I’ve decided to support a basic structure for my Garage Sale project for all the items, transactions and contracts. And each of them will contain a Data property that has the serialized data, that I could convert to data objects and back again.

This idea makes it also more clear where the templates are within my system. My templates are these object definitions! I will have a very generic database with a very simple layout, and I can generate a very complex business layer around this all that I can change as often as I like without the need to change my database model. As a result, I might never have to change the data model again!

Of course it will have a drawback, since the database will contain serialized objects. If I change those objects, I will also need to keep track of the changes in those stored structures and either update them or keep up multiple versions of those objects. Updating those structures would mean that I have to create update apps that know both the old structures and the new structures. It should then convert each old structure to a new structure. Maintaining multiple versions might be more practical since that would leave all old data intact in your system. Anyways, it’s some added complexity that I’ll have to consider.

But now, my datamodel as created by Visual Studio 2012 by using the Entity Framework:EF-CART

 

So, what do you see?

  • The DataObject is the base class for any CART object. It has a unique identifier, a name that can be used to show the related object and a Data property that will contain an object as XML.
  • DataItem is a generic item class, containing an additional description just for more practical reasons. When a user wants to select an existing item, having a description makes it possible to avoid reading the object within the data.
  • The Collection table is just an item with an extra bonus. It can contain multiple child items without the need for any transactions. Actually, this is just a shortcut solution to allow more complex structures within your items. For example, you might create a complete Household collection containing husband, wife, four children and a dog. And although you could link them together by using transactions, having them in a collection just saves the need to create those transactions.
  • DataTransactions is the base class for the transactions, having a sender, receiver and subject item connected together. It also has a link to a rule and a timestamp, indicating when the transaction tool place. (Or will take place for future transactions.)
  • IntegerTransaction is just a basic transaction with a multiplier. This way, you don’t have to add a lot of transactions when your customer buys ten bags of flour.
  • DecimalTransaction is also a basic transaction that will handle items that can be traded in all kinds of different numbers, including fractional amounts. For example, the price of a product, or it’s weight, length or light intensity.
  • DataRule is the basic contract type. It’s a collection of transactions that are all related to one another. For example, the sale of a product would result in a sale rule.
  • The Contract class is more than just a rule. It’s a rule that can contain child rules, thus allowing structured contracts that are made up of several subcontracts. These are used when you have to deal with complex
    situations, like mortgages. A mortgage would include a rule for purchasing a house, a rule for lending money and paying it back, plus other rules for all kinds of insurances.

Now, as I’ve said before, this datamodel should offer me more than enough structural parts to use for my Garage Sale project. All I need to do is compile it and then just leave it alone. There should not be a need to include anything else.

Well, okay… That’s not completely true, since I might want to handle user accounts and store large images of products. But these things would actually require new database structures and should preferably be part of separate databases.

Looking back at this design, it surprises even me how less data it actually has. But the trick here is that I’ve separated the relationships between objects from the actual data itself. Each object can still contain a huge amount of data. But it’s just not important for the model itself.

Dell isn’t making me happy…

My recent post about my new laptop has a strange twist. I should be using it right at this moment but no such luck. Dell didn’t deliver it. So, what happened?

Well, I ordered this monster laptop on February 23 and I received an order confirmation the next day. In it, Dell promised me to deliver my laptop on or before March 18. Which happens to be last Monday. However, one week before delivery, Dell just decided to cancel my order without notification. I never received a valid explanation, not did they warn me by email about this cancellation. It was just pure luck that I discovered this cancellation on March 13, simply because I kept checking my order status.

Needless to say, I wasn’t very happy about all this. I called their support helpdesk and asked them why they could not deliver my system. And although the person was very helpful to resolve the problem for me, he just could not tell me why it was cancelled. Most likely because the configuration was invalid. But if that was true, the Dell site itself should have made it impossible for me to choose this configuration.

I was left with two options. Either they would refund my money, which happens to be quite a substantial amount or I could order a similar system at that moment for the same price. The helpdesk would try to select a system that would be as similar to what I had ordered and all I had to do was wait a while for him to create a quote for the new system.

When he called back a few hours later, he gave me an offer that was identical to what I had ordered. An exact duplicate, with the same part numbers, the same configuration and exactly the same price. So, the configuration I had selected was valid after all and they’ve canceled my order for some bogus reason. Or maybe they don’t want customers who spend nearly 4.000 Euro’s on a single laptop. I just don’t know why the cancellation happened…

The only difference is that this new order also has a new delivery date. I now have to wait until April 8 before I can use it. Maybe it will be delivered sooner? Maybe it will be canceled again? I don’t know. All I do know is that Dell isn’t making me happy.

So, if you ever decide to order new hardware from Dell, please consider alternative options! I’ve been using Dell computers for a long time and their hardware is great, but these problems with ordering a new system does urge me to look for other alternatives in the future. Such a long time until delivery is just unacceptable.

Update

Dell just emailed me a new delivery date. No, it’s not April 8 anymore. It’s on or before April 19th…

This means that it takes almost two months for Dell to deliver my new laptop.

Update 2

And as it turns out, Dell has even created a new order again. I’ve called their sales helpdesk and had a little talk about it all. They’re having configuration problems with this system, which isn’t surprising considering the extreme power it has. And some parts are missing at this moment, so they can’t assemble it yet. The 32768MB 1600MHz Dual Channel DDR3 is one part that they’re not having. These are actually 4x8GB memory modules and indeed, these modules are a bit tricky.

The other part that’s causing troubles is the 2GB GDDR5 NVIDIA GeForce GTX 675M. Again, a very powerful piece of hardware that I consider a must for my new laptop, especially since I also want to use it for rendering CGI artwork.

So now I’ll just have to wait until April 19th, hoping Dell will decide to deliver even sooner…

Update 3

Dell finally confirmed that my laptop has been produced and it’s on it’s way from Shanghai, China to Europe. I can expect my laptop on monday, April 15. Yeah, that’s almost two months after I’ve ordered it. I have to admit that Dell delivers good quality products, but their delivery times are way too slow.

Update 4

Received my laptop yesterday. WOW!!! Dell is making me happy now…

The web comics I like…

All my life I’ve collected a lot of comics. I still have a huge collection of both European comics and comics from the USA. However, the Internet did have an interesting impact on the world of comics, because today a comic can be published world-wide and all the costs is has are the time to draw the comic plus the costs of maintaining a web server. This is then compensated by income from advertisements on the web site and of course all kinds of merchandise that visitors will like to have. Like t-shirts with their favorite character, printed comic books or plushies.

So my interest started to shift from the paper comics to the web comics. I’ve bookmarked these and every evening I like to quickly check them all for the latest updates, just like I check my mailbox, Facebook messages, LinkedIn status and other online stuff. It’s part of my daily routine and keeps me away from viewing the boring television channels that we have here in the Netherlands. At least online, I’m not bothered by the many advertisements…

So, to start: Dilbert! I do think that everyone who reads my blog will know this comic too. It’s also one that’s heavily syndicated, appearing in many printed newspaper and magazines. Basically, it’s something I recognize personally, since Dilbert is an engineer and he has to deal with unrealistic demands and situations on a daily basis. It’s still amazing how he still keeps up trying to do his best, instead of giving up like Wally, another character from this comic. I often feel like Dilbert, not wanting to give up no matter the odds or the Elbonians who will imprison me and then fire me for working too hard… 🙂

Another favorite won’t be a surprise: Garfield. What’s not to like about a fat, lazy cat whose favorite dinner is food? Here’s a comic that’s been popular for decades, just like Dilbert. And the Internet has opened up a lot of extra revenue for its author, allowing them to explore all kinds of other options to make this comic even more popular. Of course, the Garfield movies and animated series also make this comic a great success.

But how about Garfield minus Garfield? This is an interesting concept based on the Garfield comics. The artist here picks some Garfield comic and will erase the cat from the comic, often leaving just Jon in the result. And interestingly enough, this often results in yet another fun situation.

Basic Instructions is a autobiographic comic where the artist draws himself in discussions with his wife, his friends, his employer and customers or his fantasy self. The fun is more in the texts than in the drawings, though.

Dinosaur Comics is even more about the texts than the artwork. Basically, the artwork is always the same, since the first comic it published. And yes, it’s about dinosaurs and it sometimes refers to God too. Which is funny, since Dinosaurs were created before creation itself. An interesting paradox.

Molly and the Bear is a comic about a little girl and her talking bear. Without the bear, she would have a normal life, like any other girl. But the bear adds some fun and a very strange perspective on the lives of children and adults.

Sandra and Woo is also a comic about a girl with a talking animal. This time, the animal is a raccoon who was raised as a pet, then escaped to the wild before becoming a pet again because he’s addicted to belly rubs. Of course, having talking pets always make for interesting stories.

I am Arg is also a autobiographic comic from a Canadian artist who just likes to create some funny strips about gaming, geeks, girls and more.

How about stick figures? The comic xkcd is definitely a must-read for geeks and comic lovers and is updated on an almost daily basis. The drawings are simple, but the humor often reflects personal feelings and often a deeper insight in things we normally don’t even think about…

What the Duck is a comic about a professional photographer in the shape of a duck. When you’re a professional photographer, this comic is a must-read.

Buni is a comic about intelligent animals. Basically, the main characters are bunnies and there are occasionally other animals in it, all drinking at the bar, experiencing life-like we all do. Often going beyond “normal” situations and exploring interesting thinks like the Leprechaun at the end of the rainbow. (Who tend to be mugged or eaten by flying unicorns…)

Marry me is a comic about a famous female singer who decides to just marry some random fan on the spot, less than a few minutes after seeing one another. What follows is a love story where they start to explore each other on a personal level before deciding if they should annul the marriage again or just continue it. And yes, at the end of the first book they decide to stay married and even have a child together. The second book provides background information about one of the main character, which makes it an even more interesting read.

Dork tower is a role-players comic. If you’ve ever played Dungeons and Dragons, then this is THE comic to read.

Looking for Group is a comic about an elven woman warrior who is exploring his roots and who starts to build up his own kingdom. He’s accompanied by several strange friends including a wizard who seems to be the incarnation of pure evil, yet he seems to do his best to be good.

Goblins is a roleplaying story from the perspective of the characters themselves. Although it started a bit childish, with lot of referrals to the players and game master, it has turned out to become a very serious strip with a great story line.

Avengelyne is the story of a female angel who is cast out of heaven to the mortal world, where she will have to continue fighting the forces of Evil.

Another comic for role-players is Weregeek where being a geek is actually a superpower. It provides a real interesting view on the lives of fantasy role-players that’s actually not that far away from the truth.

Elven is a fantasy comic about the daily lives of elven fantasy characters. It’s more background information about how elven mages and paladins learn to become the warriors that are common in role-playing games. Unfortunately, it now seems to be updated once per year or so. I’m hoping it won’t stop, but the artist seems too occupied with other things to do.

PhD Comics is for students and professors and shows the fun side of the Academic World.

Cyanide & Happiness is a simple-artwork cartoon but with funny punch lines and interesting twists. The humor tends to be meant for adults, not minors, since talking about sex is a common topic.

Foreskin Man is more a protest site against male and female circumcision. This site is trying to enact legislation in the USA that should protect young boys from this kind of penis mutilation. Why? Because in most cases there’s no medical reason to do this kind of surgery. Parents often force this upon their young children for aesthetic or religious reasons. Like female circumcision in Africa, it’s a practice that should be stopped since the victims of these operations have this procedure forced upon them, instead of doing so out of their own free will, after being informed about the pro’s and cons of this procedure. Then again, I am glad my parents left my foreskin intact, which is common for many European men.

Faraday the Blob is about the adventures of a blob, a character with no torso, arms or legs. Yet somehow he seems to manage just fine as if nothing is wrong with him. And yes, this is a comic about an absurd world with absurd situations.

Two guys and Guy is about Guy, a young woman (surprise) and her two male friends. One friend is quite intelligent but also a ruthless scientist. The other friend is as dumb as the Monster of Frankenstein without his brain. And Guy herself is the connection between them.

Next, a set of Pixie Trix comics which tend to be slightly NSFW, but still very fun. Three of them rated PG-13 are about a fantasy world in the Harry Potter style, so there’s an academy for super-humans where they learn to handle their powers without betraying their existence to the real World. The two others are about a bunch of friends and are R-Rated because it tends to be sexually explicit, although it doesn’t really display genitals. (Tits, yes.)

Eerie Cuties is where the fantasy stories start. A young vampire girl will attend the academy for the first time, accompanied by her older sister. However, since this little vampire girl was born on Easter, she doesn’t drink blood. She lives on chocolate instead, making her an interesting character. But as the comic progresses, it will also focus on the lives of the other supernatural students in the academy, including the complex hormonal influences of puberty.

Magick Chicks is a spin-off of Eerie Cuties where a group of witches infiltrate a monster academy. After many episodes it’s still not clear why they had to infiltrate this academy, but they are on a secret mission that they don’t even know about.

Dangerously Chloë is another spin-off of Eerie Cuties. Chloë left the academy to become a full-fledged Succubus and is sent on her first mission. She’s to become the girlfriend of a boy who dropped some of his blood on a Satanic statue by accident. He is granted a wish, and wishes for a girlfriend. Thus, Chloë enters the scene and is to become his girlfriend, harvest his soul and then return to the Demon world, well-fed. Too bad Chloë feels sorry for the boy and now wants to help him to escape this contract with the Devil, without compromising her own work. She just has to find some other girl who wants to become his girlfriend and she happens to know the perfect candidate.

Menage a 3 starts as a story about three guys sharing the same house as roommates. But as it turns out, two of them are gay and are caught by the third friend, naked and ‘connected’. They also planned to leave the house but they had put an advertisement out for a new roommate. Knowing their roommate is straight, they asked for female roommates and as a result, two girls turn up to become the new roommates. From here on, the story is about the relationships that develop between these roommates and their friends. Plus, the straight roommate also turns out to be a virgin, so the new roommates are trying to change this.

Sticky Dilly Buns is a spin-off and is about one of the former male roommates, who decides to live together with a female (former) porn star. That too turns out to be very interesting, since they both share a similar interest in men.

Go Get a Roomie is about a hippy girl named Roomie since she just wanders around, sleeping with anyone who offers her a place to sleep. She’s an alcoholic, a bisexual nymphomaniac and at one point she ends up at the place of Lillian who is first just annoyed about her new roommate, yet tolerates her since she’s too lazy to kick Roomie out. Lillian tends to sleep a lot, having some spiritual-like dreams which she shares with Roomie and Roomie’s friends. And their relationship starts to develop to something stronger in a non-sexual way, although Roomie is definitely interested in making things more sexual.

Finally, Oglaf is a comic about a fantasy world with often some very adult content, yet always placed in a fun way. Occasionally, it will have a comic that is safe to view at work but most of it isn’t. It’s a world where men can become pregnant and where the fountain of doubt is doubtful.